The database URL and the CORS origins are fixed in code, and python-dotenv is listed in requirements.txt but nothing under app/ reads the environment.
app/core/database.py: DATABASE_URL = "sqlite:///./expenses.db". This path is relative to the working directory, so the location of the DB file depends on where uvicorn is started. docker-compose.yml works around it with working_dir: /data, which is easy to miss. Starting the API from a different directory quietly creates a second, empty database.
app/main.py: the allowed origins are hard-coded as well, so deploying the frontend somewhere new means editing code.
Suggested fix: a small settings module that reads DATABASE_URL and CORS_ORIGINS from the environment, with the current values as defaults (and use python-dotenv or drop it from the requirements). It would also make the PostgreSQL deployment profile from the README's future work a config change rather than a code change.
The database URL and the CORS origins are fixed in code, and
python-dotenvis listed inrequirements.txtbut nothing underapp/reads the environment.app/core/database.py:DATABASE_URL = "sqlite:///./expenses.db". This path is relative to the working directory, so the location of the DB file depends on where uvicorn is started.docker-compose.ymlworks around it withworking_dir: /data, which is easy to miss. Starting the API from a different directory quietly creates a second, empty database.app/main.py: the allowed origins are hard-coded as well, so deploying the frontend somewhere new means editing code.Suggested fix: a small settings module that reads
DATABASE_URLandCORS_ORIGINSfrom the environment, with the current values as defaults (and usepython-dotenvor drop it from the requirements). It would also make the PostgreSQL deployment profile from the README's future work a config change rather than a code change.