All Projects → elsewhencode → React Redux Saucepan

elsewhencode / React Redux Saucepan

Licence: mit
A minimal and universal react redux starter project. With hot reloading, linting and server-side rendering

Programming Languages

javascript
184084 projects - #8 most used programming language
flow
126 projects

Projects that are alternatives of or similar to React Redux Saucepan

Express React Boilerplate
🚀🚀🚀 This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.
Stars: ✭ 32 (-62.79%)
Mutual labels:  eslint, prettier, babel, express, universal, boilerplate, react-router
Js Stack Boilerplate
Final boilerplate code of the JavaScript Stack from Scratch tutorial –
Stars: ✭ 145 (+68.6%)
Mutual labels:  eslint, babel, express, boilerplate, react-router, server-side-rendering
Simple Universal React Redux
The simplest possible Async Universal React & Redux Boilerplate app, that works on both Mac and Windows
Stars: ✭ 58 (-32.56%)
Mutual labels:  eslint, babel, express, universal, react-router
Razzle Material Ui Styled Example
Razzle Material-UI example with Styled Components using Express with compression
Stars: ✭ 117 (+36.05%)
Mutual labels:  express, universal, boilerplate, ssr, server-side-rendering
Reeakt
A modern React boilerplate to awesome web applications
Stars: ✭ 116 (+34.88%)
Mutual labels:  eslint, prettier, express, ssr, react-router
Pwa
An opinionated progressive web app boilerplate
Stars: ✭ 353 (+310.47%)
Mutual labels:  eslint, babel, universal, boilerplate, react-router
Project Webcube
Continuously updated JS infrastructure for modern web dev
Stars: ✭ 141 (+63.95%)
Mutual labels:  eslint, babel, boilerplate, react-router, server-side-rendering
React Ssr Setup
React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties
Stars: ✭ 678 (+688.37%)
Mutual labels:  eslint, prettier, babel, express, 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 (+1159.3%)
Mutual labels:  prettier, express, boilerplate, react-router, server-side-rendering
Express Mongoose Es6 Rest Api
💥 A boilerplate application for building RESTful APIs Microservice in Node.js using express and mongoose in ES6 with code coverage and JsonWebToken Authentication
Stars: ✭ 2,811 (+3168.6%)
Mutual labels:  eslint, babel, express, boilerplate
react16-seed-with-apollo-graphql-scss-router4-ssr-tests-eslint-prettier-docker-webpack3-hot
Seed to create your own project using React with Apollo GraphQL client
Stars: ✭ 19 (-77.91%)
Mutual labels:  react-router, eslint, ssr, prettier
Mostly
They mostly come at night; mostly.
Stars: ✭ 78 (-9.3%)
Mutual labels:  eslint, prettier, babel, express
React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (+166.28%)
Mutual labels:  eslint, prettier, babel, boilerplate
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (+91.86%)
Mutual labels:  eslint, babel, boilerplate, react-router
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (-24.42%)
Mutual labels:  eslint, prettier, babel, react-router
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (+81.4%)
Mutual labels:  eslint, babel, express, react-router
React Pages Boilerplate
Deliver react + react-router application to gh-pages
Stars: ✭ 134 (+55.81%)
Mutual labels:  eslint, babel, boilerplate, react-router
Nodejs Api Boilerplate
A boilerplate for kickstart your nodejs api project with JWT Auth and some new Techs :)
Stars: ✭ 364 (+323.26%)
Mutual labels:  eslint, prettier, express, boilerplate
Budgeting
Budgeting - React + Redux + Webpack (tree shaking) Sample App
Stars: ✭ 971 (+1029.07%)
Mutual labels:  eslint, prettier, babel, react-router
React Isomorphic Boilerplate
🌟 An universal React isomorphic boilerplate for building server-side render web app.
Stars: ✭ 653 (+659.3%)
Mutual labels:  eslint, babel, boilerplate, server-side-rendering

Elsewhen

React Redux Saucepan

Build Status PRs Welcome

dependencies Status devDependencies Status

Code style: airbnb GitHub license

A minimal Universal React redux JS stack using Flow, with hot reloading, linting and server-side rendering.

This is a universal react project. It provides server-side rendering and uses Flow syntax. We put together React Redux Saucepan here at elsewhen, and included the things you most likely need and take out the things you may not want. We also do our best to keep this maintained and updated. Posting any issues, questions, suggestions and PRs are more than welcome :).

