feat(cli): prisma + workers, prisma + turso, planetscale (postgres/mysql) support (#567)

This commit is contained in:
Aman Varshney
2025-09-08 12:15:26 +05:30
committed by GitHub
parent 33344d91be
commit cd5d0f0aeb
66 changed files with 1486 additions and 729 deletions

View File

@@ -42,7 +42,7 @@ Cloudflare Workers has specific compatibility requirements:
| Component | Requirement | Reason |
|-----------|-------------|--------|
| Backend | Must be `hono` | Only Hono supports Workers runtime |
| ORM | Must be `drizzle` or `none` | Workers doesn't support Prisma/Mongoose |
| ORM | Must be `drizzle` or `prisma` | Workers supports Drizzle and Prisma; Mongoose is not supported |
| Database | Cannot be `mongodb` | MongoDB requires Prisma/Mongoose |
| Database Setup | Cannot be `docker` | Workers is serverless, no Docker support |
@@ -52,6 +52,9 @@ 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 d1
```
### Backend Presets
@@ -123,8 +126,8 @@ create-better-t-stack --frontend next native-nativewind
| Setup Provider | Required Database | Notes |
|---------------|------------------|-------|
| `turso` | `sqlite` | Distributed SQLite |
| `d1` | `sqlite` | Cloudflare D1 (requires Workers runtime) |
| `turso` | `sqlite` | Distributed SQLite; works with Drizzle and Prisma |
| `d1` | `sqlite` | Cloudflare D1 (requires Workers runtime); works with Drizzle and Prisma |
| `neon` | `postgres` | Serverless PostgreSQL |
| `supabase` | `postgres` | PostgreSQL with additional features |
| `prisma-postgres` | `postgres` | Managed PostgreSQL via Prisma |

View File

@@ -1,30 +0,0 @@
---
title: Compatibility
description: Valid and invalid combinations across frontend, backend, runtime, database, and addons
---
## Rules
- **Convex backend**: Sets database, ORM, and API to `none`; auth to `clerk` (if compatible frontends) or `none`
- **Backend `none`**: Forces API, ORM, database, authentication, and runtime to `none`; disables examples
- **Frontend `none`**: Backend-only project; PWA/Tauri/examples may be disabled
- **API `none`**: No tRPC/oRPC setup; use framework-native APIs
- **Database `none`**: Disables ORM and Better-Auth (but allows Clerk with Convex)
- **ORM `none`**: No ORM setup; manage DB manually
- **Runtime `none`**: Only with Convex backend or when backend is `none`
- **Auth `clerk`**: Only available with Convex backend and compatible frontends
## Cloudflare Workers
- Backend: `hono` only
- Database: `sqlite` with Cloudflare D1
- ORM: `drizzle` (or none)
- Not compatible with MongoDB
## Framework Notes
- SvelteKit, Nuxt, and SolidJS frontends are only compatible with `orpc` API layer
- PWA addon requires a web frontend: TanStack Router, React Router, Next.js, or SolidJS
- Tauri addon requires React (TanStack Router/React Router), Nuxt, SvelteKit, SolidJS, or Next.js
- AI example is not compatible with Elysia backend or SolidJS frontend

View File

@@ -7,7 +7,6 @@
"bts-config",
"analytics",
"contributing",
"compatibility",
"faq"
]
}