Awesome Open Source
Awesome Open Source

cra-boilerplate

This project is an Create React App - v2.1.1 boilerplate with integration of Redux, React Router, Redux thunk & Reactstrap(Bootstrap v4)

Build Status Dependency Status

Before starting with project, please headover to CRA documentation.

Features

Getting Started

  1. Clone this repo

https://github.com/mohandere/cra-boilerplate.git

  1. To run, go to project folder and run

$ yarn install (if you are using yarn)

  1. Now start dev server by running -

$ yarn start

  1. visit - http://localhost:3000/

To create production ready codes -

$ yarn build

  1. Analyze source code / bundle size

$ yarn analyze

for more commands refer package.json

Roadmap

Before starting development please go through -

Code structure

Refer src/home/ module for an ideal directory structure

Project uses Domain-style for code structure-

Domain-style : separate folders per feature or domain, possibly with sub-folders per file type

For more details refer /src/home folder.

Reference -

Common components

Place all common components such as Header/Footer in src/common/components folder.

Adding new Module/Feature

  • Create a Module/Feature folder at src/ like - - src/home Feature folder must contain booststrap file named index.js and css file 'style.css' at root

Like -

  • src/home/index.js
  • src/home/style.scss

Next as per need, add sub folders like -

  • src/home/actions/
  • src/home/reducers/
  • src/home/thunks/
  • src/home/containers/
  • src/home/components/

Actions

  • Create folder named actions inside Feature folder like - src/home/actions
  • Place actionTypes.js which contains all actions to be exported

Reducers

  • Create folder named reducers inside Feature folder like - src/home/reducers
  • Place index.js which combines all reducers using combineReducers

Deployment

Refer deployment section from CRA doc.

Issues / Suggestions ?

File an issue here.

License

MIT


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (68,071
react (5,167
redux (1,151
scss (608
boilerplate (604
es6 (519
starter-kit (173
rxjs (153
create-react-app (130
react-router-v4 (63
redux-observable (17

Find Open Source By Browsing 7,000 Topics Across 59 Categories