Skip to content

BrandonABarringer/bb.template.react

Repository files navigation

React + TypeScript + Vite Project

A modern React application built with Vite, TypeScript, Tailwind CSS, and includes testing with Vitest.

Tech Stack

  • ⚡️ Vite - Fast build tool
  • ⚛️ React 18 - UI library
  • 📘 TypeScript - Type safety
  • 🎨 Tailwind CSS - Utility-first CSS
  • 🧪 Vitest - Unit testing
  • 🧹 ESLint - Code linting
  • Prettier - Code formatting

Getting Started

Install Dependencies

npm install

Development

Start the development server:

npm run dev

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

Build

Build for production:

npm run build

Preview

Preview the production build locally:

npm run preview

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm test - Run tests
  • npm test:ui - Run tests with UI
  • npm test:coverage - Generate coverage report
  • npm run lint - Lint code

Project Structure

See PROJECT_STRUCTURE.md for detailed architecture documentation and best practices.

Key Features

  • 📁 Organized folder structure - Components, layouts, pages, hooks, and utils in separate folders
  • 🧪 Testing ready - Vitest configured with React Testing Library
  • 🎨 Tailwind CSS - Pre-configured with base styles
  • 📏 Strict TypeScript - No any types allowed
  • Code quality - ESLint and Prettier configured

Folder Organization

src/
├── components/      # Reusable UI components
├── layouts/         # Page layout components
├── pages/           # Page-level components
├── hooks/           # Custom React hooks
├── utils/           # Utility functions
├── types/           # TypeScript type definitions
├── styles/          # Global styles
├── tests/           # Test setup and utilities
└── assets/          # Static assets

Each feature should be in its own folder with all related files (component, tests, styles).

Contributing

  1. Follow the project structure guidelines in PROJECT_STRUCTURE.md
  2. Write tests for new components and features
  3. Run linting before committing: npm run lint
  4. Ensure all tests pass: npm test

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published