Note
This is a WORK IN PROGRESS.
Biztro is a mobile-first, server-first Next.js application for creating, editing and publishing digital menus. It uses a modern TypeScript + React stack with Prisma for persistence and Tailwind for styling.
- Next.js (App Router) + TypeScript
- React 19 (server components preferred)
- Tailwind CSS + tailwindcss-animate
- Shadcn UI + Radix UI primitives
- Prisma (LibSQL adapter) — Turso used for local/dev
- Authentication: Better-auth
- Server actions: next-safe-action
- Forms & validation: React Hook Form + Zod
- Data caching: @tanstack/react-query
- Analytics & monitoring: PostHog + Sentry
- File uploads: Uppy (S3 / R2 adapters)
- Payments: Stripe
package.json— scripts and dependency listsrc/env.mjs— environment schema and required variablesprisma.config.ts— Prisma adapter configprisma/schema.prisma— database schemadocs/deployment/subdomain-routing.md— Cloudflare + Vercel host-based subdomain deployment guideAGENTS.md— repo conventions and agent rulessrc/app/config.ts— application limits and defaults
Follow these steps to configure and run the project locally.
- Install dependencies
npm install- Generate Prisma client
Lifecycle scripts run prisma generate automatically, but you can run it manually:
npm run predev
# or
npx prisma generate- Configure environment variables
- Create a
.envfile at the project root (or set env vars in your shell). The required variables are validated insrc/env.mjs. - Important variables include Turso/LibSQL URL and keys, R2 credentials, Stripe keys, Better-auth keys, and analytics/Sentry keys.
- Start a local dev database
npm run db:devThis starts a local Turso development database using local.db.
- Start the dev server
npm run dev- Common scripts
npm run dev— start dev servernpm run build— production buildnpm run start— start production servernpm run prisma:migrate— apply Prisma migrations (deploy)npm run db:dev— start local Turso dev DBnpm run email— run email dev toolingnpm run build:content— build Contentlayer contentnpm run stripe:listen— forward Stripe webhooks to local server
- Prefer React Server Components and minimize
use clientscopes. - Use React Hook Form + Zod for forms and validation.
- URL search state is managed with
nuqs(seesrc/app/providers.tsx). - Auth is implemented with
better-auth; middleware lives insrc/proxy.ts. - Prisma uses the LibSQL adapter configured in
prisma.config.tsand migrations live underprisma/migrations.
- Host-based public menu URLs (
https://slug.biztro.co) are documented indocs/deployment/subdomain-routing.md. - The current production approach uses Cloudflare wildcard DNS + TLS and a Cloudflare Worker proxying to Vercel.
For contributor guidance and agent rules see AGENTS.md.