Tutorial — Build a CRM
Tutorial — build a CRM
Step-by-step guide to building a small CRM with contacts, companies, views, and role gating.
This tutorial builds a minimal CRM from scratch using standards. You define a contact and a company object, relate them, add record views, and gate fields behind roles.
By the end you have:
- Two typed objects (
contact,company) wired through a relation - A working REST API backed by NestJS and Supabase
- A list view and a detail view with inline editing
- Role-based field visibility
- A running example you can clone and extend
Example repository
The finished code lives at apps/docs/examples/crm-tutorial/ inside the monorepo. Clone the repo and follow each chapter to build it step by step, or read the example directly.
Prerequisites
- Node 22+
- pnpm 9+
- A Supabase project (database URL + service role key)
- Meilisearch is optional — full-text search is wired in chapter 3 but the app runs without it
Chapters
- Schema — define objects and register them
- Backend — wire NestJS with the runtime adapter
- Views — build list and detail views
- Permissions — add roles and field-level guards