1.8 KiB
1.8 KiB
Vinext Boilerplate
Minimal Next.js web boilerplate with:
- Next.js 16 Pages Router
- React 19
- Prisma 7 + PostgreSQL
@t3-oss/env-nextjsruntime env parsingoxfmtandoxlintvinextfor local dev and Cloudflare-targeted buildswranglerfor Cloudflare Workers deployment
Prerequisites
- Node.js 24+
pnpm10+- PostgreSQL access if you plan to run Prisma queries
Setup
Install dependencies:
pnpm install
Create a local env file:
cp .env.example .env
Sync the sample Prisma schema when your database is ready:
pnpm db:push
Start the app:
pnpm dev
Common scripts
pnpm dev: start the vinext development serverpnpm build: create the production bundle with vinextpnpm start: run the built app locallypnpm deploy: build and deploy to Cloudflare Workerspnpm deploy:dry-run: build the deploy artifact without publishing itpnpm vinext:check: scan for vinext compatibility issuespnpm cf-typegen: generatecloudflare-env.d.tsfromwrangler.jsoncpnpm lint: run Oxfmt checks and Oxlintpnpm format:write: format supported files with Oxfmtpnpm typecheck: run TypeScript checkspnpm db:push: push the Prisma schema to your databasepnpm db:studio: open Prisma Studio
Project layout
src/env.ts: runtime env validation and defaultssrc/server/db.ts: Prisma singleton using the Postgres adapterprisma/schema.prisma: samplePostmodel and Prisma client generatorwrangler.jsonc: Cloudflare Workers runtime configuration
Cloudflare
Authenticate Wrangler before the first deploy:
wrangler login
Then deploy:
pnpm deploy
wrangler.jsonc intentionally does not include an account_id. Supply it through Wrangler login state or environment configuration when you wire the project to a real account.