What's inside

What's inside

react 16

react-router 4

react-redux 4

redux 4

webpack 4

express 4

react-hot-loader 4

flow

prettier

styled-components

eslint

stylelint

babel(env)

Quick start

Getting started

First make sure you have at least node 8, and we recommend using npm 6

  • Clone the repo,
git clone  https://github.com/elsewhencode/react-redux-saucepan
  • Then enter the folder react-redux-saucepan
cd react-redux-saucepan
  • Install the dependencies
npm i
  • Start developing, or...
npm run start:dev

Open http://localhost:3000 to view it in the browser.

Commands

Commands

  • To build for production and start the server (includes Flow and Lint check in webpack build):
npm start
  • To only build in production (it dumps the files in dist folder):
npm run build
  • To start in develop with hot reloading (includes babel-watch for server-side code changes):
npm run start:dev
  • To run a type check and a flow coverage report:
npm run flow
  • To check code style (for both stylelint and eslint):
npm run lint
  • Runs the tests (if there is any)
npm test

Project Structure

Project Structure

.
├── dist
|   
├── docs
|
├── flow-typed
|
├── scripts
|   ├── webpack.client.js
|   ├── webpack.dev.js
|   └── webpack.server.js
|
├── src
|   ├── client
|   |   └── ...
|   |
|   ├── server
|   |   └── ...
|   |
|   ├── shared
|   |   ├── api
|   |   |   └── ...
|   |   |
|   |   ├── components
|   |   |   └── ...
|   |   |    
|   |   └── pages
|   |       └── ...
|   |
|   └── util
|
└──  static

So, what is client,server and shared folders?

Work in progress...

Why reducers and containers are in pages?

Work in progress...

Developing

Developing

When running in development mode, there will be an express file: ./src/server/index.dev.js that serves you. It will consume your dev webpack config in ./scripts/webpack.dev.js using webpack-dev-middleware. It will throw an empty html file (./src/server/html.js) which initiates the react app on browser (there is no server-side rendering in dev mode). This is the same html file that gets used in production, so you an have the same meta, favicon etc.. . Instead of using node to run index.dev.js we use babel-watch. This enables you to use latest JS syntax on the server and watch for any changes and reload it if necessary.

There is hot reloading available to make development easier for you. Eslint, flow and stylelint are also checked on the fly as you add new code to the project. ./scripts/webpack.dev.js sets the global __DEVELOPMENT__ to true which you can use in your code.

To run the app in development mode, simply run: You can build the app by running:

npm run build

Building for production

production

Build is done by webpack for both server-side and client-side. The output is set to ./dist folder which is Webpack's default output directory. The process includes Flow type checking, linting, and transpiling for both client and server. You can find webpack configs in ./scripts folder.

Transpiling is set in .browserslistrc using browserslist for your target browsers and done by babel-env.

There are global variables set to help you check whether you're on client or server in the runtime: __CLIENT__ and __SERVER__. Also both client and server webpack configs will set __PRODUCTION__ global to true and __DEVELOPMENT__ to false.

You can build the app by running:

npm run build

the you can run the app by running:

node dist/index.js 

build script is also set as a prestart for starting the app in production mode. So you can run above steps at once:

npm start

Configuration

Values that can set by developer are PORT, and HOST that can be set in a .env file which is read by ./config.js and then used across the app.

Tests

Tests

We havn't written any test yet and it's in our todo list is in our to do list. 🙈

npm test

Project guidelines

Project guidelines

We try to follow our Javascript project guidelines as much as we can, but we also like to keep this app quite minimal. You will find most of the Elsewhen's project guidelines in the tools we use and the way folders are structures, as well as naming, linting and chosen dependencies.

Code style and linting

code style

This project uses Airbnb's javascript style guide for Javascript syntax and flowtype/recommended for Flow syntax using eslint-plugin-flowtype.

For styles we use stylelint-config-standard which is checked by Stylelint. This checks your style-components code using stylelint-processor-styled-components.

You can check your code style by simply running:

npm run lint

Api

Project guidelines

React Redux Saucepan uses Github rest api to represent some sample data. You can find the requests done by axios in ./src/shared/api/index.js. Api calls are made in both client and server side (to include the data in server-side rendered markup).

License

React Redux Saucepan is open source software licensed as MIT.

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].