Skip to content

qoosuperman/goodbuy

Repository files navigation

GoodBuy!

GoodBuy makes you BuyGood!

Want to buy something with your colleagues/friends but still bothered by handling complicated orders?

Goodbuy provides a platform which helps people arrange orders / manupulates calculations and even collects the money for you!

Table of content

Requirements
Usage

Manage groups if you are a owner

  • Create a new group
  • Create a group with public menu
  • Create a group with previous one
  • Edit a group which you've created
  • Close a group
  • Monitoring group status

Attend groups if you are a buyer

  • Buy things
  • Monitoring group status
  • Add to favorites

Requirements

  • Ruby version 2.6.0
  • Rails version 5.2.3
  • PostgreSQL 11.3
  • Redis 5.0.5
  • Mailgun account
  • Amazon S3 account

Usage

Install Dependency

$ bundle install

Prepare Database

If you didn't have database.

$ rails db:create
$ rails db:migrate

Start server

Start Rails server.

$ rails s

Create public menus

Create public menus that are suitble to use directly:

$ rails db:seed
$ rake group:generate_drink
$ rake group:generate_rice
$ rake group:generate_drink2

Modify application.yml file

To make Action Mailer & Active Storage work, you should customize your own application.yml file,for more info, please check application.yml.sample file and fill in your own mailgun and Amazon S3 account information.

Check routes:

Check rails routes for more detail:

$ rails routes
Pages Prefix URI Pattern
User sign up: new_user_registration /users/sign_up(.:format)
User sign in: new_user_session /users/sign_in(.:format)
User edit: edit_user_registration /users/edit(.:format)
Groups you owned: my_groups /groups/my(.:format)
Groups you attended: attend_groups /groups/attend(.:format)
Public menus: public_groups /groups/public(.:format)
Buy things: buy_groups /groups/:id/buy(.:format)
Edit group: edit_groups /groups/:id/edit(.:format)
Create a new group : new_groups /groups/new(.:format)
Monitor group status: group /groups/:id(.:format)
Groups you followed: show_follow_groups /groups/show_follow(.:format)

Manage groups if you are a owner

After login with email or with Facebook/Google account, if you want to be a group owner, there are some options for you

  • Create a new group

Visit /groups/new, you are able to build a new group with group title, products, options, etc...

  • Create a group with public menu

Sometimes it's really lousy to type all the products / options all over again. One option for you is to build one with public menu! Just visit /groups/public and choose one public menu you like, and of course you can customize what you really need.

  • Create a group with previous one

If you've already created a group before, and need to copy the same group again. No problem! Visit /groups/my and you can copy a group just by clicking the green button in status column.

  • Edit a group which you've created

Maybe you've created a group but forgot to add some prodcuts / options? You can add as many as you want by visiting /groups/:id/edit. However, you can NOT remove a product / option which is already chosen by someone.

  • Close a group

As a group owner, surely you have the right to close the group, once you close the group, no one can buy things in this group.

  • Monitoring group status

Just visit /groups/:id, GoodBuy has already build a table for you to monitor the current status, including how many people attend the group, the total price, etc...


Attend groups if you are a buyer

Once a group owner share a link with you, you are able to attend a group after login.

  • Buy things

Visit buy group page and now it's your shopping time! You can also

  • Monitor group status

Also, you can monitor the current status of the group you've attended. The only difference is that you are NOT authorized to edit the group unless you are the owner.

  • Add to favorites

Sometimes, you are just not in the mood to buy something, but still interested in some groups, right? At this moment, you are able to add this group to your favorite. You can buy things later or create a group with same information after the current group is closed.