- Create a focused branch for the change.
- Update or add an Alembic migration when the database schema changes.
- Keep HTTP concerns in routers and business rules in services.
- Reuse repositories for database access instead of adding queries to route handlers.
- Update the API or frontend documentation when behavior changes.
- Run the validation commands below before opening a pull request.
# Install dependencies
poetry install
# Start the API with reload
poetry run uvicorn app.core.main:app --reload --host 0.0.0.0 --port 8888
# Apply migrations
poetry run alembic upgrade head
# Inspect migration state
poetry run alembic current
poetry run alembic history
# Check Python syntax
python -m compileall appcd frontend
yarn install
yarn dev
yarn lint
yarn buildFor a new resource or use case, use this sequence:
- Add or update SQLAlchemy models under
app/db/models/. - Generate and review an Alembic revision.
- Add Pydantic schemas under
app/schemas/. - Implement persistence methods in a repository.
- Implement business logic in a service.
- Expose the feature through a router and register it in
app/core/main.py. - Add the corresponding frontend service, types, page, or admin component.
- Document the endpoints in
docs/api.md.
poetry run alembic revision --autogenerate -m "describe the schema change"
poetry run alembic upgrade headAutogenerated migrations must be reviewed manually, especially enum changes, nullable constraints, foreign keys, indexes, and data migrations. Do not edit an already-applied migration; create a new revision instead.
- The API starts successfully with the documented environment variables.
GET /healthreports a healthy database connection.poetry run alembic upgrade headsucceeds on a clean database.- Protected routes reject unauthenticated requests.
- Admin routes reject regular users.
python -m compileall appcompletes without errors.yarn lintcompletes without errors.yarn buildcompletes without errors.- Documentation contains no local secrets or machine-specific URLs.
- The repository does not currently include an automated backend test suite.
- Production reverse-proxy configuration is not included; the Compose
nginxservice expects external configuration files. - A license file has not yet been added.
These are clear follow-up tasks before presenting the project as a production deployment or open-source package.