24
CodeDev system / System reference

CodeDev system architecture

How the current CodeDev by Edward website is structured: Flask application factory, blueprints, templates, database, media storage, and public/admin boundaries.

codedevarchitectureflasksqlalchemyblueprints

01Application shape

CodeDev is a Flask modular-monolith application. create_app() loads configuration, validates production requirements, initializes extensions, registers authentication/admin/public blueprints, installs security headers, and exposes shared template helpers.

textHigh-level architecture
Browser
  ├─ Public routes → projects / contact / docs / API
  └─ Private control route
       ├─ Authentication + MFA
       └─ Superadmin / editor administration

Flask application
  ├─ SQLAlchemy → PostgreSQL
  ├─ Flask-Limiter → Redis/Valkey or single-worker memory backend
  ├─ Cloudinary → durable project images
  └─ Alembic / Flask-Migrate → schema history

02Important modules

  • codedev/public.py: public site, project catalog/API, contact, analytics tracking, health/SEO routes.
  • codedev/auth.py: password, MFA/TOTP, session establishment and authentication flows.
  • codedev/admin.py: database-backed project, release, media, settings, access, analytics, and audit controls.
  • codedev/models.py: SQLAlchemy persistence model.
  • codedev/media_storage.py: Cloudinary/local media abstraction and validation.
  • codedev/security.py: authorization and security helpers.

03Design principle

The system keeps public content and private administration in the same application while enforcing a strong boundary through the hidden admin route, authentication, authorization, CSRF, secure sessions, and audit logging.