GiveMeSomething / react-boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My React App Boilerplate

Prerequisites:

  • Node.js LTS version

Start local dev environment

Install npm dependencies:

yarn

Then you can use following command to start dev environment for frontend:

yarn start

Repository Structure

  • frontend
    • public: Contains html skeleton of the application, can edit meta tags, icons, titles, ...
    • src: Contains source code
      • pages: Contains app's main page
      • components: Contains components used in the app, component folders are named after pages
      • styles: Contains global.scss
      • types: Contains TypeScript common custom type
      • utils: Contains common utility functions
      • constants: Contants common const values
      • redux: Contains Redux's store and Redux's hooks
    • index.tsx: App entry
    • routes.tsx: Contains app's url mapping (using React Router)
    • And a lot of config, including ESLint, Prettier, TailwindCSS, ...

Tools used

TailwindCSS

A utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup.

Go To Documentation

React Redux

Redux helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test.

Go To Documentation

ESLint

A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.

Go To Documentation

Prettier

An opinionated code formatter; Supports many languages; Integrates with most editors.

Go To Documentation

lint-staged

The concept of lint-staged is to run configured linter (or other) tasks on files that are staged in git.

Go To Documentation

Husky

Husky improves your commits and more 🐶 woof!

You can use it to lint your commit messages, run tests, lint code, etc... when you commit or push. Husky supports all Git hooks.

Go To Documentation

License

MIT

Contributing

Please follow below guideline when contributing to this project

About

License:MIT License


Languages

Language:TypeScript 83.9%Language:SCSS 8.1%Language:HTML 5.0%Language:JavaScript 2.3%Language:Shell 0.6%