Data access layer & seed data

A step of the Cloud application tree on Gradus, in the Data & storage area: DB, cache, queues.

Put every query behind one data access layer, seed the database with the data the first journey needs and persist the journey's first write.

Usually comes after: Choose a database, any option of Database.

Leads to: Caching layer, Object storage, Message queue, Backups & recovery, Indexing & query tuning, Where the frontend lives.

Prompt for your AI assistant

Add a data access layer to this service so that no handler talks to the database directly: one module per aggregate from docs/product/mvp.md with typed read and write functions. Add a seed script that fills a fresh database with the data the first journey needs, run it in the local setup and in CI and make the first journey's first write go through the new layer end to end.

This is https://gradus.kazet.blog/tree/cloud-application/step/data-access-layer as plain HTML. In a browser the page also lets you mark the step forged and copy a message for your AI assistant.