MacKentoch / react-redux-graphql-apollo-bootstrap-webpack-starter

react js + redux + graphQL + Apollo + react router + hot reload + devTools + bootstrap + webpack starter
https://mackentoch.github.io/react-redux-graphql-apollo-bootstrap-webpack-starter
125 stars 33 forks source link
apollo apollo-client boilerplate bootstrap graphql nodejs postcss react react-apollo react-hot-loader-3 react-router react-router-v4 reactjs redux redux-devtools redux-devtools-extension router scaphold webpack webpack3

Full ES6+ React + React-Router + Redux + GraphQL + Apollo + Bootstrap with Hot Reload and redux-devtools STARTER

My new React + redux project starter. This time I add graphQL and Apollo Client. This starter also embeds JWT token based authentication (check Route to get an example of dealing with protected routes).

preview

New πŸŽ‰ since v3.0.0!

Detailed Content

Front:

Tool chain:

tests:

Usage

Prerequisite

Node JS version required is >=6.x.

Build with node js v8.x but should be ok with node js 6.x.

Better use nvm to manage your Node JS versions.

server

An Easy and fast way to get your graphql backend is to register for free at Scaphold.

This starter has been created with a scaphold free plan.

Go to Scaphold register and create an application

create_app_modal preview

You will be able to dicover predefined schemas. This starter will not need more than predefined (User):

schema_desiner_overview.png

GraphiQL is integrated in Scaphold so discover and train predefined graphQL queries and mutations:

graphiQL_overview.png

Configure starter application:

In Scaphold click on My API and copy your application link.

Then, past it (to replace http://localhost:8080/graphql) in your networkInterface in the app config (in ./src/front/config.index.js):

export const appConfig = {
  // apollo client:
  apollo: {
    networkInterface: 'http://localhost:8080/graphql'
  }
};

from now you got all needed to run this starter

Install dependencies

npm install

run dev : hot reload mode (+ redux-devtools-extension)

npm run start

NOTE: be sure you already installed redux-devtools-extension in your browser to get the best development experience.

bundle dev mode (+ redux-devtools)

npm run dev

tests

npm run test

Analyze production bundle (PWA friendly)

npm run analyze

bundle production mode

npm run prod

run dev bundle

npm run start-spa-dev

run prod bundle

npm run start-spa-prod

Donate

Do you use & like react-redux-graphql-apollo-bootstrap-webpack-starter but you don’t find a way to show some love? If yes, please consider donating to support this project. Otherwise, no worries, regardless of whether there is support or not, I will keep maintaining this project. Still, if you buy me a cup of coffee I would be more than happy though πŸ˜„

Support via PayPal

License

The MIT License (MIT)

Copyright (c) 2019 Erwan DATIN

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.