Another one fucking boilerplate
Hell yeah. 18+
Global requirements
- Linux, Mac
- Node.js 4+
- npm
- MongoDB 3.2+
- Redis 3+
- pm2 (for production)
- server for static content (for production, Nginx is recommended)
Some of these requirements may be excessive for you.
Getting Started
dev configuration: npm run dev
prod configuration: npm run prod
deploy: npm run deploy
Dev, prod settings in config/
Deployment settings in shipitfile.js
Features
- Isomorphic rendering for node.js and browser with React
- Isomorphic routing for node.js and browser with React Router
- Babel for new JS features: es2015, stage-2, JSX for React
- Same JS for node.js and browser.
- Webpack for bundling
- PostCSS and plugins:
- CSS modules
- I18N modules, like CSS modules, but for i18n
- Optimizations of the client bundle
- Automatic image optimization and inlining when it is possible
- Polyfills
- Babel polyfill
- Fetch
- Cache busting
- Auto rebuild
- Express server
- Redis
- MongoDB
- Data validation for MongoDB
- Providing data for components in one response
- API for components
- Flux-like architecture
- ESLint
- CSSComb
- BDD tests with Mocha, Chai, Sinon, Nock
- Istanbul for code coverage
- Production configuration is included
- Deploying with Shipit in one command
- One command rollbacks
- Travis CI
- Coveralls
- HTML best practice from HTML5 boilerplate
- To-do list example
- Up-to-date dependencies
Directories
.
βββ client
βΒ Β βββ components
βΒ Β βββ public
βββ config
βΒ Β βββ common
βΒ Β βββ server
βββ db
βββ lib
βββ server
βΒ Β βββ api
βΒ Β βΒ Β βββ components
βΒ Β βββ models
βΒ Β βββ providers
βββ test
βββ client
βΒ Β βββ components
βββ lib
βββ mocks
βββ server
βββ models
βββ providers
Architecture
Roadmap
- Service workers
- Streaming server-side rendering
- Per-page resource loading
- Integrate useful hipster technologies to be hot and fashionable
Note
This is my own boilerplate for my personal usage.
Contributing
License
MIT