Skip to content

KarthikrajS/routine-front-end

Repository files navigation

React Frontend Boilerplate

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.


Features

  • 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, and DataStorageContext for state management.
  • Reusable Components: Includes foundational components like Button, Dropdown, and Modals.
  • Routing: React Router pre-configured for client-side navigation.

Getting Started

Clone the Repository

npx degit KarthikrajS/frontend-boilerplate my-frontend
cd my-frontend

Install Dependencies

npm install


Run the Development Server

Start the frontend development server:

npm run dev

The app will run at http://localhost:5173 by default.


Folder Structure

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

Theming

This boilerplate includes a dual light/dark theme setup using TailwindCSS. Users can toggle between themes via the ThemeContext.


Available Scripts

  • npm run dev: Run the development server.
  • npm run build: Build the app for production.
  • npm run preview: Preview the production build locally.

Features to Customize

  1. Update colors and breakpoints in tailwind.config.js to match your design requirements.
  2. Add more reusable components in the src/components/ folder.
  3. Extend the Context API for additional application state management.

Contributing

Feel free to fork and contribute to this boilerplate. Submit a pull request for review.


License

This project is licensed under the MIT License.

About

Trying to automate my routine :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published