Skip to main content

Next.js Provider

The Next.js provider (v16) targets Next.js 16.2.3 App Router.

Init command

npx create-next-app@16.2.3 . --typescript --eslint --tailwind --app --src-dir --import-alias "@/*" --yes

Generated file mapping

ConfigGenerated file
models/User.jsonsrc/types/User.ts (TypeScript interface)
models/User.jsonORM schema file (see ORM section below)
routes/Users.jsonGET /api/userssrc/app/api/users/route.ts
routes/Users.jsonGET /api/users/:idsrc/app/api/users/[id]/route.ts
views/LoginPage.jsonpath: /loginsrc/app/login/page.tsx
functions/CreateUser.jsonsrc/lib/functions/CreateUser.ts
voters/ArticleVoter.jsonsrc/lib/voters/ArticleVoter.ts

Versioning

VersionNext.jsRouter
v1616.2.3App Router

Future versions (v17, v18…) will be added without breaking existing projects.

ORM & database integration

Codabra supports multiple ORMs and databases. Both are chosen independently during project creation:

npx create-codabra@latest my-app
# → Choose an ORM: Drizzle ORM (recommended) / Prisma
# → Choose a database: SQLite (default) / PostgreSQL / MySQL

Generated files: src/drizzle/schema.ts and src/lib/db.ts.

cd apps/web
npx drizzle-kit push # push schema to SQLite (creates sqlite.db automatically)
pnpm dev