-
-
Notifications
You must be signed in to change notification settings - Fork 149
Description
Is this related to an existing part of the documentation?
- Yes, it is related to an existing section
What needs to be updated?
Current Documentation Issue
The backend setup documentation does not clearly specify the correct way to run the FastAPI server when using relative imports inside the app/ package.
Currently, running the server from inside the app/ directory using:
cd Backend/app
uvicorn main:app --reload
results in the following error:
ImportError: attempted relative import with no known parent package
This happens because main.py uses relative imports (e.g., from .db.db import engine), and running Uvicorn from inside the app/ directory prevents Python from recognizing app as a package.
-The documentation does not clarify:
-That the server must be run from the project root (Backend/)
-The correct Uvicorn command format
-The requirement for init.py files inside package directories
-This can confuse new contributors during local setup.
Proposed Changes
Update the backend setup documentation to:
Clearly instruct users to run the server from the Backend/ root directory.
Provide the correct command:
cd Backend
uvicorn app.main:app --reload
Add a note explaining why running from inside app/ causes import errors.
This will improve onboarding clarity and prevent common setup mistakes for contributors.
Relevant Documentation Link (if any)
No response
Record
- I agree to follow this project's Code of Conduct
- I want to work on this update