acdcjunior / pocket-stars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pocket-stars

A very simple realtime review+rating app powered by Rails and React/jQuery.

Demo:

See the ADRs folder for important architectural notes.

Development

Initial setup

$ cd pocket-stars # go to project root
$ bundle install
$ rails webpacker:install

Database setup

You now need to setup a database. This app uses MySQL. You can use the docker-compose file in _dev:

$ cd pocket-stars # go to project root
$ cd _dev
$ docker-compose up

For maintenance using a UI, you can open http://localhost:8888/ and use the credentials: server=db, user=root and password=pass.

Database migration

$ cd pocket-stars # go to project root
$ rake db:create
$ rake db:migrate

Starting the app

$ cd pocket-stars # go to project root
$ rails server

App should now be accessible on http://127.0.0.1:3000/.

Running tests

$ cd pocket-stars # go to project root
$ rake db:create RAILS_ENV=test # if you haven't already
$ rake db:migrate  # if you haven't already
$ rails test # all but system tests
$ rails test:system # system tests
$ rails test:all # ALL tests

Troubleshooting: if you tests fail randomly due to parallel execution (e.g. file locking, streams closing), try disabling it at test_helper.rb.

About


Languages

Language:Ruby 44.5%Language:JavaScript 36.8%Language:SCSS 9.9%Language:HTML 7.8%Language:CSS 0.9%