Commit graph

7 commits

Author SHA1 Message Date
ZTatman
6ec02adf77 fix(web): fix typo in database type_annotation_map dict 2026-04-24 15:44:12 -04:00
ZTatman
c983a9a480 feat(web): add FastAPI service with async SQLAlchemy and Docker setup
- Add Grant model with proper typing (uuid.UUID, timezone-aware datetime)
- Add DB enum for grant_type to enforce valid values at database level
- Configure SQLAlchemy Base with datetime timezone mapping
- Harden Dockerfile: pin uv version, non-root user, security env vars
- Update docker-compose with correct healthcheck database name
- Add default database_url for Docker Compose deployment
- Add PYTHONUNBUFFERED and PYTHONDONTWRITEBYTECODE env vars
- Clean up .gitignore (merged into root)
2026-04-24 14:30:49 -04:00
ZTatman
5187fd8de9 Organize docs and examples
- Centralize examples in /examples folder
- Fix README broken reference to docker-compose.example.yml
- Rename design docs (remove date prefixes)
2026-04-24 13:39:00 -04:00
ZTatman
72c3bc8fbe Update Docker setup for uv best practices
- Remove obsolete docker-compose.example.yml (replaced by root docker-compose.yml)
- Update .dockerignore with Python/uv exclusions (web/.venv, uv.lock, *.pyc)
- Improve web/Dockerfile per uv docs (UV_NO_DEV=1, --no-cache, /bin/ paths)
2026-04-24 13:35:05 -04:00
ZTatman
dcf60f4082 Add FastAPI lifespan pattern with async SQLAlchemy and Docker setup
- Move get_db to main.py for cleaner separation of concerns
- Remove engine/sessionmaker from database.py (keep only Base class)
- Fix config.py: add +asyncpg to database_url, remove @dataclass
- Add lifespan context manager for engine lifecycle
- Add docker-compose.yml for web + postgres services
- Add web/Dockerfile for containerized FastAPI app
- Add web/.env.example as environment template
2026-04-24 13:27:58 -04:00
ZTatman
36c6231266 Add FastAPI setup with async SQLAlchemy and Grant model
- Add config.py with pydantic-settings for env configuration
- Add database.py with async SQLAlchemy (asyncpg driver)
- Add Grant model with id, token, timestamps, and grant_type
- Use Literal[public, private] for type-safe enum storage
- Add routes/links.py with Pydantic request/response models
- Update pyproject.toml dependencies
2026-04-23 17:20:16 -04:00
ZTatman
2a9efd3e3c Add Python web project with FastAPI 2026-04-19 18:58:38 -04:00