📚 Drizzle ORM - lightweight ORM compatible with Cloudflare D1 and drizzle-kit to manage schema migrations
👤 OAuth Lucia - Google oAuth sign-in and/or email signup via Resend mailer api, with 4 email templates: reset password, change email, verify email, welcome. Settings and admin panel for users.
☁️ Cloudflare for Svelte - serverless autoscaling API and D1 database, great hosting platform with free tier
🖼️ SvelteKit - full stack interface and API routes framework
🎨 Tailwind CSS + Bits UI + shadcn-svelte - popular UI components which can be AI-generated at v0.dev
📝 formsnap + sveltekit-superforms + zod - form validation
📱 lucide - icons
🛣️ vite-plugin-kit-routes - url routes
🌲 pino - logging
- Install prerequisites Node.js or Bun
curl -fsSL https://bun.sh/install | bash
- Clone to localhost or server
git clone https://github.com/vtempest/docs-stack-starter
mv .env.example .env ; mv wrangler.example.toml wrangler.toml
and set the domain and API keys in.env
- Auth providers, get id/secret from Google
- Set OAuth origin
http://localhost
andhttp://localhost:5173
on local orhttps://domain.com
on server - Set redirect
http://localhost:5173/auth/oauth/google/callback
orhttps://api.domain.com/auth/oauth/google/callback
- For email auth, get API from Resend mailer and verify domain
- Log in with your Cloudflare account by running:
bunx wrangler login
- Create your D1 database via dashboard or with
bunx wrangler d1 create my-db-prod
- Copy the console output database_name and database_id
- Go to
wrangler.toml
and changedatabase_name
anddatabase_id
. - Go to
drizzle.config.ts
and change db name indbName
. - Go to
package.json
and change db name indb:push:*
. - Generate and migrate the schema to dev or prod db:
bun run db:migrate; bun run db:push:dev; bun run db:push:prod
- Develop on local with
bun run dev
- Deploy to prod with
bun run deploy