refactor: isolate FastAPI and MySQL database implementation into fastapi_backend](url) folder#211
Merged
Conversation
…api_backend folder
|
@vedant-kawale-27 is attempting to deploy a commit to the Aditya Sharma's projects Team on Vercel. A member of the Team first needs to authorize it. |
Userunknown84
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reorganizes the repository by isolating the unused FastAPI implementation and its MySQL database dependencies into a dedicated top-level directory (
fastapi_backend/).While the production/docker-compose environments run the Flask-based ML API (
api.py), this keeps the FastAPI code intact in a separate module so it can still be run and tested independently without cluttering the mainbackenddirectory.Changes
backend/and into the new fastapi_backend/ folder:main.py(FastAPI Server Entrypoint)database.py(MySQL Database Client Helpers)emails.py(FastAPI router for email operations)export.py(FastAPI router for exporting reports)middleware/logging_middleware.py(FastAPI logging middleware)schema.sql(MySQL setup script)requirements.txtin the newfastapi_backend/directory to document and isolate dependencies specific to this service (fastapi,uvicorn,mysql-connector-python,fpdf2, etc.).fastapi_backend/main.pyto defer the initialization ofXAIServiceuntil the models are loaded. This fixes path resolution issues and avoids double-loading pickles when running the application via uvicorn from the workspace root.fastapi_backendfiles to reference the new folder module prefix.Verification
closes #177