Skip to content
This repository was archived by the owner on Apr 19, 2018. It is now read-only.

cssu/trackary

Repository files navigation

trackary

Inventory tracking & point-of-sale for the CSSU

Travis CI Code Climate Test Coverage

Overview

This is a Ruby on Rails app, consisting of four main components:

  • A storefront: a public page where users can browse items sold by the CSSU, with the price, the number of items in stock, and the amount of reward points required to redeem each item.
  • A customer portal: customers can log in to view their purchase history and reward points.
  • A point-of-sale activity: CSSU execs can log in and sell items (snacks/drinks/merchandise) to customers by selecting one or more items and processing the payment. The customer has the option of providing their UTORid to collect reward points.
  • An administration activity: CSSU execs with enough authorization can log in to view transaction history, manage users, edit the types of items sold by the CSSU, and adjust stock levels.

Useful links

Development

You need the following prerequisutes:

  • Ruby 2.1.2 (I recommend rbenv for managing ruby versions)

  • Bundler:

    gem install bundler

The rest of the dependencies can be installed by running:

cd trackary/
bundle install

Start a local test server by running:

rails server

Finally, run Guard in the background to continuously run tests:

guard

Deploying to staging

We're using Dokku to deploy the website to a DigitalOcean server.

To add your public key to the server, send it to the sshcommand command on the server. Assuming your public key is in ~/.ssh/id_rsa.pub:

cat ~/.ssh/id_rsa.pub | ssh [email protected] "sshcommand acl-add dokku <name>"

(Where <name> is any label you want for the key, probably your name)

Once your public ssh key has been added to Dokku, add the remote:

git remote add staging [email protected]:staging

Then, whenever you want to deploy, simply:

git push staging master

The site is live at http://staging.trackary.com

On the server, PostgreSQL is used as the database. See dokku-pg-plugin.

Deploying to production

Follow the same instructions as above, but use the following remote:

git remote add production [email protected]:trackary.com

The site is live at https://trackary.com

About

Inventory & Point-of-Sale for the CSSU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •