A full-stack application template powered by the vinext framework, deployed to Cloudflare Workers.
- Framework: vinext (Vite-based Next.js-compatible implementation, App Router)
- Build Tool: Vite 8
- Runtime: React 19, TypeScript
- Styling: Tailwind CSS v4
- Font: Geist (via next/font/google compatibility layer)
- Package Manager: bun
- Deployment Target: Cloudflare Workers (wrangler)
Install dependencies:
bun installStart the development server:
bun devOpen http://localhost:3000 to view the page.
| Command | Description |
|---|---|
bun dev |
Start the development server |
bun build |
Build for production |
bun start |
Preview the production build locally |
bun lint |
Run code linting |
bun check |
Run linter in CI mode (no auto-fix) |
bun deploy |
Deploy to Cloudflare Workers |
- Log in to Cloudflare:
bun wrangler login- Deploy:
bun deployFor non-interactive deployments (e.g., CI environments), set the CLOUDFLARE_API_TOKEN environment variable instead of logging in.
Deployment configuration is located in wrangler.jsonc.
The project ships with two pre-configured files — both contain commented-out examples you can uncomment and customize:
wrangler.jsonc— Cloudflare Workers deployment config. Includes examples for custom domains, environment variables, bindings (KV, D1, R2), and multi-environment setup.next.config.ts— Application-level config (vinext-compatible subset of Next.js config). Includes examples for base path, redirects, rewrites, custom headers, and image optimization.
To bind a custom domain, configure routes in wrangler.jsonc:
Setting custom_domain: true lets Cloudflare manage DNS automatically. For production, set workers_dev: false to disable the default *.workers.dev subdomain.
- Non-sensitive values — define in the
varssection ofwrangler.jsonc. - Secrets — use the CLI:
wrangler secret put <KEY>. .envfiles — Next.js-style.env/.env.localfiles are also supported. Variables prefixed withNEXT_PUBLIC_are exposed to the client bundle.
Uncomment the relevant binding sections in wrangler.jsonc to attach storage resources. In your application code, access them via the Workers runtime API:
import { env } from "cloudflare:workers";
const value = await env.MY_KV.get("key");See the comments in wrangler.jsonc for the full list of supported binding types.
.
├── app/ # Pages and layouts (App Router convention)
│ ├── layout.tsx
│ ├── page.tsx
│ └── globals.css
├── public/ # Static assets
├── vite.config.ts
└── wrangler.jsonc