Build Your Backend
Build Your Backend
Define your data schema, rules, and business logic — codegen generates the typed runtime.
QUESTPIE backends follow a simple flow: define schema → run codegen → get typed runtime.
Schema Files Codegen Output
├── collections/*.ts → ├── Database tables (Drizzle)
├── globals/*.ts → ├── CRUD API endpoints
├── routes/*.ts → ├── Custom app routes
├── jobs/*.ts → ├── Type-safe AppContext
├── services/*.ts → └── Client SDK types
└── hooks/access/validationSections
Data Modeling
Define your collections, globals, fields, and relations. Fields are the single source of truth — they drive database schema, API validation, query operators, and UI rendering.
Rules
Add validation, access control, and lifecycle hooks to your collections. Control who can do what, when, and how.
Business Logic
Write server routes (JSON or raw HTTP), background jobs, and shared services. All handlers receive typed context with DI.
Architecture
Understand file conventions, the plugin system, modules, codegen, and the CLI.