Skip to content

Unopiniated starter repo to save us all some precious time. It'll scaffold a brand new React project with everything you need, ready to rock and roll in a flash. ⚡ This project is bootstrapped with VITE, pre-configured with essential libraries.

Notifications You must be signed in to change notification settings

aggarwal-muskaan/cra-boost

Repository files navigation

React & Vite Starter

A starter for React project
Provides a good developer experience, and boosts productivity. All the tools you need to build your next project.

Features

  • ⚛️ React 18
  • 📏 ESLint — To find and fix problems in your code
  • 💖 Prettier — Code Formatter for consistent style
  • 🐶 Husky — For running scripts before committing
  • 🖌 Renovate — To keep your dependencies up to date
  • 🚫 lint-staged — Run ESLint and Prettier against staged Git files
  • ⚙️ EditorConfig - Consistent coding styles across editors and IDEs
  • 🗂 Path Mapping — Import components or images using the @ prefix
  • 🚓 Axios - Interceptor configured
  • 🐫 Lodash - cameliseCase() to convert any key of any data type into camel case
  • ⛑ Tanstack Query - QueryClient instance with overridden default options

Please read Medium Blog for more

Quick Start

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

The best way to start with this template is using degit.

npx degit https://github.com/aggarwal-muskaan/cra-boost your-project-name
cd your-project-name
npm install

Development

To start the project locally, run:

npm run dev

Open http://localhost:5173 with your browser to see the result.

Documentation

Requirements

  • Node.js >= 16
  • npm 8

Directory Structure

  • .husky — Husky configuration and hooks.
  • public — Static assets such as robots.txt, and favicon.
  • src — Application source code, including components, lib, utilities, and styles.

Scripts

  • npm run dev — Starts the application in development mode at http://localhost:5173.
  • npm run build:dev — Creates an optimized build of your application using .env file.
  • npm serve:dev — Starts the application in development mode with NODE_ENV = production.
  • npm build - Creates an optimized build of your application using .env.production file
  • npm serve — Starts the application in production mode with NODE_ENV = production.
  • npm lint — Runs ESLint for all files in the src directory.
  • npm run format — Runs Prettier for all files in the directory including json config files.
  • npm run preview - Previewing the build locally.

Path Mapping

To import components or files, use the @ prefix.

import { MyButton } from '@/components/MyButton';
// js files
import { HttpErrorResponse } from '@/constants/HTTPErrorResponse';
import { getQueryClientInstance } from '@/lib/queryClient';

About

Unopiniated starter repo to save us all some precious time. It'll scaffold a brand new React project with everything you need, ready to rock and roll in a flash. ⚡ This project is bootstrapped with VITE, pre-configured with essential libraries.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published