A modern, full-stack boilerplate that combines the speed of Vite and Bun with the power of React and beautiful Shadcn/UI components. This template provides a solid foundation for building responsive web applications with TypeScript, dark mode support, and API integration.
- ⚡ Vite - Lightning fast build tool and development server
- 🏃 Bun - Fast HTTP server with hot reload support
- ⚛️ React 19 - Latest React with modern features
- 🎨 Shadcn/UI - Beautiful, accessible component library
- 📱 Responsive Layout - Mobile-first design with Tailwind CSS
- 🧭 React Router - Client-side routing with type-safe routes
- 🌙 Dark Mode - Built-in theme switching (light/dark/system)
- 🔗 API Integration - Example API endpoints with CORS setup
- 📦 TypeScript - Full type safety throughout the application
- 🎯 ESLint & Prettier - Code formatting and linting
- 🐳 Docker - Containerization ready with multi-stage build
- Frontend: React 19, TypeScript, Tailwind CSS
- UI Components: Shadcn/UI (built on Radix UI)
- Build Tool: Vite 6
- Runtime: Bun
- Routing: React Router 7
- Styling: Tailwind CSS 4
- Icons: Lucide React
- Development: ESLint, Prettier, Hot Module Replacement
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── ui/ # Shadcn/UI components
│ │ ├── layout.tsx # Main layout component
│ │ ├── navbar.tsx # Navigation bar
│ │ ├── mobile-nav.tsx # Mobile navigation
│ │ ├── mode-toggle.tsx # Dark mode toggle
│ │ └── api-test.tsx # API testing component
│ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ ├── contexts/ # React contexts
│ ├── providers/ # Provider components
│ ├── lib/ # Utility functions
│ └── routes.tsx # Route definitions
├── server.ts # Bun HTTP server
├── vite.config.ts # Vite configuration
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose setup
└── package.json # Dependencies and scripts
- Bun (latest version)
- Node.js 18+ (for compatibility)
- Clone the repository:
git clone <repository-url>
cd gpx-track-flight- Install dependencies:
bun install- Start the development servers:
Option 1: Frontend only (for UI development)
bun run dev:frontendThis starts the Vite dev server on http://localhost:5174
Option 2: Full-stack development
# Terminal 1: Start the backend server
bun run dev:backend
# Terminal 2: Start the frontend server
bun run dev:frontendThe application will be available at:
- Frontend:
http://localhost:5174 - Backend API:
http://localhost:3001
bun run dev:frontend- Start Vite development serverbun run dev:backend- Start Bun server with hot reloadbun run build- Build for productionbun run lint- Run ESLintbun run preview- Preview production build
The boilerplate includes example API endpoints:
GET /api/health- Health check endpointGET /api/version- Version and runtime information
The layout is fully responsive with:
- Mobile-first approach using Tailwind CSS
- Collapsible mobile navigation
- Responsive grid layouts
- Touch-friendly interactions
Built-in theme switching with three options:
- Light - Light theme
- Dark - Dark theme
- System - Follows system preference
The theme preference is persisted across sessions.
- Hot Module Replacement - Instant updates during development
- CORS Configuration - Proper CORS setup for API calls
- Type Safety - Full TypeScript coverage
- Component Library - Pre-configured Shadcn/UI components
- Routing - Type-safe routing with React Router
🐳 Docker Deployment
- Build the Docker image:
docker build -t gpx-track-flight .- Run the container:
docker run -p 3000:3000 gpx-track-flightThe application will be available at http://localhost:3000
- Build and start:
docker-compose up --build- Stop the services:
docker-compose downThe Dockerfile uses a multi-stage build for optimization:
- Install stage - Installs dependencies
- Build stage - Builds the Vite application
- Release stage - Creates minimal production image
🚀 GitHub Container Registry
You can run the pre-built container directly from GitHub Container Registry:
docker pull ghcr.io/l3-n0x/vite-bun-react-shadcn-boilerplate:mainRun the latest version:
docker run -p 3000:3000 ghcr.io/l3-n0x/vite-bun-react-shadcn-boilerplate:mainRun specific SHA version:
docker run -p 3000:3000 ghcr.io/l3-n0x/vite-bun-react-shadcn-boilerplate:sha256-220cd5898a0cd20a582dd46eb5ef959352495a29e09826f27fa8eb1367188578.sigmain- Latest version from main branchsha256-*- Specific commit SHA versions
The container exposes port 3000 and includes both the built frontend and API server.
- Fork the repository
- Create a feature branch
- Make your changes
- Run the linter:
bun run lint - Build the project:
bun run build - Submit a pull request
This project is open source and available under the MIT License.