Start your next react project in seconds
A highly scalable, offline-first foundation with the best DX and a focus on performance and best practices
Features
- Quick scaffolding
- Create components, containers, routes, selectors and sagas - and their tests - right from the CLI!
- Instant feedback
- Enjoy the best DX (Developer eXperience) and code your app at the speed of thought! Your saved changes to the CSS and JS are reflected instantaneously without refreshing the page. Preserve application state even when you update something in the underlying code!
- Predictable state management
- Unidirectional data flow allows for change logging and time travel debugging.
- Next generation JavaScript
- Use template strings, object destructuring, arrow functions, JSX syntax and more.
- Next generation CSS
- Write composable CSS that's co-located with your components for complete modularity. Unique generated class names keep the specificity low while eliminating style clashes. Ship only the styles that are on the page for the best performance.
- Industry-standard routing
- It's natural to want to add pages (e.g. `/about`) to your application, and routing makes this possible.
- Industry-standard i18n internationalization support
- Scalable apps need to support multiple languages, easily add and support multiple languages with `react-intl`.
- Offline-first
- The next frontier in performant web apps: availability without a network connection from the instant your users load the app.
- Static code analysis
- Focus on writing new features without worrying about formatting or code quality. With the right editor setup, your code will automatically be formatted and linted as you work.
- SEO
- We support SEO (document head tags management) for search engines that support indexing of JavaScript content. (eg. Google)
- Storybook Support
- Get storybook setup out of the box in the boilerplate. Learn more about storybook here.
For easy use and development of stories in our boilerplate, follow these [instructions](docs/general/storybook.md).
- Access Control
- Boilerplate supports access control of features out of the box.
More about access control can be found [here](docs/general/roleMiddleware.md).
- Redux-Form Support
- Boilerplate supports Redux-Form. It has demo and setup added out of the box for Redux-Form.
More about Redux-Form can be found [here](docs/third-party-integrations/redux-form.md).
- Google Analytics
- Google Analytics support is given in the boilerplate. This feature is optional and is based on requirement, so not merged in main branch.
Support for Google Analytics can be found in feature/18-Analytics-Tools branch.
More about google analytics can be found [here](docs/general/googleAnalytics.md).
- Hooks Support
- Boilerplate supports hooks and all current components are converted to hooks. This feature is optional and is based on requirement, so not merged in main branch.
Support for Hooks can be found in feature/12-Hooks-Support branch.
- Graphql Support
- Boilerplate supports graphql. It has demo and setup added out of the box for graphql. This feature is optional and is based on requirement, so not merged in main branch.
Support for graphql can be found in feature/11-GraphQL-Support branch.
More about graphql setup can be found [here](docs/general/graphql.md).
- React-Final-Form Support
- Boilerplate supports React-Final-Form. It has demo and setup added out of the box for React-Final-Form. This feature is optional and is based on requirement, so not merged in main branch.
Support for React-Final-Form can be found in feature/React-Final-Form branch.
- Social Login with firebase
- Boilerplate supports social login using firebase. It has demo and setup added out of the box for firebase and it's authentication functions. This feature is optional and is based on requirement, so not merged in main branch.
Support for firebase authentication can be found in feature/social-login branch.
More about firebase setup can be found [here](docs/general/firebase.md).
- Two Factor Authentication
- Boilerplate supports two factor authentication. It has demo and setup added out of the box for two factor authentication.
More about two factor authentication setup can be found [here](docs/general/twoFactorAuthentication.md).
- Ecommerce Cart Functionality
- You can add and delete the product in the cart and also consistency is managed between the tabs using local storage.
More about Ecommerce Cart Functionality setup can be found [here](docs/general/ecommerceCartFunctionality.md).
- Real Time Chat
- Real time chat is feature of chatting and sending messages real time with the use of firebase.
Support for firebase authentication can be found in feature/RB-66-Real-Time-Chat branch.
More about Real Time Chat setup can be found [here](docs/general/realTimeChat.md).
- Firebase Cloud Messaging
- Firebase cloud messaging allows us to send real time push notifications to the client.
Example can be found in
feature/RB-85-Push-Notifications-FCM branch.
More about Firebase cloud messaging setup can be found [here](docs/general/firebaseCloudMessaging.md).
- Notifications with socket.io
- Boilerplate supports Real time notifications with socket.io.
Example can be found in feature/RB-87-Notifications-socket.io branch.
But wait... there's more!
- The best test setup: Automatically guarantee code quality and non-breaking
changes. (Seen a react app with 100% test coverage before?)
- Native web app: Your app's new home? The home screen of your users' phones.
- The fastest fonts: Say goodbye to vacant text.
- Stay fast: Profile your app's performance from the comfort of your command
line!
- Catch problems: AppVeyor and TravisCI setups included by default, so your
tests get run automatically on Windows and Unix.
There’s also a fantastic video on how to structure your React.js apps with scalability in mind. It provides rationale for the majority of boilerplate's design decisions.
Keywords: React.js, Redux, Hot Reloading, ESNext, Babel, react-router, Offline First, ServiceWorker, styled-components
, redux-saga, FontFaceObserver, storybook
Quick start
- Make sure that you have Node.js v8.15.1 and npm v5 or above installed.
- Clone this repo using
git clone https://github.com/growexx/react-user-boilerplate.git
- Move to the appropriate directory:
cd <YOUR_PROJECT_NAME>
.
- Run
npm run setup
in order to install dependencies and clean the git repo.
At this point you can run npm start
to see the example app at http://localhost:3000
.
- Run
npm run clean
to delete the example app.
- Add env file into the project's main directory. Values for env file can be found here.
Now you're ready to rumble!
Documentation
- Features: Detail list of features available in the boilerplate.
- The Hitchhiker's Guide to
react-boilerplate
: An introduction for newcomers to this boilerplate.
- Overview: A short overview of the included tools
- Commands: Getting the most out of this boilerplate
- Testing: How to work with the built-in test harness
- Styling: How to work with the CSS tooling
- Packages: Open Source Packages used in the project.
- Your app: Supercharging your app with Routing, Redux, simple
asynchronicity helpers, etc.
- Troubleshooting: Solutions to common problems faced by developers.
License
This project is licensed under the MIT license, Copyright (c) 2019 Maximilian
Stoiber. For more information see LICENSE.md
.
Commit Tools Setup
For commit, we use commitizen so the commit messages are in the same format for all the developers. This formatted messages are used in to create change logs.
- Install Globally Commitizen
npm install -g commitizen
- Install Adapter
npm install -g cz-conventional-changelog
- Set as default adapter for your projects
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
- Usage: now instead of using
git commit
use git cz
- If you want to use commit messages with emojis you can use following package
- Install Adapter
npm install --global cz-emoji
- Set as default adapter for your projects
echo '{ "path": "cz-emoji" }' > ~/.czrc
- Usage
git cz