Joggify is a web application that allows users to track their jogging time and build up their motivation.
- For Back-end:
- Backbone:
rails 5.1
- Authentication:
devise
withdevise_token_auth
- Authorization:
pundit
- Rest APIs for all actions
- Test:
rspec
withfactory_bot
, e2e tests usechromedriver
andcapybara
. - Lint:
rubocop
with rules get from official rails project - Assets Bundler:
webpacker
- and some other gems
- For Front-end:
- Backbone:
react
16 withredux
(Single Page App with Flux architecture) - Router:
react-router
- UI framework:
material-ui-next
- Form handling:
redux-form
- Development:
webpack-dev-server
andreact-hot-loader
for Hot reloading when coding - Use Rest API calls to fully interact with back-end
- Lint:
eslint
with recommended rules for react - and some other node_modules
- Make sure your Environment is ready!
- Install
Ruby 2.4.3
with bundler. - Install
Node 6.12.3
or above. - Install
yarn
withnpm install -g yarn
. - Install chromedriver for e2e tests. (if you are using mac, you can easily install it using
brew install chromedriver
) - Have your local
Postgres
server ready, use version 9.4 or higher. - Pull latest source code of joggify to your computer.
cd
to the folder that store the source code.
- Configurate
- Update config/database.yml your local credentials for Postgres access.
-
Install libraries
# Install Gems bundle install # Install node_modues yarn install # Install foreman gem install foreman
-
Initialise the database
bundle exec rake db:drop db:create db:migrate
-
Seed the database with example data:
bundle exec rake db:seed
-
Start hacking by running
npm run dev
Done! You're ready to access the application: localhost:3000.
- Admin:
- Email:
[email protected]
- Password:
bob.admin
- Permission:
- This user can CRUD any time entry of any user
- This user can view time entries reports of any user.
- This user can CRUD any user.
- This user cannot delete himself.
- Manager:
- Email:
[email protected]
- Password:
alice.manager
- Permission:
- This user can CRUD time entry of herself.
- This user can view time entries reports of herself.
- This user cannot CRUD time entry of any other user.
- This user cannot view time entries reports of any other user.
- This user can CRUD any user who is
manager
oruser
. - This user cannot delete herself.
- This user cannot CRUD any admin user.
- User:
- Email:
[email protected]
- Password:
carol.user
- Permission:
- This user can CRUD time entry of herself.
- This user can view time entries reports of herself.
- This user cannot CRUD time entry of any other user.
- This user cannot view time entries reports of any other user.
- This user cannot CRUD any other user.
- This user cannot delete himself.
-
Run eslint and rubocop
# Check linting for js code npm run lint # Check linting for ruby code rubocop
-
Run Rspec Specs (E2E tests and Unit tests included)
bundle exec rspec
# Create Heroku app
heroku create
# Install addons for postgres and sendgrid
heroku addons:create heroku-postgresql
heroku addons:create sendgrid:starter
# First deployment
git push heroku master
# Migrate the database and generate seed data
heroku run rake db:migrate
heroku run rake db:seed
# Open your deployed app, yay!!!!
heroku open
I also deployed a sample app here for demo and testing Joggify on Heroku