Skip to content

Zadeka/vite-react-shadcn-starter

Repository files navigation

Velox Starter Kit πŸš€

A production-ready React starter template powered by modern web technologies and best practices.

React TypeScript Vite Tailwind CSS Prettier Shadcn Tanstack Axios


Table of Contents


Overview

Velox Starter Kit is an opinionated, production-ready React boilerplate designed to accelerate your development workflow. It combines industry-standard tools with a well-structured architecture, allowing you to focus on building features instead of configuring tooling.

This starter kit is perfect for:

  • βœ… Building modern web applications with type safety
  • βœ… Teams following strict collaboration and commit conventions
  • βœ… Projects requiring server-state management and type-safe routing
  • βœ… Developers who want a pre-configured setup without compromises

Features

πŸ”₯ Core Technologies

  • React 18 - Modern UI library with Hooks and Concurrent Features
  • TypeScript - Type-safe JavaScript for scalable codebases
  • Vite - Lightning-fast build tool with instant HMR
  • Tailwind CSS v4 - Utility-first CSS framework with zero configuration

🎨 UI & Components

  • Shadcn UI - Beautiful, accessible, and customizable component library
  • Dark Mode Support - Built-in theme toggle with system preference detection
  • Responsive Design - Mobile-first approach with Tailwind utilities

πŸ›£οΈ Routing & Data Fetching

  • TanStack Router - Type-safe, file-based routing with loaders
  • TanStack Query - Powerful server-state management with automatic caching
  • Axios - Promise-based HTTP client for API integration

πŸ“‹ Forms & Validation

🧰 Developer Experience

  • ESLint - Code linting with React and TypeScript rules
  • Prettier - Opinionated code formatter
  • Path Aliases - Clean imports with @/ prefix
  • Conventional Commits - Standardized commit messages for better collaboration

Tech Stack

Technology Purpose
Vite Build tool & dev server
React UI library
TypeScript Type safety
Tailwind Styling
TanStack Routing & Data fetching
Axios HTTP client

Project Structure

vite-react-shadcn-starter/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/              # Static assets (images, fonts)
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ common/          # Shared custom components
β”‚   β”‚   β”‚   └── mode-toggle.tsx
β”‚   β”‚   β”œβ”€β”€ layout/          # Layout components (Navbar, Sidebar, Footer)
β”‚   β”‚   └── ui/              # Shadcn primitive components
β”‚   β”‚       β”œβ”€β”€ button.tsx
β”‚   β”‚       β”œβ”€β”€ card.tsx
β”‚   β”‚       └── ...
β”‚   β”œβ”€β”€ constants/           # Global constants and enums
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ queries/         # TanStack Query hooks
β”‚   β”‚   β”œβ”€β”€ use-theme.ts     # Theme management hook
β”‚   β”‚   └── use-mobile.ts
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   └── utils.ts         # Utility functions (cn, etc.)
β”‚   β”œβ”€β”€ routes/              # TanStack Router file-based routes
β”‚   β”‚   β”œβ”€β”€ __root.tsx       # Root route component
β”‚   β”‚   └── index.tsx        # Home page
β”‚   β”œβ”€β”€ services/            # Axios instances & API endpoints
β”‚   β”œβ”€β”€ types/               # Global TypeScript definitions
β”‚   β”œβ”€β”€ index.css            # Global styles & Tailwind directives
β”‚   β”œβ”€β”€ main.tsx             # Application entry point
β”‚   └── routeTree.gen.ts     # Auto-generated route tree (DO NOT EDIT)
β”œβ”€β”€ public/                  # Public static files
β”œβ”€β”€ .prettierrc              # Prettier configuration
β”œβ”€β”€ components.json          # Shadcn UI configuration
β”œβ”€β”€ eslint.config.js         # ESLint configuration
β”œβ”€β”€ tsconfig.json            # TypeScript configuration
β”œβ”€β”€ vite.config.ts           # Vite configuration
β”œβ”€β”€ COLLABORATION-GUIDE.md   # Team collaboration guidelines
β”œβ”€β”€ COMMIT-GUIDE.md          # Commit message conventions
└── package.json

Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js >= 18.x
  • npm >= 9.x or yarn >= 1.22.x or pnpm >= 8.x

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/velox-starter-kit.git
    cd velox-starter-kit
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install

Development

Start the development server with hot module replacement:

npm run dev

The application will be available at http://localhost:5173

Build

Create a production-ready build:

npm run build

Build output will be in the dist/ directory.

Preview Production Build

Preview the production build locally:

npm run preview

Workflow & Collaboration

This project follows a structured Git workflow with strict branch naming and PR conventions.

Branch Structure

main (production)
  └── staging (QA/Testing)
      └── module/{epic} (e.g., module/auth, module/dashboard)
          └── {developer-name}/{epic}/feature/{feature-name}

Branch Naming Conventions

Type Format Example
Module Development {developer-name}/{epic} alex/dashboard
Feature {developer-name}/{epic}/feature/{feature-name} alex/dashboard/feature/analytics-chart
Bugfix {developer-name}/{epic}/bugfix/{issue-name} alex/auth/bugfix/login-validation
Component {developer-name}/components/{component-name} alex/components/data-table

Pull Request Flow

  1. Developer β†’ Module: alex/dashboard β†’ module/dashboard
  2. Module β†’ Staging: module/dashboard β†’ staging
  3. Staging β†’ Production: staging β†’ main

β›” Restrictions:

  • No direct merges from developer branches to main or staging
  • All changes must go through module branches first

For detailed collaboration guidelines, see COLLABORATION-GUIDE.md.


Code Quality

Commit Conventions

This project uses Conventional Commits for standardized commit messages:

<type>(<scope>): <subject>

[optional body]

Types:

  • feat: New feature
  • fix: Bug fix
  • ui: UI-only changes
  • refactor: Code refactoring
  • docs: Documentation
  • chore: Build/config changes

Examples:

feat(routes): add user details page with loader
fix(forms): resolve email validation regex
ui(components): update button hover states

For complete commit guidelines, see COMMIT-GUIDE.md.

Linting & Formatting

# Run ESLint
npm run lint

# Format code with Prettier
npm run format

Contributing

We welcome contributions! Please follow these steps:

  1. Read COLLABORATION-GUIDE.md and COMMIT-GUIDE.md
  2. Create a feature branch following naming conventions
  3. Make your changes with proper commit messages
  4. Submit a PR to the appropriate module branch
  5. Wait for code review and approval

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

  • Vite for blazing-fast development experience
  • Shadcn UI for beautiful components
  • TanStack for powerful routing and data fetching
  • The React and TypeScript communities

Built with ❀️ using Vite & React

Β© 2024 Velox Starter Kit. Open Source.

About

Velox Starter Kit is an opinionated, production-ready React boilerplate designed to accelerate your development workflow. It combines industry-standard tools with a well-structured architecture, allowing you to focus on building features instead of configuring tooling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages