A production-ready Vite + React + TypeScript starter template with clean architecture, design system tokens, and enterprise-grade folder structure.
Features β’ Quick Start β’ Documentation β’ Structure β’ Contributing
- β‘οΈ Vite 4+ - Lightning fast HMR and optimized builds
- βοΈ React 18 with TypeScript - Type-safe component development
- π¨ SCSS Design Tokens - Scalable design system with Spanish conventions
- ποΈ Atomic Design - Components β Containers β Layouts β Pages
- π BEM Methodology - Consistent CSS naming and organization
- π GitFlow Ready - Pre-configured branching strategy
- π― Clean Architecture - Separation of concerns with dedicated folders
- π§ͺ Testing Ready - Scaffolded test structure (bring your own framework)
- π i18n Ready - Prepared for multi-language support (en/es/fr)
- π¦ Zero Config - ESLint + Prettier pre-configured
- π€ AI-Optimized - GitHub Copilot instructions included
# Clone this template
npx degit Kevinparra535/vite-template-design-sytem-and-gitflow my-project
# Navigate to project
cd my-project
# Install dependencies
npm install
# Start development server
npm run dev- Click the "Use this template" button on GitHub
- Clone your new repository
- Run
npm install && npm run dev
git clone https://github.com/Kevinparra535/vite-template-design-sytem-and-gitflow.git my-project
cd my-project
rm -rf .git
git init
npm install
npm run devnpm run dev # Start development server with HMR (http://localhost:5173)
npm run build # Build for production (type-check + build)
npm run preview # Preview production build locally
npm run lint # Run ESLint with TypeScript support (--max-warnings 0)src/
βββ assets/ # Static assets organized by type
β βββ scss/ # SCSS with design tokens
β β βββ tokens/ # Design primitives (colors, spacing, typography)
β β βββ vendors/ # Third-party styles (bootstrap, breakpoints)
β β βββ pages/ # Page-specific styles
β βββ images/ # Images and icons
β βββ videos/ # Video files
β βββ audios/ # Audio files
β
βββ components/ # π§© Stateless/Presentational components
β βββ [ComponentName]/
β βββ Component.tsx
β βββ Component.md # Usage documentation
β βββ component.scss # (optional)
β
βββ containers/ # ποΈ Stateful/Smart components (useState, useReducer)
β
βββ layouts/ # πΌοΈ Layout wrappers (Header, Footer, Sidebar)
β
βββ pages/ # π Page components (Home, Contact, etc.)
β
βββ hooks/ # πͺ Custom React hooks
β
βββ contexts/ # π React Context providers (theme, auth)
β
βββ services/ # π API/external service integrations
β
βββ helpers/ # π οΈ Utility functions
β
βββ validations/ # β
Form validation schemas (Formik/react-hook-form)
β
βββ constants/ # π App constants (regex, config values)
β
βββ config/ # βοΈ Application configuration
β
βββ i18n/ # π Internationalization (en/es/fr)
β βββ en/
β βββ es/
β βββ fr/
β
βββ routes/ # π£οΈ Routing configuration
β
βββ __tests__/ # π§ͺ Test files
β
βββ __mocks__/ # π Mock data for testing
| Folder | Purpose | Example |
|---|---|---|
components/ |
Pure UI components (no state) | <Button />, <Card /> |
containers/ |
Components with state management | <UserProfile />, <DataTable /> |
layouts/ |
Page wrappers | <MainLayout />, <DashboardLayout /> |
pages/ |
Route-level components | <HomePage />, <AboutPage /> |
services/ |
API calls, one file per service | authService.ts, userService.ts |
hooks/ |
Reusable logic | useAuth(), useFetch() |
contexts/ |
Global state | ThemeContext, AuthContext |
// Colors (src/assets/scss/tokens/colors.scss)
$color-primario: #e6444e;
$color-secundario: #f371b4;
$color-claro: #ffffff;
$color-oscuro: #363636;
// Spacing (src/assets/scss/tokens/spacings.scss)
$space: 10px;
$space_x2: 20px;
$space_x3: 30px;
// Typography (src/assets/scss/tokens/typos.scss)
$Fuente1: 'Poppins', system-ui;
$Fuente2: 'Oswald', system-ui;
$h1: 50px;
$p: 15px;@import 'src/assets/scss/index.scss';
.my-button {
@include botones; // Pre-styled button
@include titulos($Fuente2); // Auto-uppercase for Oswald
}- Files: Plural (
buttons.scss) - Classes: Singular lowercase (
.gallery__button) - Images: Block-relative (
hero_background.png)
.gallery {
&__button {
&--active {
}
}
}This template follows GitFlow branching strategy:
main (production)
βββ master (integration)
β βββ release/* (pre-production)
β βββ feature/* (new features)
β βββ ...
βββ hotfix/* (urgent fixes)
Branch naming:
feature/user-authenticationfeature/AmazingFeaturehotfix/critical-bugrelease/v1.0.0
Commit format: Imperative mood
git commit -m 'Add user authentication'
git commit -m 'Fix header responsive issue'For detailed documentation, visit the Wiki:
- π Folder Structure Explained
- π¨ Style Guide & BEM
- π GitFlow Strategy
- π VS Code Extensions
Required:
Recommended:
- GitHub Copilot - AI-assisted coding
- Color Highlight - SCSS token visualization
- Path Intellisense
The template includes scaffolded test folders but no framework. Choose your preferred setup:
Jest + React Testing Library:
npm install -D jest @testing-library/react @testing-library/jest-domVitest (Vite-native):
npm install -D vitest @testing-library/reactPrepared for i18n with src/i18n/ structure. Add your preferred library:
npm install react-i18next i18nextContributions are what make the open-source community amazing! Any contributions are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
Kevin Parra Lopez
- GitHub: @Kevinparra535
- Email: kevinparra535@gmail.com
Give a βοΈ if this project helped you!