Demo Page - contains classic todo list, async server call, and 404 page with random moe images. (Support multi-language, currently English, Chinese, and Japanese)
- [x] yarn - dependency manager
- [x] express - node.js web framework for backend
- [x] postgresql - advanced open source database
- [x] materialize - a modern responsive front-end framework based on Material Design
- [x] sass - CSS pre-processors
- [x] postcss - CSS post-processor
- [x] css-modules - for default scoped/local css
- [x] webpack 4 - module bundler
- [x] webpack-dev-server - serves a webpack app in development mode with hot reload
- [x] followed ES6 standard
- [x] react-hot-loader 4 - hot module reload!
- [x] react-router 4 - declarative routing for React
- [x] react-redux 6 - the official react bindings for redux 4 (a predictable state container for js apps)
- [x] react-saga - make redux asynchronous flows easy to read, write and test, the replacement for redux-thunk
- [x] connected-react-router 6 - a redux binding for react-router 4, the replacement for react-router-redux v5
- [x] react-i18next - internationalization for react done right
- [x] immutable.js - persistent Immutable data structures for react redux state management
- [x] editorconfig - maintain consistent coding styles between different editors and IDEs
- [x] tslint - lint typescript files (.ts, .tsx)
- [x] stylelint - lint style files (.css, .scss)
- [x] commitlint - lint git commit messages
- [x] coveralls - test coverage
- [x] husky - git hooks
- [x] circle-ci 2 - continuous integration tool for testing and deployment
- [x] heroku - a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.
- [x] docker - the open-source application container engine
- [x] RESTful API design - follow RESTful api design best practice
How to run the sample code
The easiest way to run the example project is to use
docker-compose up --build
that's it :)
You can also follow instructions below if you want to customize it.
Install project dependencies
Go to project root directory:
If you find permission problem when trying to install yarn globally, check this out.
Setup database and session store
You can either
redis using docker images:
docker-compose up -d postgres redis
- maintain it by yourself, if so, make sure you set the right config in
Build & Run
On development (with hot reload):
On production (with terser and other optimazitions):
Profile assets bundle
Thanks to webpack-bundle-analyzer, assets bundle can be analyzed and optimized through DLL Plugin.
Every push on master branch will trigger Github Actions for heroku deployment.