Document model & indexes

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

Model the first journey as collections and documents, decide what is embedded and what is referenced and declare the indexes the journey's queries need.

One option of Database: Document database. The others: Managed Postgres.

Usually comes after: Document database.

Prompt for your AI assistant

Read docs/product/mvp.md. Design the document model for the first journey: the collections, what each document holds, the composite indexes the journey's queries need and what is embedded and what is referenced and why. Write it to docs/data-model.md, declare the indexes in the infrastructure code and add the model's types to the service.

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