A modern starter template for building web applications with SvelteKit, TypeScript, TailwindCSS, and Sass. This template provides a robust foundation for your next project with best practices and modern tooling.
- π Modern Stack: Built with the latest versions of SvelteKit, TypeScript, and TailwindCSS
- π¨ Styling Flexibility: Combine TailwindCSS utilities with Sass for powerful styling
- π§ͺ Testing Ready: Includes both E2E and unit testing setup out of the box
- π Code Quality: Pre-configured with ESLint, Prettier, and TypeScript
- π Git Hooks: Husky and lint-staged ensure code quality on every commit
- π± Responsive: Built with mobile-first design principles
- β‘οΈ Performance: Optimized for fast loading and smooth interactions
- β‘οΈ SvelteKit - The official application framework for Svelte
- π¨ TailwindCSS v4 - A utility-first CSS framework
- π TypeScript - Type-safe JavaScript
- π¨ Sass - CSS extension language
- π§ͺ Playwright - End-to-end testing
- π§ͺ Vitest - Unit testing
- π ESLint - Code linting
- π¦ Prettier - Code formatting
- πΆ Husky - Git hooks
- π§Ή Lint Staged - Run linters on staged files
# Clone the repository git clone git@github.com:MikevPeeren/sveltekit-typescript-tailwindcss-sass-starter.git # or npx degit git@github.com:MikevPeeren/sveltekit-typescript-tailwindcss-sass-starter.git # Install dependencies yarn install # or npm installStart the development server:
yarn dev # or npm run devOpen http://localhost:3000 to view your application.
yarn dev- Start development serveryarn build- Build for productionyarn preview- Preview production buildyarn test- Run Playwright end-to-end testsyarn test:unit- Run Vitest unit testsyarn check- Type-check your codeyarn check:watch- Type-check your code in watch modeyarn lint- Lint your codeyarn format- Format your code
βββ src/ β βββ routes/ # SvelteKit routes β βββ app.html # HTML template β βββ app.scss # Global styles β βββ app.d.ts # TypeScript declarations βββ static/ # Static assets βββ tests/ # Test files βββ public/ # Public assets This starter includes both end-to-end and unit testing setup:
- End-to-end Testing: Uses Playwright for browser testing
- Unit Testing: Uses Vitest for component and utility testing
Run tests with:
# Run end-to-end tests yarn test # Run unit tests yarn test:unitThis starter combines the power of TailwindCSS with Sass:
- Use TailwindCSS utility classes directly in your components
- Create custom styles with Sass in
src/app.scss - Leverage TailwindCSS's responsive design utilities
- Use Sass variables and mixins for complex styling needs
The project includes several configuration files:
tailwind.config.js- TailwindCSS configurationtsconfig.json- TypeScript configurationsvelte.config.js- SvelteKit configuration.eslintrc.cjs- ESLint configuration.prettierrc- Prettier configuration
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- SvelteKit team for the amazing framework
- TailwindCSS team for the utility-first CSS framework
- All contributors who have helped improve this starter