Compatibility Rules
Understanding compatibility rules and restrictions between different CLI options
The CLI validates option combinations to ensure generated projects work correctly. Here are the key compatibility rules and restrictions.
| Database | Compatible ORMs | Notes |
|---|---|---|
sqlite | drizzle, prisma | Lightweight, file-based database |
postgres | drizzle, prisma | Advanced relational database |
mysql | drizzle, prisma | Traditional relational database |
mongodb | mongoose, prisma | Document database, requires specific ORMs |
none | none | No database setup |
# ❌ Invalid - MongoDB with Drizzle
create-better-t-stack --database mongodb --orm drizzle
# ✅ Valid - MongoDB with Mongoose
create-better-t-stack --database mongodb --orm mongooseCloudflare Workers has specific compatibility requirements:
| Component | Requirement | Reason |
|---|---|---|
| Backend | Must be hono | Only Hono supports Workers runtime |
| ORM | If DB is used, use drizzle or prisma | Mongoose is MongoDB-only and MongoDB is not workers-compatible |
| Database | Cannot be mongodb | MongoDB is not compatible with Workers runtime |
| Database Setup | Cannot be docker | Workers is serverless, no Docker support |
# ❌ Invalid - Workers with Express
create-better-t-stack --runtime workers --backend express
# ✅ Valid - Workers with Hono
create-better-t-stack --runtime workers --backend hono --database sqlite --orm drizzle --db-setup d1
# ✅ Also valid - Workers with Prisma (D1)
create-better-t-stack --runtime workers --backend hono --database sqlite --orm prisma --db-setup d1When using --backend convex, these constraints apply:
--runtime none--database none (Convex provides database)--orm none (Convex provides data layer)--api none (Convex provides API)--db-setup none (Convex manages hosting)--server-deploy nonebetter-auth, clerk, or none depending frontend compatibilityNote: Convex supports Clerk authentication with compatible frontends (React frameworks, Next.js, TanStack Start, and native frameworks). Nuxt, Svelte, Solid, and Astro are not compatible with Clerk.
Better Auth with Convex: supported frontends are react-router, tanstack-router, tanstack-start, next, native-bare, native-uniwind, and native-unistyles. Nuxt, Svelte, Solid, and Astro are not supported with Convex Better Auth.
When using --backend none, the following options are automatically set:
--auth none (No backend for auth)--database none (No backend for database)--orm none (No database)--api none (No backend for API)--runtime none (No backend to run)--db-setup none (No database to host)--examples none (Examples require backend)| Frontend | tRPC Support | oRPC Support | Notes |
|---|---|---|---|
tanstack-router | ✅ | ✅ | Full support |
react-router | ✅ | ✅ | Full support |
tanstack-start | ✅ | ✅ | Full support |
next | ✅ | ✅ | Full support |
nuxt | ❌ | ✅ | tRPC not supported |
svelte | ❌ | ✅ | tRPC not supported |
solid | ❌ | ✅ | Solid; tRPC not supported |
astro | ❌ | ✅ | tRPC not supported |
| Native frameworks | ✅ | ✅ | Full support |
# ❌ Invalid - Nuxt with tRPC
create-better-t-stack --frontend nuxt --api trpc
# ✅ Valid - Nuxt with oRPC
create-better-t-stack --frontend nuxt --api orpc# ❌ Invalid - Multiple web frontends
create-better-t-stack --frontend next tanstack-router
# ✅ Valid - Web + native
create-better-t-stack --frontend next native-uniwind| Setup Provider | Required Database | Notes |
|---|---|---|
turso | sqlite | Distributed SQLite; works with Drizzle and Prisma |
d1 | sqlite | Cloudflare D1; works with Drizzle and Prisma on Cloudflare Workers or supported self-hosted Cloudflare frontends |
neon | postgres | Serverless PostgreSQL |
supabase | postgres | PostgreSQL with additional features |
prisma-postgres | postgres | Managed PostgreSQL via Prisma |
planetscale | mysql, postgres | PlanetScale serverless database |
mongodb-atlas | mongodb | Managed MongoDB |
docker | postgres, mysql, mongodb | Not compatible with sqlite or Workers |
--database sqlite--backend hono --runtime workers --server-deploy cloudflare--backend self --web-deploy cloudflare--backend self, D1 is supported on next, tanstack-start, nuxt, svelte, solid, and astro--backend self, frontend API compatibility still applies: nuxt, svelte, solid, and astro require --api orpc or --api nonesqlite (file-based database)workers runtime (serverless environment)tanstack-router, react-router, next, solidThe TanStack Router PWA caches its application shell for offline reloads. Solid, React Router, and Next.js register a service worker and show a cached offline page when a server-rendered page cannot be reached. Authenticated pages and API responses are not cached. Test installation and offline behavior against a production build served over HTTPS (or localhost), rather than relying on the development server.
tanstack-router, react-router, tanstack-start, next, nuxt, svelte, astrotanstack-start, next, nuxt, svelte, and astro need static/export configuration before packaging--backend self, because fullstack self backends emit server routes inside apps/webtanstack-router, react-router, tanstack-start, next, nuxt, svelte, astroapps/desktop shell that loads apps/web during development and bundles its static build output for distributiontanstack-start, next, nuxt, svelte, and astro need static/export configuration before packaging--backend self, because fullstack self backends emit server routes inside apps/webnx, turborepo, and vite-plus are mutually exclusive — only one can be selected per project# ❌ Invalid - two task runners
create-better-t-stack --addons turborepo nx
# ✅ Valid - a single task runner
create-better-t-stack --addons turborepo--web-deploy cloudflare, --web-deploy docker, and --web-deploy vercel require a web frontend--server-deploy cloudflare requires --runtime workers with --backend hono--server-deploy docker and --server-deploy vercel require --runtime bun or --runtime node--server-deploy is not used for --backend self, because fullstack backends deploy with the web appBetter-Auth authentication requires:
none)--backend convex: requires react-router, tanstack-router, tanstack-start, next, or a native Expo frontendClerk authentication requires:
--backend self) support with Next.js or TanStack StartPolar payments require:
# ✅ Valid - Better-Auth without database
create-better-t-stack --auth better-auth --database none
# ✅ Valid - Better-Auth with full stack
create-better-t-stack --auth better-auth --database postgres --orm drizzle --backend hono
# ✅ Valid - Clerk with Hono
create-better-t-stack --auth clerk --backend hono --frontend tanstack-router
# ✅ Valid - Clerk with fullstack Next.js
create-better-t-stack --auth clerk --backend self --frontend next
# ❌ Invalid - Clerk with Astro
create-better-t-stack --auth clerk --backend self --frontend astrotrpc or orpc) for non-Convex backends--backend none--frontend solid--frontend astro--backend convex, Nuxt and Svelte frontends are not supported# Fix by using MongoDB
create-better-t-stack --database mongodb --orm mongoose# Fix by using Hono
create-better-t-stack --runtime workers --backend hono# Fix by choosing one web framework
create-better-t-stack --frontend tanstack-router# Fix by using Better-Auth
create-better-t-stack --payments polar --auth better-auth
# Or use Clerk without Polar payments
create-better-t-stack --auth clerk --backend hono --frontend tanstack-routerThe CLI validates compatibility in this order:
Understanding these rules helps you create valid configurations and troubleshoot issues when the CLI reports compatibility errors.