express-react-boilerplate alternatives and similar libraries
Based on the "Boilerplate" category.
Alternatively, view express-react-boilerplate alternatives based on common mentions on social networks and blogs.
-
create-react-app
Set up a modern web app by running one command. -
react-boilerplate
:fire: A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices. -
electron-react-boilerplate
A Foundation for Scalable Cross-Platform Apps -
react-redux-starter-kit
Get started with React, Redux, and React-Router!. -
react-redux-universal-hot-example
A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform -
nwb
A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it) -
react-hot-boilerplate
Minimal live-editing example for React -
generator-react-webpack
Yeoman generator for ReactJS and Webpack -
react-isomorphic-starterkit
Create an isomorphic React app in less than 5 minutes. -
essential-react
A minimal skeleton for building testable React apps using Babel -
generator-starhackit
StarHackIt: React/Native/Node fullstack starter kit with authentication and authorisation, data backed by SQL, the infrastructure deployed with GruCloud -
relay-fullstack
:point_up::running: Modern Relay Starter Kit - Integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS -
reactpack
:package: build your react apps with one command and one `npm i`. -
redux-cli
An opinionated CLI for building redux/react apps quicker -
redux-webpack-es6-boilerplate
A starter project for modern React apps with Redux -
universal-redux
An npm package that lets you jump right into coding React and Redux with universal (isomorphic) rendering. Only manage Express setups or Webpack configurations if you want to. -
gluestick
GlueStick is a command line interface for quickly developing universal web applications using React and Redux. -
rockpack
Rockpack is a simple solution for creating React Application with Server Side Rendering, bundling, linting, testing within 5 minutes -
crisp-react
React boilerplate written in TypeScript with a variety of Jamstack and full stack deployments. Comes with SSR and without need to learn a framework. Helps to split a monolithic React app into multiple SPAs and avoid vendor lock-in. -
phoenix
A simple boilerplate that helps you make your react application with Server Side Rendering & Localization support. -
generator-flux-on-rails
Scaffolder of universal Flux / Redux app, backed by Rails API. -
react-enterprise-starter-kit
Highly Scalable Awesome React Starter Kit for an enterprise application with a very easy maintainable codebase. :fire: -
cra-template-redux-auth-starter
Create React App boilerplate template with React, Redux Toolkit, React Router, Ant Design, Axios, Redux-Saga, SASS, Authentication, Routes. No configuration is required, Start building your App. -
PBandJ
Zero-Config Reusable Component Framework for React π₯π -
create-react-dependency
Project similar to the Create React App for libraries and dependencies
Appwrite - The Open Source Firebase alternative introduces iOS support
Do you think we are missing an alternative of express-react-boilerplate or a related project?
README
erb
π₯ π₯ π₯ Express react boilerplate π₯ π₯ π₯
Features
- Server side (Express).
- NoSQL database [(MongoDB)](mongodb.com).
- Client side (React).
- Universal routing (react-router).
- State management (Redux).
- Redux debugging tools (redux-devtools).
- Tweak React components in real time (react-hot-loader).
- SEO (react-helmet).
- The recommended Code Splitting library for React (loadable-components).
- Progressive web app (offline-plugin).
- Promise based HTTP client for the browser and NodeJS (axios).
- Internationalization (i18next) & (react-i18next).
- A tool for transforming CSS with JavaScript (PostCSS).
- PostCSS plugin to parse CSS and add vendor prefixes to CSS rules using values from Can I Use. It is recommended by Google and used in Twitter and Alibaba (autoprefixer).
- Compiles CSS Modules in runtime (css-modules-require-hook).
- Allows files required by node that match a given set of extensions to be returned as either a data URI, or a custom filename (asset-require-hook).
- Developing UI components (Storybook).
- Light & Dark theme.
- Data fetching from server-side.
- Compressing images with imagemin (imagemin-webpack-plugin).
- Unit testing (Jest).
- ES6.
- The optional chaining operator provides a way to simplify accessing values through connected objects when it's possible that a reference or function may be undefined or null (@babel/plugin-proposal-optional-chaining).
- Type checker for javascript (Flow).
- Find and fix problems in your javascript code (ESlint).
- Code formatter (Prettier).
- Automate your workflow from idea to production (Github Actions).
- VSCode debugging.
Requirements
- Node >= 10.13.0
Structure
.
βββ public # Express server static path
β βββ assets # All favicon resources
β βββ locales # All of i18n resources
β βββ robots.txt # A robots.txt file tells search engine crawlers which pages or files the crawler can or can't request from your site.
βββ src # App source code
β βββ api # All of restful API
β βββ client # Client scope
β β βββ app # App root component
β β βββ assets # Assets (e.g. images, fonts etc.)
β β βββ components # Reusable components
β β βββ pages # Page components
β β βββ stories # UI components with Storybook
β β βββ themes # App-wide style
β β βββ vendor # 3rd libraries for client
β β βββ index.js # App bootstrap and rendering (webpack entry)
β βββ middlewares # All of express middleware
β βββ model # Data transfer object
β βββ mongo # MongoDB configuration
β βββ secure # All of security (e.g passport configuration, jsonwebtoken etc.)
β βββ store # Store configuration for both client and server side
β βββ tools # Project related configurations
β β βββ jest # Jest configurations
β β βββ webpack # Webpack configurations
β β βββ hooks.js # Assets require hooks
β β βββ postcss.config.js # PostCSS configuration
β βββ types # All of type for flow
β βββ utils # App-wide utils
β βββ config.js # Configuration entry point loaded from .env file
β βββ i18n.js # I18next configuration
β βββ index.js # App entry point
β βββ routes.js # Routes configuration for both client and server side
β βββ server.js # Express server
βββ .babelrc # Babel configuration.
βββ .env-cmdrc.json # All of environments configuration.
βββ .eslintrc.json # Eslint configuration.
βββ .flowconfig # Flow type configuration.
βββ .prettierrc.json # Prettier configuration.
Installation
$ yarn global add express-react-boilerplate
# or (sudo) npm install -g express-react-boilerplate
Getting Started
1. Usage:
$ erb-gen --help
Usage: erb-gen [options]
Options:
-v, --version output the version number
-d, --dir <type> project's directory. (default: ".")
-n, --name <type> project's name. (default: "express-react-boilerplate")
-h, --help output usage information
Examples:
$ erb-gen
$ erb-gen --name example
2. Install dependencies:
$ cd <your_project>
$ yarn
# or npm install
3. Run it:
$ yarn dev
# or npm run dev
Build
$ yarn build
# or npm run build
NOTE: You can change environment variables in
.env-cmdrc.json
file.
Scripts
Script | Description |
---|---|
dev | Start the development server. |
dev --serve |
Start the development server and open browser. |
start | Start the production server. |
build | Remove the previous bundled files and bundle it (include client & server) to dist/ . |
wp | Bundle client to dist/ . |
analyze | Visualize the contents of all your bundles. |
storybook | Start the storybook server. |
test | Run testing. |
eslint | Find problems in your JavaScript code. |
Enable/Disable offline
- In
src/tools/webpack/webpack.config.prod.js
:
if (isDev) {
...
} else {
plugins = [
...,
// Comment this plugin if you want to disable offline.
new OfflinePlugin({
autoUpdate: true,
appShell: '/',
relativePaths: false,
updateStrategy: 'all',
externals: ['/'],
})
]
}
- At the end of
src/client/index.js
:
if (!__DEV__) {
require('offline-plugin/runtime').install(); // Comment this line if you want to disable offline.
}
Supported Browsers
By default, the generated project supports all modern browsers. Support for Internet Explorer 9, 10, and 11 requires polyfills. For a set of polyfills to support older browsers, use react-app-polyfill.
$ yarn add react-app-polyfill
# or npm install --save react-app-polyfill
You can import the entry point for the minimal version you intend to support to ensure that the minimum language features are present that are required to use in your project. For example, if you import the IE9 entry point, this will include IE10 and IE11 support.
Internet Explorer 9
// This must be the first line in <PROJECT_ROOT>/src/client/app/index.js
import 'react-app-polyfill/ie9';
import 'react-app-polyfill/stable';
// ...
Internet Explorer 11
// This must be the first line in <PROJECT_ROOT>/src/client/app/index.js
import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';
// ...
CSS variables
By default, the generated project supports all modern browsers. Support for Internet Explorer 9, 10, and 11 requires polyfills. For a set of polyfills to support older browsers, use css-vars-ponyfill.
// In <PROJECT_ROOT>/src/client/vendor/index.js
import cssVars 'css-vars-ponyfill';
// ... your css/scss files.
cssVars({
silent: !__DEV__,
..., // https://jhildenbiddle.github.io/css-vars-ponyfill/#/?id=options
});
Type Checking For Editor
Contributors
Special Thanks
License
MIT License
Copyright (c) 2019 Huα»³nh TrαΊ§n ΔΔng Khoa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*Note that all licence references and agreements mentioned in the express-react-boilerplate README section above
are relevant to that project's source code only.