A hapi React Starter kit with react-router, redux, react-transform
Light and fast - Don't be sad, be hapi!
Inspired by
This repo was inspired by the following projects and their authors
- react-kickstart by Alessandro Arnodo
- react-isomorphic-starterkit by RickWong
- react-transform by Dan Abramov
- webpack-express-boilerplate by Christian Alfoni
- Heavily based on Erikras' react-redux-universal-hot-example
- redux-react-router-async-example by emmenko
- hapi-socketio-redis-chat-example by dwyl
- Scaling Redis/Socketio redispubsub
##Features
- Hapi server framework for Node. - hapijs
- React JS Library for user interfaces. - reactjs
- Webpack + React-transform and react-transform-hmr
- React Router keeps your UI in sync with the URL. - react-router
- Flux implementation - Redux
- Document Head SSR by React-Helmet
- ES6 and ES7 ready. - BabelJs
- Linting with eslint & jscs
- Testing with karma, mocha, isparta, webpack, sinon-chai
- Coverage with karma-coverage
- API Interface - Swagger
- API Validation - Joi
- Database for storing user data (CRUD) - Redis
- Password encryption - Iron
- Promises - bluebird
- Fetch isomorphic-fetch
- Authentication Oauth2 - Refresh/Access tokens
- Token Encoding with node-jsonwebtoken
- Token Encryption with node-forge
- i18n - react-intl by yahoo
- Real-time messaging - Socket.io
- Inline CSS Styling - Radium
- OpenShift deployment READY.
Theming System WIP
- Drop in themes
- Drop your theme inside the
Themes
folder and it will just work.
- Drop your theme inside the
- Theme switcher extension: swtich to other themes on the fly.
- Fallback to default theme.
- Themes included
- Default (light theme)
- Alternative (dark theme)
- Powered by Radium.
Extensions System WIP
- Drop in extensions
- Drop your extension inside the
Extensions
folder and it will just work. - Extensions can have react components and redux reducers.
- new Extensions can have pages, translations, and menu items
- Drop your extension inside the
- Examples included
- Counter
- Theme switcher.
- new Paypal Payments
User Accounts
- Create/Update user accounts
- Login/Logout
- Set language (english/spanish)
- Access/Refresh token sessions (Oauth2)
User Rooms (powered by socket.io)
- Users can create multiple chat rooms
- Users can see who is typing
http://hapi-reactstarterkit.rhcloud.com/
Clone this repository
git clone https://github.com/Dindaleon/hapi-react-starter-kit.git
Or
npm i hapi-react-starter-kit
Install
npm install
Production server
npm run prod
Development server
npm run dev
Linting
npm run eslint
npm run jscs
Testing
To check coverage check the coverage folder after running the test. Tests are incomplete.
npm test
API Interface
Path: /api/v1/documentation
Deployment Guide
##Todo
- testing, testing, testing...
- improve redux implementation
- Testing
- Coverage
- Linting
- Coveralls support
- add redis
- add socketio
- add authentication
- OpenShift Deployment guide
- Heroku Deployment guide
- Documentation
- Fix webpack's HMR on server
- Implement error handling on react components
- Implement geolocalization
- Implement styling and theming system
- Implement layout system for themes
- Implement extensions system
- Implement pages system with routing
- Invalidate reducers
- More translations
- Multiple Session Management
- Re-structure components and pages
- Scaling Redis/Socketio
- Social integration with bell for user accounts
The MIT License (MIT)
Copyright (c) 2015 Roberto Ortis
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.