A base project for modern web applications.
- React.js as the view layer.
- Redux for state management and Redux DevTools for debugging it.
- Babel and various plugins to transpile ES6 and JSX.
- Webpack as a module bundler and build tool, including a handy auto-reloading (HMR) development server and a robust production configuration. The front end gets a 100/100 score from Google PageSpeed Insights.
- Express to serve the app in production. The app gets an "A" from SecurityHeaders.io.
- CSS Modules and React CSS Modules for locally scoped CSS.
- TodoMVC example showcasing the use of React.js, Redux & CSS modules, along with a sensible directory structure.
- PostCSS for various CSS plugins, such as Autoprefixer.
- Lodash to downplay the lack of a standard library in JavaScript.
- ESLint with the Airbnb styleguide configuration and Stylelint to ensure code quality.
- fetch and Promise polyfills.
- React Router is a good routing solution, but one not required for the example app. It is quite trivial set it up yourself.
- Immutable is recommended for immutable data structures to be used along with Redux.
- A testing framework is not included, simply because there are so many different approaches. I recommend Karma and Enzyme, although screenshot testing is also excellent.
- Server-side rendering is also not included. If you require it, I suggest looking at the various examples elsewhere showcasing it. Depending on how you want to build your application, server-side rendering requires a more complex setup. For now, it will not be included in this project.
This project requires Node.js v6.1.0 or above. It is
best installed via nvm (nvm install 6.1
).
You may fetch the code and set up the project by running:
git clone [email protected]:hph/kit.git && cd kit
npm install
You can now run the server:
npm start
This will start the development server unless NODE_ENV
is set to production.