Leverage Nitro Dynamic Routing and Runtime Reflection to resolve RESTful endpoints directly from your Drizzle schemas. By bypassing traditional code generation, the API stays synchronized with your database layer—making it natively compatible with LLM Tooling and MCP (Model Context Protocol) agents.
| Method | Endpoint Path | Runtime Logic |
|---|---|---|
| GET | /api/:resource | Dynamic pagination, and search. |
| POST | /api/:resource | Automated Zod-backed payload validation and insertion. |
| GET | /api/:resource/:id | Precision record resolution via schema metadata. |
| PATCH | /api/:resource/:id | Partial updates with strict system-field protection. |
| DELETE | /api/:resource/:id | Validated record removal |
app.config.ts seeding, ensuring multi-instance security.create, update, delete) automatically broadcast events to connected clients.useAutoCrudSSE composable ensures UI state remains strictly consistent with the server database, including computed fields like updatedAt.id, createdAt, updatedAt, deletedAt) are automatically shielded from external mutation by the NAC core.Manage global behavior or per-resource overrides via app.config.ts. This architecture allows the specific App to seamlessly customize.
// app.config.ts - Centralized CRUD Governance
export default defineAppConfig({
crud: {
// Automated Role Seeding on deployment
rolesToSeed: ['moderator', 'customer'],
// Global Runtime Visibility Controls
globalHide: ['updatedAt', 'deletedAt', 'createdBy', 'updatedBy'],
exports: {
pdf: {
globalExclude: ['avatar', 'resetToken'],
resourceExclude: {
users: ['password', 'googleId'],
},
},
excel: {
globalExclude: [],
resourceExclude: {
users: ['password'],
},
},
},
},
})