Giter Site home page Giter Site logo

monteszama's Introduction

Monteszama

Simple application to improve food ordering process in company full of hungry developers :)

Requirements/flow:

  • sign in with GitHub account

  • signed in user can add an order (with description like ‘chinese’, ‘pizza’)

  • permalink is generated after creating an order

  • after entering the permalink, one can add only one item (name and price)

  • the order owner can close it (and only him/her)

  • after closing order, a person to call the restaurant is chosen randomly

  • if the order is closed, everyone can see the summary: who order what and for how much

  • orders history is public

  • remember/add who paid and how much

  • tests! rspec/minitest

  • cucumber as super hyper plus

  • layout on bootstrap is enough

  • deployment on heroku

My idea for the solution

M is for model

Order

  • id (int)

  • desc (string/text)

  • owner_id (int) [index]

  • caller_id (int) [index]

belongs_to owner (class user), has_one caller (class user), has_many items, has_many payments

Item

  • id (int)

  • name (string)

  • price (float)

  • order_id (int) [index]

  • user_id (int) [index]

constraint on order_id, user_id !!!

belongs_to order, belongs_to user

User

  • id (int)

  • login (string)

  • email (string)

has_many orders, has_many items, has_many payments

Payment

  • id (int)

  • order_id (int) [index]

  • user_id (int) [index]

constraint on order_id, user_id

belongs_to order, belongs_to user

Some additional informations

  • order history is set as root. If user is not logged in, he/she can do nothing but watch (a little creepy choose of words?)

  • user logged in can create new order or enter a link sent by order owner

  • WARNING!: if user is logged in and he/she received link to an closed order, he/she won’t be able to view it. Closed orders are so called ‘summary’ and are available only for users that added item to it (+ order owner can see it of course)

  • payments are added at the end, only owner can add them

  • if order item list is empty and order owner closes it, he/she will be automaticaly choose as caller (I thought it’s better that way, but I might be wrong here)

  • test are ummm… not very complicated. I did only model tests, as my Internet connection gives me the creeps and I can barely work with it (hotspoting from phone is not a very good solution)

monteszama's People

Contributors

ktatomir avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.