A modern SvelteKit application built with Svelte 5, TypeScript, TailwindCSS 4, and shadcn-svelte components.
- SvelteKit: Full-stack framework with file-based routing
- Svelte 5: Latest Svelte with modern runes API (
$props()
,$state()
,$derived()
) - TypeScript: Full type safety throughout
- TailwindCSS 4: Utility-first CSS with Vite plugin integration
- shadcn-svelte: Beautiful, accessible component system
- Redis Integration: Server-side data persistence
- Dual Testing Strategy: Unit tests (Vitest) + E2E tests (Playwright)
- Node.js >=22.0.0
- Redis server (for backend functionality)
-
Run project dependencies
./scripts/run_dependencies.sh
-
Install npm dependencies:
npm install
-
Set up environment variables:
Create a
.env
file, use the.env.example
as a template: -
Start development server:
npm run dev
npm run dev # Development server with HMR
npm run dev --open # Open in browser automatically
npm run build # Production build
npm run preview # Preview production build
npm run check # Type checking + Svelte validation
npm run lint # Prettier + ESLint
npm run test # Run all tests
npm run test:unit # Unit tests (browser + node environments. check `vitest.config.ts` for details)
npm run test:e2e # End-to-end tests with Playwright
Component Tests: Browser-based testing for Svelte components using vitest-browser-svelte
- Files:
**/*.svelte.{test,spec}.{js,ts}
Server Tests: Node.js environment for business logic
- Files:
**/*.{test,spec}.{js,ts}
(excluding.svelte
tests)
E2E Tests: Full application testing with Playwright
Adding shadcn-svelte Components: Use the CLI to install components from the shadcn-svelte documentation:
npx shadcn-svelte@latest add [component-name]
These components will be added to src/lib/components/ui/
and automatically registered in the SvelteKit app.