Because let's face it - you're tired of spending weeks configuring your project instead of actually building stuff. This isn't just another starter template; it's your ticket to skipping the boring parts and getting straight to the fun.
Unit Tests with Vitest
(because "it works on my machine" doesn't cut it anymore)Integration Tests
(because sometimes components need couples therapy)E2E Tests with Cucumber.js
(because robots should click buttons for you)ESLint
: Because semicolons matter (or do they?)Prettier
: Because tabs vs. spaces wars are so last decadeHusky
: Catches your mistakes before your colleagues doGitHub Dependabot
: Like having a robot butler for your dependenciespre-commit
: Makes sure your code doesn't look like it was written at 3 AMpre-push
: Ensures you're not pushing broken code (you're welcome).
βββ cucumber.js # Cucumber.js configuration for E2E testing
βββ drizzle.config.ts # Configuration for Drizzle ORM
βββ eslint.config.js # ESLint configuration
βββ .github # Github
β βββ dependabot.yml # CI: Dependabot configuration
β βββ workflows # Github actions
βββ .husky # Git hooks (pre-commit, pre-push)
βββ LICENSE # License file
βββ package.json # Project metadata and dependencies
βββ postcss.config.js # PostCSS configuration for Tailwind
βββ svelte.config.js # SvelteKit configuration
βββ tailwind.config.ts # TailwindCSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
βββ src # Where the magic happens
β βββ app.css # Global styles
β βββ app.html # The HTML file you'll probably never touch
β βββ lib # Shared library
β β βββ server/data # Database and schema management
β β βββ migrations # SQL migration files
β β βββ schema # Drizzle ORM schema definitions
β βββ routes # Because URLs need homes too
β βββ +layout.svelte # Root layout
β βββ +page.svelte # Home page
βββ static # For stuff that doesn't need to be cool
βββ tests # Proof that your code actually works
β βββ e2e # End-to-end tests (Cucumber.js)
β βββ integration # Integration tests (Vitest)
β βββ unit # Unit tests (Vitest)
# Clone this bad boy
git clone https://github.com/mochams/svelte-drizzle-template.git
# Install dependencies (and pray to the npm gods)
npm install
# Copy env vars (the fun part begins)
cp .env.example .env
# Start the dev server
npm run dev
Why Drizzle ORM? Because raw SQL is for masochists, and those other ORMs? They wish they were this clean. Drizzle brings you actual control without the bloatβSQL with the elegance of a luxury sports car.
Writing migrations manually? PassΓ©. Just run this command, and let Drizzle handle the heavy lifting:
npm run drizzle:makemigrations
Boom. Your migrations, beautifully generated and ready for action.
Need a visual? Dive into your schema like a boss with Drizzle Studio:
npm run drizzle:studio
Think of it as the command center for your database kingdom.
Apply those migrations with surgical precision:
npm run drizzle:migrate
Drizzle ensures your database evolves exactly how you designed itβno drama, no surprises.
All your Drizzle magic lives in src/lib/server/data
because chaos isnβt our style. Here's the breakdown:
schema/
Define your database structure in a clean, declarative way thatβll make you wonder why you ever tolerated anything else. Designed for schema in multiple files.migrations/
Auto-generated SQL migrations live here, with versioned files that keep your database history as pristine as your codebase.So, go aheadβadd complex queries, manage schema changes, and keep your database humming. Drizzleβs got your back, and the competition? Theyβre eating dust.
We've got tests for days:
# Run unit and integration tests (for the perfectionists and paranoid)
npm run test:integration
# Run E2E tests (for the trust-no-one crowd)
npm run test:e2e
# Run all tests (for the true believers)
echo 'i am about to figure it out'
Yes, we've got GitHub Actions doing the heavy lifting! Because manually checking things is so 2010.
Your repo is guarded by:
βββ π§ͺ Test Runner
β βββ Runs all test suites because YOLO isn't a testing strategy
βββ π΅οΈ Code Quality Guard
β βββ Lint checks (catches your silly mistakes)
β βββ Type checks (TypeScript's got trust issues)
β βββ Format checks (spaces vs tabs: civil war)
βββ ποΈ Build Verification
βββ Makes sure your project actually builds
Every push and PR triggers our robot army to:
Your Main branch should be protected like Fort Knox:
They're all there. Don't touch them unless you know what you're doing (and even then, think twice).
# Build for production (fingers crossed)
npm run build
# Preview your soon-to-be masterpiece
npm run preview
To deploy your app, you may need to install an adapter for your target environment.
Found a bug? Cool, open an issue. Made something better? Even cooler, send a PR.
This isnβt just a template; itβs your new benchmark. The rest? Well, theyβre just trying to keep up.
Built with βοΈ and mild sleep deprivation.
P.S. If this template saves you 10 hours of setup time, you owe me a βοΈ
P.P.S. The robots checking your code don't accept bribes... we tried