This kit has all what you need to start new app ;) You can find here integrated React with Redux and Router, implemented simple JWT (JSON Web Tokens) authentication, CSS Module and all is isomorphic so Server Side Rendering works great. Dev server works with hot reloading (with react and css modules).
Go below to read about all used tools and technology.
After clone repository you need to run:
npm install
npm run dist
for build filesnpm run serve
and go to pagehttp://localhost:3000
for dev server
npm run dist [-- --api_uri]
- compiling files (files version for productionNODE_ENV=production
) - you can useapi_uri
parameter to changeapi_uri
config valuenpm run server [-- --api_uri]
- running simple node server - without compile so you need rundist
method first - you can useapi_uri
parameter to changeapi_uri
config valuenpm run serve [-- --api_uri]
- running hot dev server (default onhttp://localhost:3000
) - you can useapi_uri
parameter to changeapi_uri
config value (example:npm run serve -- --api_uri=http:\/\/localhost:8080\/api\/v1\/
)npm run test
- running mocha testsnpm run test-watch
- running mocha tests in watch modenpm run lint
- running eslint
Check package.json
for aliases.
- Add isomorphic pre-fetching data
- Change pre-fetching data to use decorators
- Internationalization
- Authorization (for pages/components)
- Write tests
- Better documentation
.
├── bin # Scripts for npm run
├── public # All built files (At this address should indicate the URL)
│ └── mock-api # Mocked API files (only for example) - You can delete them
├── src # Application source code
│ ├── actions # Redux actions
│ ├── components # React Components
│ │ └── index.js # File with all exported reducers (for easy use)
│ ├── containers # React Components but for pages structures
│ │ └── index.js # File with all exported reducers (for easy use)
│ ├── helpers # Helper scripts
│ ├── middleware # Redux middleware
│ ├── reducers # Redux reducers
│ │ └── index.js # File with all exported reducers (for easy use)
│ ├── stores # Redux stores configuration
│ ├── app.js # Application root file
│ ├── dev-server.js # Application dev server root file
│ ├── routes.js # Application routes definitions
│ └── server.js # Application server root file
├── .eslint # ESLint config file for IDE
├── config.js # Base config file - used by Webpack, Babel, Webpack Isomorphic Tools, SSR and more
├── isomorphic-tool-config.js # Config file for Webpack Isomorphic Tools
└── webpack-config.js # Config file for Webpack
Tests must be in the directory __tests__
which should be in the ./src
or deeper (check ./src/actions/__tests__
). The test
commands search for ./src/**/__tests__/**/*.js
.
webpack
- https://webpack.github.iobabel
- https://babeljs.iowebpack-isomorphic-tools
- https://github.com/halt-hammerzeit/webpack-isomorphic-toolscss-modules
- https://github.com/css-modules/css-modulespostcss
- https://github.com/postcss/postcss-loaderautoprefixer
- https://github.com/postcss/autoprefixermocha
- https://mochajs.orgchai
- http://chaijs.com
react
(JSX) - https://facebook.github.io/reactredux
- https://github.com/rackt/reduxreact-router
- https://github.com/rackt/react-router andredux-router
- https://github.com/rackt/redux-routerES2015/ES2016
(babel; ES6 and stage-0 - ES7) - https://babeljs.io/docs/learn-es2015isomorphic-fetch
- https://github.com/matthew-andrews/isomorphic-fetch (https://github.com/github/fetch)material-ui
- http://www.material-ui.comsass
(node-sass
) - http://sass-lang.comlodash
- https://lodash.comhumps
- https://github.com/domchristie/humpsnormalizr
- https://github.com/gaearon/normalizrnormalize.css
- https://github.com/necolas/normalize.cssreact-helmet
- https://github.com/nfl/react-helmet
- node
>=5.2.0
- npm
>=3.3.12
The MIT License (MIT)