Scaffolds an addi-app: a SvelteKit project that deploys to Cloudflare Workers, styled with Tailwind CSS v4 and shadcn-svelte, with optional Drizzle ORM on D1, Better Auth, and a couple of utility libraries (runed, neverthrow).
npm create addi-app
# or: pnpm create addi-app / yarn create addi-app / bun create addi-appAlternatively, you may use flags to automate app creation:
npm create addi-app my-app -- --database --auth --useful| Flag | Effect |
|---|---|
--database / --no-database |
Drizzle ORM on Cloudflare D1 |
--auth / --no-auth |
Better Auth (requires the database) |
--useful / --no-useful |
runed + neverthrow |
--debug |
Print output from every underlying command |
--help, -h |
Usage |
Requires Node 20.19 or newer.
- SvelteKit w/ Cloudflare Adapter
- Tailwind CSS v4 with the typography plugin
- shadcn-svelte set up with the amethyst-haze theme.
- ESLint and Prettier
- With
--database: Drizzle ORM with Cloudflare D1 - With
--auth: Better Auth backed by D1
my-app/
├── src/
│ ├── lib/
│ │ ├── components/ui/ shadcn-svelte components
│ │ └── server/ db/ and auth.ts, when enabled
│ ├── routes/
│ ├── hooks.server.ts
│ └── app.d.ts
├── vite.config.ts SvelteKit + adapter config lives here
├── wrangler.jsonc
├── drizzle.config.ts only with --database
└── worker-configuration.d.ts generated by `wrangler types`
npm run dev # vite dev server
npm run check # svelte-check
npm run lint # prettier + eslint
npm run preview # build, then wrangler dev
pnpm run db:gen # requires database, generates migrations
pnpm run db:migrate # requires database, migrates locally
pnpm run db:migrate:preview # requires database, migrates to cf preview environment
pnpm run db:migrate:remote # requires database, migrates to cf production environment
pnpm run cf:gen # generates cloudflare types
pnpm run cf:deploy # deploys to cloudflareIf you selected database, you also need to create the database in Cloudflare:
wrangler d1 create my-app # add the printed database_id to wrangler.jsoncpnpm install
pnpm test # scaffolds test-app/ (gitignored) with everything enabledDelete test-app/ before rerunning. Contributions welcome.