Getting Started

Your First Collection


Your First Collection

Collections are the building blocks of your CodeNx application. They map directly to database tables but include rich metadata for the UI and AI.

Defining a Collection


1. Name: Singular (e.g., "Product")
2. Fields: Add fields like "Title", "Price", and "Stock".
3. Validations: Add Zod-powered validations (e.g., price > 0).

Generator Output


When you generate, CodeNx creates:
- Drizzle schema
- Zod validators
- Hono API routes
- Svelte CRUD pages