.
├── app
│ ├── core - core classes
│ ├── email-templates - email templates
│ ├── models - tortoise models
│ │ ├── user.py
│ │ └── ...
│ ├── routes - api routers
│ │ ├── app_router.py
│ │ ├── auth_router.py
│ │ ├── user_routes.py
│ │ └── ...
│ ├── schemas - pydantic schema
│ │ ├── user_schemas.py
│ │ └── ...
│ ├── utils - utilities
│ └── main.py
├── tests
│ ├── models - model unit tests
│ ├── routes - integration tests
│ └── conftest.py
├── Dockerfile
├── Makefile - build automation
└── README.md
- brew - Package Manager for macOS and Linux
- make - Build automation tool for macOS and Linux
- Python 3.11
- uv Package Manager for python
- Postgres
brew install make
brew install python@3.11
brew install uv
brew install postgresqlInstall postgresql:
# Mac
brew install postgresql
brew services start postgresql
# Linux
sudo apt-get update
sudo apt-get install postgresql
sudo service postgresql startConfigure database:
createuser -s postgres
psql -U postgres -f data/create_superuser.sqlNote: See makefile for build automation commands
Create and activate virtual env:
make venv
source .venv/bin/activateCopy env and add necessary variables:
cp .env.local .envInstall/sync dependencies:
make installRun dev server with live reload:
make devusername: admin@test.com password: Admin12#
Run pytest:
make testRun coverage report:
make coverageNote: Make sure coverage is at least 90%
Check and fix issues before you commit or else pre-commit hook will fail:
make lintTo add a new dependency
uv add <dependency-name>