Verge Kit is a foundation for building full-stack applications with Astro and Cloudflare Workers.

It starts with the pieces most full-stack apps need: server-rendered Astro, D1, Drizzle, Better Auth, email, middleware, Zod validation, Astro Actions, and a plain Tailwind UI base. The project stays close to Astro, Cloudflare, Drizzle, Better Auth, and Tailwind instead of adding a large custom framework layer.

Included

Setup Flow

New projects start with:

npm create vergekit@latest my-app
cd my-app
npm install

Local development uses .dev.vars for local secrets, wrangler.jsonc for committed non-secret Worker configuration, and Wrangler secrets for deployed secret values. Apply D1 migrations before running auth flows, then optionally create a verified user with the admin role with npm run init:admin.

App structure

src/
  actions/       Astro Actions
  auth/          Better Auth setup and route rules
  components/    local Astro UI components
  config/        source-level app and auth policy
  db/            Drizzle schema, clients, and query seams
  email/         providers and auth email templates
  lib/http/      JSON and Zod parsing helpers
  pages/         Astro pages and API routes
  middleware.ts  auth locals and route protection