Skip to content

Version n20260227

Choose a tag to compare

@vthorsteinsson vthorsteinsson released this 27 Feb 15:28
· 98 commits to master since this release

Dual-backend database architecture (NDB + PostgreSQL)

Major architectural milestone: the database layer now supports both Google Cloud NDB (Datastore) and PostgreSQL, selectable at runtime via the DATABASE_BACKEND environment variable.

Highlights

  • Protocol-based database abstraction (src/db/): backend-agnostic protocols with NDB and PostgreSQL repository implementations
  • Backward-compatible: NDB remains the default backend; App Engine deployments continue to work with no configuration changes
  • skrafldb.py refactored into a thin facade that imports from skrafldb_ndb.py (original) or skrafldb_pg.py (PostgreSQL) based on DATABASE_BACKEND
  • PostgreSQL backend: SQLAlchemy ORM models, connection pooling, request-scoped session/transaction management
  • Comprehensive test suite: repository tests (tests/db/) and API end-to-end tests (tests/api_e2e/) covering both backends
  • Docker local development: docker-compose.local.yml for PostgreSQL + Redis setup
  • Credentials consolidation: moved under credentials/{PROJECT_ID}/
  • Separated requirements: requirements.txt (App Engine) and requirements-pg.txt (Docker/PostgreSQL)
  • Transition page update: simplified Málstaður transition page