Skip to main content
These recipes mirror the nestrs mdBook chapter (docs/src/backend-recipes.md) with Mintlify-first layout—each recipe page adds production-oriented CRUD, broker, and event-driven examples (layering, idempotency, outbox, DLQ, multi-tenant filters) and links back to the canonical source.

Recipe A — REST + Prisma

PostgreSQL/MySQL/SQLite, PrismaService, prisma_model!, controllers, REST CRUD.

Recipe B — REST + MongoDB

MongoModule, BSON collections, indexes, upserts, typed _id.

Recipe C — GraphQL + Prisma

async-graphql, schema limits, mutations, CRUD resolvers.

Recipe D — GraphQL + MongoDB

Single-file GraphQL server, MongoService, mutations on BSON docs.

Recipe E — gRPC micro + Prisma

#[micro_routes], JSON-wire gRPC, hybrid HTTP + micro.

Recipe F — Message brokers

NATS, Redis, RabbitMQ, Kafka clients; NestFactory::create_microservice_*.

Recipe G — Event-driven

emit vs send, EventBus, #[on_event], outbox, CQRS hints.

How to use this tab

1

Pick your data plane

Relational SQL → Recipe A or C. Document store → B or D. Service RPC → E, then F/G for brokers and events.
2

Align features in Cargo.toml

Exactly one SQL backend on nestrs-prisma (sqlx-postgres, sqlx-mysql, or sqlx-sqlite). Enable mongo / graphql / microservices* only when needed.
3

Copy bootstrap first

Each recipe page leads with PrismaModule::for_root* or MongoModule::for_root before NestFactory::create::<AppModule>().
TopicWhere
Full prose + every subsection anchorbackend-recipes.md (repo)
Micro transports & JSON wireMicroservices
nestrs-prisma DDL & prisma_model!nestrs-prisma README
CI and local builds often use docs/ mdBook (mdbook build). This Mintlify Recipes tab is curated for onboarding; drift is resolved by linking the repo chapter as source of truth.