Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A production-oriented SvelteKit starter with Svelte 5, Drizzle ORM, Turso SQLite, Better Auth GitHub OAuth, Tailwind CSS 4, and shadcn-svelte UI.
aMaDrOfSvelte is a production-oriented SvelteKit starter template that ships with a real auth/data/UI baseline: Better Auth with GitHub OAuth, Drizzle ORM on Turso/libSQL, Tailwind CSS 4, and shadcn-svelte components.
A full-stack SvelteKit (Svelte 5) starter template that removes setup churn by providing a pre-integrated stack: Better Auth for GitHub OAuth, Drizzle ORM against Turso/libSQL, Tailwind CSS 4 with shadcn-svelte UI primitives, and Vite PWA support. It runs on Node 20 via the Vercel adapter and includes Bun-first scripts for check, lint, test, and build. The repo is maintained as a small, decisive template for developers launching production SvelteKit apps.
src/lib/auth-client.ts, src/lib/server/auth.ts); hooks.server.ts hydrates the session into event.locals, and dashboard route protection redirects unauthenticated users.drizzle-orm and @libsql/client; schema lives in src/lib/server/db/schema.ts; migrations via drizzle-kit scripts (db:generate, db:push, db:migrate, db:studio).tailwind-variants and bits-ui; a src/lib/components/ui/ directory holds reusable UI primitives, and a dedicated /components route acts as an organized UI playground.vite-plugin-pwa and workbox-window with a src/pwa.ts helper for service worker registration; includes an PWAInstallPrompt.svelte component.@sveltejs/adapter-vercel configured with nodejs20.x runtime, so the template deploys directly to Vercel serverless functions.vitest and @testing-library/svelte are set up; bun run test:run executes the test suite once..env, run bun run db:push, and the template handles the rest — including a dedicated sign-in page at /auth and redirect logic for authenticated vs. signed-out users./dashboard route is guarded in +page.server.ts and redirects unauthenticated visitors to /; the navbar and auth-utils.ts expose login/logout actions.src/lib/components/ui/ directory and /components playground let you copy, modify, and compose shadcn-svelte-style primitives with Tailwind CSS 4.Clone the repo, install dependencies with bun install, copy .env.example to .env, and fill in the required variables: DATABASE_URL, DATABASE_AUTH_TOKEN, BETTER_AUTH_SECRET, BETTER_AUTH_URL, GITHUB_CLIENT_ID, and GITHUB_CLIENT_SECRET. Then run bun run db:push to create the schema, bun run dev to start the development server, and bun run check, bun run lint, bun run test:run, and bun run build as a pre-commit validation pipeline.
Yes, the template repository is public on GitHub; you only pay for the services you integrate with, such as Turso, Vercel, or GitHub.
The .env.example file lists six required variables: DATABASE_URL, DATABASE_AUTH_TOKEN, BETTER_AUTH_SECRET, BETTER_AUTH_URL, GITHUB_CLIENT_ID, and GITHUB_CLIENT_SECRET. Set them before running bun run db:push or bun run dev.
Create a GitHub OAuth app with homepage URL http://localhost:5173 and callback URL http://localhost:5173/api/auth/callback/github. Paste the generated client ID and secret into the .env file under GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET.
It uses SQLite via Turso/libSQL, accessed through Drizzle ORM. The @libsql/client package connects to a libSQL URL, and drizzle-kit provides db:generate, db:push, db:migrate, and db:studio scripts.
Yes, it includes vite-plugin-pwa and workbox-window with a src/pwa.ts helper, plus a PWAInstallPrompt.svelte component for install prompts.
Run bun run check (Svelte and TypeScript checks), bun run lint (Prettier), bun run test:run (Vitest), and bun run build (production build) as a pre-commit validation sequence.
