2023-10-10 14:33:11 -04:00
|
|
|
# Backend Technical Write Up
|
2024-01-24 21:09:15 -05:00
|
|
|
|
2024-03-03 00:57:14 -05:00
|
|
|
## Setup
|
|
|
|
|
|
|
|
- Install `pdm`
|
|
|
|
- Install dependencies with `pdm sync`
|
|
|
|
- Run development backend with `pdm run dev`
|
|
|
|
- Run tests with `pdm run test`
|
|
|
|
|
|
|
|
### Setup for Developmentk
|
|
|
|
|
|
|
|
- run `eval $(pdm venv activate in-project)` to activate the virtual env.
|
|
|
|
|
2024-01-24 21:09:15 -05:00
|
|
|
## Structure
|
|
|
|
|
|
|
|
- Use FastAPI's `router` to organize different API routes
|
2024-03-03 00:23:13 -05:00
|
|
|
- Separate folder for PostgreSQL migrations: Might need a better migration tool. Right now, `alembic` only works with SQLalchemy.
|
|
|
|
- Use Pydantic data validation always
|
|
|
|
|
|
|
|
## TODO list
|
|
|
|
- [ ] Setup Docker image and k8s for the API: 3 containers: API, Redis and PostgreSQL.
|