This repository has been archived to make way for react-starter-kit
Template project to kickstart new web projects
I created this repository to serve as a starter kit to assist me in kickstarting new web app projects without the need of building from scratch or depend on various plugins/projects that use CLI commands.
Feel free to post issues or raise PRs if you found any bugs or areas that require improvement.
- Node.js v8.9.3 and above must be installed.
- Recommended to use yarn as package manager
- Copy dotenv file from
/deploy/local
folder into project root folder and rename to.env
yarn install
ornpm install
npm run dev:server
- Open http://localhost:6150 in web browser
- Powered by Node.js v8 + Koa v2
- UI rendered by React v16 + react-router-redux
- Based CSS styles provided by Milligram CSS
- styled-components for styling React components
- Server-side rendering
- Server-side rendered styles (via styled-components)
- Webpack for bundling front-end Javascript code
- Webpack hot module replacement + Koa HMR middlewares for instant review of changes without the need to constantly reload app
- Automatic Node.js app rebooting via Nodemon
- Eslint for code consistency and encourage better code writing styles
- Responsive components styled using styled-components
- Progressive web app (PWA)
- Tests *Coming soon*
- Vendor JS bundle for all third-party JS libraries
- Production ready bundles
- Gzipped bundles
- Helmet via koa-helmet
- CSRF protection via koa-csrf
- Better handling of custom fonts *Coming soon*
- Localization *Coming soon*
- Async redux action via redux-thunk
- Asynchronous module loading via Webpack code splitting + react-async-components
- Make sure the following set of commands are included in your deployment script
cp ./deploy/production/dotenv .env
yarn install
ornpm install
npm run build
npm run build
generates production-ready versions of Javascript bundles used by front-end app, and related static assets into the/dist/assets
folder. You should come up with your own post-deployment strategy to copy/move the files into appropriate storage locations and update your app code accordingly.
- Hosted demo app
- Cached server-side rendering
- React UI testing with Enzyme
- Accelerated Mobile Pages (AMP)
- ESLint
- Git Lens
- Node.js Extension Pack
- Prettier - Code formatter
- Auto Close Tag
- Auto Rename Tag
Note that you might want those settings to be added in the workspace settings and not globally. (espeically the editor.formatOnSave
part)
// Format a file on save. A formatter must be available, the file must not be auto-saved, and editor must not be shutting down.
"editor.formatOnSave": true,
// Enable/disable default JavaScript formatter (For Prettier)
"javascript.format.enable": false,
"editor.tabSize": 2,