How to Set Up Local Development¶
Configure the example application development environment.
Prerequisites¶
- Docker and Docker Compose
- Make
- Python 3.11+
- Terraform (for OIDC setup)
- uv (Python package manager)
Quick Setup¶
This starts all services and configures OIDC automatically.
Manual Setup¶
1. Start Infrastructure¶
Wait ~15 seconds for services to initialize.
2. Run Database Migrations¶
3. Configure OIDC¶
4. Verify Services¶
Service URLs¶
| Service | URL | Description |
|---|---|---|
| Webapp | http://localhost:8000 | Application |
| Authentik | http://authentik-server:9000 | OIDC admin |
| Topaz | http://localhost:8282 | Authorization API |
| Mock Location | http://localhost:8001 | Geographic API |
Development Workflow¶
Make Changes to Webapp¶
# Edit code in webapp/app/
# Rebuild and restart
docker-compose build webapp
docker-compose up -d webapp
Modify Policies¶
View Logs¶
Run Tests¶
# Unit tests
cd webapp
uv run pytest tests/ -v
# Integration tests
cd integration-tests
uv run pytest tests/ -v
Useful Commands¶
# Restart all
make restart
# Clean restart
make clean && make setup-full
# Database shell
make db-shell
# Authentik admin password
make auth-password
See Also¶
- Setup Tutorial - Complete setup guide
- Authentik Setup - OIDC configuration details