A production-ready frontend boilerplate built with React.js and Vite. This setup includes TailwindCSS for styling, Context API for state management, and reusable components for rapid application development.
- Vite: Fast and optimized development build tool.
- TailwindCSS: Utility-first CSS framework with a dual light/dark theme setup.
- Context API: Pre-configured
ThemeContext
,UserContext
, andDataStorageContext
for state management. - Reusable Components: Includes foundational components like
Button
,Dropdown
, and Modals. - Routing: React Router pre-configured for client-side navigation.
npx degit KarthikrajS/frontend-boilerplate my-frontend
cd my-frontend
npm install
Start the frontend development server:
npm run dev
The app will run at http://localhost:5173
by default.
frontend/
├── public/ # Static assets
├── src/
│ ├── components/ # Reusable components
│ ├── context/ # Context API providers (Theme, User, etc.)
│ ├── pages/ # Page components (Home, About, etc.)
│ ├── styles/ # Global styles and TailwindCSS configuration
│ ├── App.jsx # Main application component
│ ├── main.jsx # Application entry point
│ └── index.css # Global CSS file
├── tailwind.config.js # TailwindCSS configuration
├── vite.config.js # Vite configuration
└── package.json # Project metadata and dependencies
This boilerplate includes a dual light/dark theme setup using TailwindCSS. Users can toggle between themes via the ThemeContext
.
npm run dev
: Run the development server.npm run build
: Build the app for production.npm run preview
: Preview the production build locally.
- Update colors and breakpoints in
tailwind.config.js
to match your design requirements. - Add more reusable components in the
src/components/
folder. - Extend the Context API for additional application state management.
Feel free to fork and contribute to this boilerplate. Submit a pull request for review.
This project is licensed under the MIT License.