Examples
Each example is a small, complete app that you can read top to bottom and run.
| Example | Shows | Style |
|---|---|---|
| basic-api | The smallest app: routes, a service, errors | Explicit |
| modular-api | The modular layout: feature modules, controllers, services | Decorators |
| crud-api | Full CRUD with validation, paging, filters, a swappable repository and tests | Decorators |
| auth-api | Sign-in, guards, roles, a request-scoped current user, CORS and security headers | Explicit |
| prisma-api | Prisma ORM 7 with SQLite: a managed client, relations, Prisma errors as HTTP errors | Decorators |
The first four are part of the workspace and run in CI (pnpm examples). From the repository root:
sh
pnpm install
pnpm build
pnpm --filter @avijs/example-crud-api startprisma-api is a standalone app that installs Avi.js from npm; see its README.