StarHackIt is a ES6/ES7 React/Node starter kit
Fullstack web application starter kit written in es6/es7 with react and node.js with the following features:
- Authentication: username/password, facebook, google authentication etc ...
- Authorization: scheme using user, group and permission
- Scalable by using a micro services based architecture, a.k.a message queues
- Relational database: postgres, mysql, sqlite, mssql etc, ...
- Logging
Technologies:
- React: a facebook library to build user interfaces.
- Koa: next generation web framework for Node.js.
- Sequelize: Object Relationship Management (ORM) supporting majors relational SQL database.
- PostgreSQL: the world's most advanced open source relational database.
- RabbitMq: messaging system.
- Passport: authentication framework with more than 140 authentication strategies: username/password, facebook , google, github etc ...
- Winston: a multi-transport async logging library.
- Nodemailer: send email with various provider.
- Babel: A es6/es7 compiler.
- Gulp: automate and enhance your workflow.
- Webpack: module bundler for the browser
- Mocha: test framework.
- Sinon: test spies, stubs and mocks.
- Eslint: The pluggable linting utility for JavaScript and JSX.
- Travis: Test and deploy.
- CodeClimate: Automated code review
- Coveralls:
- DevLab: Containerize your development workflow.
- Trevor: Your own Travis CI to run tests locally.
Workflow
Yeoman generator
The easiest way to bootstrap your application is to use the Starhackit Yeoman generator.
First install yo and generator-starhackit globally:
npm install -g yo generator-starhackit
Finally, initiate the generator and answer the questions about your project:
mkdir yourproject && cd $_
yo starhackit
Docker containers
To install the docker containers for the various services such as RabbitMq and Postgres on the local machine, the DevLab project is being used to containerize the development workflow, see its configuration file: devlab.yml
# cd server
# npm run devlabinstall
To check that the containers are running:
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ccd9f559fabd rabbitmq:latest "/docker-entrypoint.s" 36 minutes ago Up 36 minutes 4369/tcp, 25672/tcp, 0.0.0.0:5672->5672/tcp devlab_rabbitmq_frederic_1446641005596
Backend
Before running the backend, check and modify the configuration located at server/config/default.json. Don't forget to correctly set the rabbitmq server location.
To start the backend:
# cd server
# npm start
To test the backend:
# npm test
It will not only test the code, but also checks the source code with eslint and generates a code coverage report located at coverage/lcov-report/index.html
For more information about the backend, see its README
Frontend
To run the frontend webserver:
# npm start
For more information about the frontend, see its README
Deployment
License
See LICENSE
Author
Crafted with passion by Frederic Heem