12. The default backend, end to end
Heads-up: this chapter is a guided tour of the framework's reference app, which lives in the
damatjs/damatmonorepo. You don't need it to build your own app — but reading it is the fastest way to see every pattern in this guide working together in one place.
@damatjs/default is a complete reference app
demonstrating the whole framework: a user module,
file-based routes under /api (/api/posts, /api/users/:userId, /api/workflows) plus a top-level /health,
cross-module links/, a user-onboarding saga workflow, Redis usage, and a
Docker setup. Most patterns in this guide are taken directly from it. Its
README has the full route and feature list.
To explore it, clone the repo (see
Getting started → Option B) and open
backend/default/src/. Then trace one feature end to end across the code
and the matching chapter:
| What to trace | Where it lives | Chapter |
|---|---|---|
The users table definition | src/modules/user/models/ | Defining models |
| The user service & generated CRUD | src/modules/user/service.ts | Modules & services |
GET /api/users/:userId | src/api/routes/users/[userId]/ | Building HTTP APIs |
The user-onboarding saga | src/workflows/ | Workflows |
| The cross-module link | src/links/ | Composing & linking |
If you can follow one row of that table through the code, you understand the framework — everything else is more of the same.