Skip to content

Infrastructure

Infrastructure intent selects adapters and runtime topology without changing domain meaning. If no explicit infrastructure section exists, the primary backend uses conservative defaults.

The current infrastructure model supports relational SQL configuration:

Dialect Notes
PostgreSQL Default primary path
MySQL SQL adapter selection
MariaDB SQL adapter selection
SQLite Local or constrained topology
Microsoft SQL Server Supported with an external/proprietary driver requirement

Document databases are a future seam, not a current interchangeable option. A different data paradigm changes more than a connection string.

Backend Intended use
none Default; no cache layer emitted
inmemory Single-process/local cache
redis Shared read-side cache

Configuration includes TTL. Cache is an optimization, not the authority for product state. Generated behavior must define invalidation or acceptable staleness.

The task-queue model can enable Celery workers and select a broker:

  • Redis;
  • RabbitMQ;
  • SQS.

Reactions marked asynchronous run through the worker path. Queue use adds retry, idempotency, dead-letter, observability, and deployment responsibilities.

Infrastructure intent can carry storage choices by area where the generator supports them. The domain remains independent of the adapter; cross-area consistency must reflect real runtime guarantees.

The primary backend can emit:

  • database session and persistence adapters;
  • Alembic setup and migration artifacts;
  • startup migration checks;
  • liveness/readiness behavior;
  • Docker/Compose topology and environment documentation;
  • cache and worker adapters when selected;
  • integration configuration status.

Current managed apps use one Fly machine plus a durable mounted volume per application. This is an operated delivery topology, not a universal infrastructure target. Exported applications can be deployed through another supported environment under the user’s operations.

  • Scale stateless application instances only when sessions/files/cache are shareable.
  • Size database pools across all instances, not per instance in isolation.
  • Use shared object storage before horizontal file-upload scaling.
  • Monitor queue age as well as depth.
  • Treat online migration capacity separately from steady-state request capacity.
  • Capture algorithmic or workload constraints when infrastructure alone cannot solve the problem.

See Incidents and Observability.