Tutorial Presentation Playbook
Use this when you need to present Minima.js to developers quickly and clearly.
30-Second Pitch
Minima.js is a backend framework focused on fast iteration with strong structure:
- modular architecture by default (
module.tsdiscovery) - low boilerplate route wiring (
routes: Routes) - first-class runtime hooks for request, error, and lifespan behavior
- composable plugins for auth, CORS, OpenAPI, and operations
5-Minute Live Demo Flow
Show
src/module.tsExplain: global plugins + one place for app-wide behavior.Show
src/workspaces/module.tsExplain: handlers + routes + guards in one module.Run auth flow
POST /auth/registerthenPOST /auth/login.Run protected route
GET /workspaceswith and withoutAuthorizationheader.Trigger controlled error
GET /workspaces/999and show consistent error JSON.Open generated spec
GET /openapi.jsonto show docs are code-driven.
What Developers Usually Ask
“How much boilerplate do I need?”
Very little. Most features can be built by adding a module folder with module.ts, meta, and routes.
“Can I enforce organization-wide behavior?”
Yes. Put it in root meta.plugins (hook("request"), hook("error"), CORS, shutdown, etc.).
“How do nested resources work?”
Use meta.prefix for dynamic/nested paths like /workspaces/:workspaceId/boards.
“How do I keep auth and permissions clean?”
Use composable guards (authenticated, workspaceMember, workspaceAdmin, boardMember) and run them at module or handler scope.
Talking Points That Land Well
- “Folder structure is API structure unless you override with
meta.prefix.” - “No controller ceremony required; route map is explicit and type-safe.”
- “Hooks let you keep cross-cutting concerns out of business logic.”
- “Error shape can be standardized in one place (
HttpError.toJSON).”
Recommended Demo Commands
# login
curl -X POST http://localhost:3000/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"alice@example.com","password":"secret123"}'
# protected route
curl http://localhost:3000/workspaces \
-H "Authorization: Bearer <ACCESS_TOKEN>"
# docs
curl http://localhost:3000/openapi.json | headMistakes to Avoid While Presenting
- Leading with abstractions before showing one real module.
- Showing too many files before the first successful request.
- Skipping failure cases; error behavior is one of the strongest trust signals.