All Projects β†’ htdangkhoa β†’ Express React Boilerplate

htdangkhoa / Express React Boilerplate

Licence: mit
πŸš€πŸš€πŸš€ This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects
flowtype
47 projects

Projects that are alternatives of or similar to Express React Boilerplate

Js Stack Boilerplate
Final boilerplate code of the JavaScript Stack from Scratch tutorial –
Stars: ✭ 145 (+353.13%)
Mutual labels:  webpack, eslint, babel, express, boilerplate, jest, react-router
Pwa
An opinionated progressive web app boilerplate
Stars: ✭ 353 (+1003.13%)
Mutual labels:  webpack, eslint, babel, universal, boilerplate, jest, react-router
React Redux Saucepan
A minimal and universal react redux starter project. With hot reloading, linting and server-side rendering
Stars: ✭ 86 (+168.75%)
Mutual labels:  eslint, prettier, babel, express, universal, boilerplate, react-router
React Cool Starter
😎 🐣 A starter boilerplate for a universal web app with the best development experience and a focus on performance and best practices.
Stars: ✭ 1,083 (+3284.38%)
Mutual labels:  webpack, prettier, express, axios, boilerplate, unit-testing, react-router
Reeakt
A modern React boilerplate to awesome web applications
Stars: ✭ 116 (+262.5%)
Mutual labels:  webpack, eslint, prettier, express, axios, jest, react-router
React
Extremely simple boilerplate, easiest you can find, for React application including all the necessary tools: Flow | React 16 | redux | babel 6 | webpack 3 | css-modules | jest | enzyme | express + optional: sass/scss
Stars: ✭ 244 (+662.5%)
Mutual labels:  webpack, babel, express, boilerplate, jest, react-router
Express Webpack React Redux Typescript Boilerplate
πŸŽ‰ A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (+387.5%)
Mutual labels:  webpack, eslint, babel, express, jest, react-router
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (+415.63%)
Mutual labels:  webpack, eslint, babel, boilerplate, code-splitting, react-router
React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (+615.63%)
Mutual labels:  webpack, eslint, prettier, babel, boilerplate, code-splitting
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (+103.13%)
Mutual labels:  webpack, eslint, prettier, babel, jest, react-router
React Ssr Setup
React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties
Stars: ✭ 678 (+2018.75%)
Mutual labels:  webpack, eslint, prettier, babel, express, react-router
React Boilerplate
Production-ready boilerplate for building universal web apps with React and Redux
Stars: ✭ 53 (+65.63%)
Mutual labels:  webpack, babel, universal, boilerplate, code-splitting, jest
Mostly
They mostly come at night; mostly.
Stars: ✭ 78 (+143.75%)
Mutual labels:  webpack, eslint, prettier, babel, express, jest
React Pages Boilerplate
Deliver react + react-router application to gh-pages
Stars: ✭ 134 (+318.75%)
Mutual labels:  webpack, eslint, babel, boilerplate, jest, react-router
React Ssr Starter
All have been introduced React environment
Stars: ✭ 20 (-37.5%)
Mutual labels:  webpack, eslint, prettier, jest, react-router
Nodejs Api Boilerplate
A boilerplate for kickstart your nodejs api project with JWT Auth and some new Techs :)
Stars: ✭ 364 (+1037.5%)
Mutual labels:  eslint, prettier, mongodb, express, boilerplate
Express Boilerplate
πŸš€ Starter project for a RESTful API in Node with Express & mongoose component-based
Stars: ✭ 9 (-71.87%)
Mutual labels:  eslint, mongodb, express, boilerplate, template
Project Webcube
Continuously updated JS infrastructure for modern web dev
Stars: ✭ 141 (+340.63%)
Mutual labels:  webpack, eslint, babel, boilerplate, react-router
Iceberg
Front-End Boilerplate built with React + Babel + Webpack + SASS
Stars: ✭ 144 (+350%)
Mutual labels:  webpack, eslint, babel, boilerplate, jest
React Typescript Web Extension Starter
πŸ–₯ A Web Extension starter kit built with React, TypeScript, SCSS, Storybook, Jest, EsLint, Prettier, Webpack and Bootstrap. Supports Google Chrome + Mozilla Firefox + Brave Browser πŸ”₯
Stars: ✭ 510 (+1493.75%)
Mutual labels:  webpack, eslint, prettier, jest, storybook

erb

πŸ”₯ πŸ”₯ πŸ”₯ Express react boilerplate πŸ”₯ πŸ”₯ πŸ”₯

dependency status devDependency status ESLint: airbnb-base code style: prettier github actions status CodeFactor MIT licensed

NPM

Features

Requirements

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 the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].