2 Commits
Author SHA1 Message Date
Daniel Samson ed7b30438e feat: add Docker Compose developer environment with Makefile shortcuts (M4)
- Root docker-compose.yml: backend (python:3.11-slim) + frontend
  (multi-stage node build -> nginx:alpine) on the newzy-network bridge
  network, frontend waits for the backend health check
- Persistent SQLite via bind mount ./data/db -> /app/data/db
- .env / .env.example documenting DATABASE_URL, DEBUG,
  BACKEND_CORS_ORIGINS and FRONTEND_API_URL
- Makefile: dev, stop, restart, build, logs, status, backend-start,
  frontend-start, test, e2e, shell-backend, shell-frontend, clean
- data/.gitignore keeps the data/ structure in git while excluding the
  database; root .gitignore drops the overly broad data/ rule and adds
  docker-compose.override.yml
- backend: .gitignore covers .env.*, Dockerfile sets unbuffered python
  and pre-creates the db volume dir; frontend: new .dockerignore
- README: full Docker setup docs (prerequisites, quick start, services,
  ports, network/storage, env vars, Makefile reference, troubleshooting)
2026-10-30 15:35:08 +00:00
Daniel Samson 9a6f75ebd8 feat: add FastAPI backend with SQLite models and Docker setup
Implement milestone M2 (backend setup):

- FastAPI app factory (core/app.py) with CORS, lifespan table
  creation, and global error handlers using a standardized
  {detail, code, errors?} envelope
- Endpoints: GET /health, GET /api/v1/health, GET /api/v1/version
- SQLAlchemy 2.0 ORM: Article, Author, Category models with
  relationships, unique constraints, and FK pragma for SQLite
- Pydantic v2 schemas (create/update/read) for all models
- Env-driven config (DATABASE_URL, CORS_ORIGINS) + .env.example
- pytest suite (19 tests, ~95% coverage) with per-test SQLite
  databases via fixtures
- Dockerfile (python:3.11-slim) and docker-compose.yml with a
  persistent ./data/db volume and healthcheck
2026-10-30 12:44:54 +00:00