A modern Vue.js starter template with TypeScript, Pinia, Vue Router, TailwindCSS, and comprehensive testing setup. This template provides a robust foundation for building scalable Vue.js applications using the latest best practices.
- 🚀 Vue 3.5 with Composition API
- ⚡️ Vite 5 for fast development and building
- 🎯 TypeScript 5.6 for type safety
- 📦 Pinia for state management
- 🛣️ Vue Router with automatic route generation
- 🎨 TailwindCSS 3 for utility-first styling
- ✅ Testing Setup:
- Vitest for unit testing
- Playwright for end-to-end testing
- 📝 ESLint with @antfu/eslint-config
- 🔧 Vue DevTools integration
- Node.js (version 20.x or higher recommended)
- npm (comes with Node.js)
-
Use this template by clicking the "Use this template" button above
-
Clone your new repository:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and visit
http://localhost:5173
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run lint
- Lint and fix filesnpm run test:unit
- Run unit testsnpm run test:e2e
- Run end-to-end testsnpm run type-check
- Check TypeScript types
├── .github/ # GitHub configuration files
├── e2e/ # End-to-end tests
├── public/ # Public static assets
├── src/
│ ├── assets/ # Project assets
│ ├── components/ # Vue components
│ ├── composables/ # Composable functions
│ ├── layouts/ # Layout components
│ ├── pages/ # Route pages
│ ├── stores/ # Pinia stores
│ ├── App.vue # Root component
│ └── main.ts # Application entry point
├── test/ # Test utilities and setup
└── vite.config.ts # Vite configuration
This template is fully typed with TypeScript. Configuration files can be found in:
tsconfig.json
tsconfig.node.json
tsconfig.app.json
Unit tests are powered by Vitest. Run them with:
npm run test:unit
End-to-end tests use Playwright. Run them with:
npm run test:e2e
This template uses @antfu/eslint-config for consistent code style. Customize the rules in .eslintrc
if needed.
Customize your TailwindCSS configuration in tailwind.config.js
:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{vue,js,ts}'],
theme: {
extend: {
// Add your customizations here
},
},
plugins: [],
}
Modify the Vite configuration in vite.config.ts
to add plugins or adjust build settings.
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/your-feature
- Submit a pull request