Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-addi-app

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).

Usage

npm create addi-app
# or: pnpm create addi-app / yarn create addi-app / bun create addi-app

Alternatively, 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.

What you get

  • 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`

Working in the generated app

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 cloudflare

If you selected database, you also need to create the database in Cloudflare:

wrangler d1 create my-app    # add the printed database_id to wrangler.jsonc

Developing this repo

pnpm install
pnpm test    # scaffolds test-app/ (gitignored) with everything enabled

Delete test-app/ before rerunning. Contributions welcome.

License

MIT

About

A SvelteKit starter based on Cloudflare, shadcn and Better-Auth

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages