A modern, full-featured todo application built with React Router 7, showcasing best practices for monorepo architecture, component design, and developer experience.
- React Router 7 - Latest routing with SSR support
- Monorepo Architecture - Organized with Turbo and workspaces
- Tailwind CSS v4 - Modern styling with CSS variables
- shadcn/ui Components - Beautiful, accessible UI components
- TypeScript - Full type safety throughout
- React Context + useReducer - Built-in state management
- Vitest - Fast unit testing
- Bun - Fast package manager and runtime
- Biome - Fast linting and formatting
.
├── apps/
│ └── todo-app/ # Main todo application
├── packages/
│ ├── config/ # Shared configurations
│ ├── ui/ # shadcn/ui component library
│ └── utils/ # Shared utilities and types
├── turbo.json # Turbo build configuration
└── package.json # Root workspace configuration
- Bun >= 1.0.0
- Node.js >= 20.11.0
- Clone the repository:
git clone <repository-url>
cd react-router-starter
- Install dependencies:
bun install
- Start the development server:
bun dev
- Open http://localhost:5173 in your browser
bun dev
- Start all development serversbun build
- Build all packages and appsbun test
- Run all testsbun lint
- Lint all packagesbun format
- Format all codebun typecheck
- Type check all packages
bun dev
- Start development serverbun build
- Build for productionbun start
- Start production serverbun test
- Run testsbun test:ui
- Run tests with UI
This project uses a monorepo structure with the following packages:
- @todo-starter/ui - Component library based on shadcn/ui
- @todo-starter/utils - Shared utilities, types, and helpers
The app uses React's built-in Context API with useReducer for state management with the following features:
- In-memory todo storage
- CRUD operations for todos
- Filtering (all, active, completed)
- Bulk operations (clear completed)
- Type-safe actions and state updates
Components are organized by feature and follow these principles:
- Single responsibility
- Composition over inheritance
- Proper TypeScript typing
- Accessible by default
This project uses Tailwind CSS v4 with CSS-first configuration for modern, efficient styling.
- CSS-first approach: Theme configuration is defined directly in CSS using the
@theme
directive - No JavaScript config needed: Tailwind v4 eliminates the need for
tailwind.config.js
files in most cases - Theme variables: All design tokens (colors, spacing, etc.) are defined in
apps/todo-app/app/globals.css
- Dark mode support: Uses
@custom-variant
and@variant
directives for theme switching - shadcn/ui compatible: Maintains full compatibility with shadcn/ui components
The project includes comprehensive testing setup:
- Vitest for unit testing
- @testing-library/react for component testing
- jsdom environment for DOM testing
- Test files located alongside source files in
__tests__
directories
Run tests:
bun test
Run tests with UI:
bun test:ui
The project uses Tailwind CSS v4 with:
- CSS variables for theming
- Custom design tokens
- Responsive design utilities
- Dark mode support (ready)
- shadcn/ui components with Radix UI primitives
- Consistent design system
- Accessible color contrasts
- Responsive layouts
- Create component in
packages/ui/src/components/ui/
- Export from
packages/ui/src/index.ts
- Use in apps with
import { Component } from '@todo-starter/ui'
- Create utility in
packages/utils/src/
- Export from
packages/utils/src/index.ts
- Use in apps with
import { utility } from '@todo-starter/utils'
The project enforces code quality through:
- Biome for linting and formatting
- TypeScript for type checking
- Pre-commit hooks (when configured)
- Consistent code style across packages
bun build
bun start
The app supports:
- Server-side rendering (SSR)
- Static pre-rendering
- Progressive enhancement
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.