FastAPI + SQLAlchemy backend implementing payroll automation requirements:
- JWT admin auth
- Rep and lead CRUD
- Timestamped lead status history
- Configurable default bonus rules and rep overrides
- Pay period management
- Payroll run engine (
POST /payroll/run/{pay_period_id}) - Payroll summary and CSV export
- Conversion analytics report
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadPOST /auth/registerPOST /auth/loginPOST/GET/PUT/DELETE /repsPOST/GET /leadsPOST /statusesPOST /leads/statusPOST /bonus-rulesPOST /bonus-overridesPOST /pay-periodsPOST /payroll/run/{pay_period_id}GET /payroll/{pay_period_id}GET /payroll/{pay_period_id}/exportGET /reports/conversion
- Use RDS Postgres and set
DATABASE_URL - Deploy API container to EC2 via Docker/Nginx reverse proxy
- Terminate TLS with Let's Encrypt certificates on Nginx
- CI/CD can build/push image and trigger EC2 deploy via GitHub Actions SSH