Giter VIP home page Giter VIP logo

hitch's Introduction

hitch

Hitch is a ride-sharing application for long distance carpools. Do you need to get from one city to another, but don't want to pay for a flight or Greyhound? Hitch provides users with the ability to search for rides on your trip date and join up with a driver and other passengers who are leaving from and going to the same place as you.

Ruby 2.2.1 Rails 4.2.4

Utilizes:

  • Devise 4.1.0 for user authentication and OmniAuth enabled
  • Bootstrap for styling
  • Figaro for encryption

hitch's People

Contributors

limichelle21 avatar

Watchers

James Cloos avatar  avatar

hitch's Issues

Carpool Model

Properties

  • Total price of Ride (Ride.payments.collect)
  • Ride ID
  • User ID (account for multiple users)
  • Number of riders

Relationships

  • belongs_to Ride
  • belongs_to Users
  • has_many Messages

Rating Model

Properties

  • rating ID (PK)
  • rating_value - integer
  • rating_comment - text
  • User_id

Relationships

  • belongs_to User

Ride Model

Properties

  • Ride ID
  • Ride date - date
  • Departure location - string
  • Arrival location - string
  • Price per seat - float
  • Payment - float (retrieve from Payment table?, add payments to this amount)
  • Total Seats - integer
  • Available Seats - integer
  • Reserved Seats - integer
  • Optional Notes - text
  • Total Amount (seats x price per seat) -- not visible - float
  • Completed - boolean (marks if ride has been completed or not - check Ride.date > currentDate)

Functions

  • Calculate number of seats available remaining
  • Calculate total amount of ride (ride.payments.collect)

When passenger books ride:

  • Send email to driver when passenger books ride
  • Send email to passenger indicating ride confirmed/payment success
  • Add amount paid to value in Payment field

Ride cancellation

  • Send email to driver
  • Refund money to passenger

Ride completed (based on date)

  • Send email to driver and passenger to rate each other
  • Store ride payment in Driver’s account?

Relationships

  • belongs_to User (set the driver owner relationship)
  • has_many Carpools (one Ride instance can have multiple Carpool instances)

Items to research

Active Model Serializers
Action Cable (Rails 5) for timeouts
ActionMailer for sending emails to drivers/passengers

User Model

Properties

  • User ID
  • Username - string
  • Email - string
  • Phone Number - string
  • Password - string
  • Bank Account token - string
  • Credit Card token - string
  • Card type - string
  • Last 4 digits - string
    [x] Ratings - integer Move this to a separate tble
  • Average Rating - integer
  • Verified - boolean

Functions

  • Save User rating (input from email responses) - ratings 1 - 5
  • Calculate User ratings (User.ratings.collect / User.ratings.length)
  • Avatar URL
  • Include Devise modules

Relationships

  • has_many Rides THROUGH Carpools
  • has_many Messages
  • has_many Carpools
  • has_many Payments
  • has_many Disbursements
  • has_many Ratings

Disbursement Model

Properties

  • Disbursement ID
  • Payment ID (can have multiple payment IDs associated with 1 disbursement) - integer
  • Stripe disbursement ID - integer
  • User ID (driver’s User ID for disbursement) - integer
  • Disbursed At timestamp - datetime

Functions

  • Allow driver to request disbursement from account (should this be a controller request?)
  • Disburse amount to driver upon request
  • Send email to driver indicating disbursement went through

-----> should this model handle returns as well?

  • Return payment amount to payor (payment.user)
  • Send email to passenger indicating return went through

Relationships

  • has_many Payments
  • belongs_to User (driver)

Message Model

Properties

  • Message sender (username) - string
  • Sent At - date
  • Content - text
  • Carpool ID - integer

Relationships

  • belongs_to Carpool
  • belongs_to User

Payment Model

Properties

  • Payment ID (created when passenger paid to App)
  • Carpool ID - integer
  • User ID (User who paid - passenger) - integer
  • Paid At timestamp - datetime
  • Stripe Transaction ID - integer
  • Disbursement ID (when payment is disbursed) - integer
  • Payment amount - float

Functions

  • Record timestamp for payment made ($ taken from passenger’s account)
  • Process payment from Stripe
  • Retrieve and store Stripe tokens and Stripe data
  • Save Disbursement ID from Disbursement to Payment record

Relationships

  • belongs_to Carpool
  • belongs_to Disbursement (Disbursement can have one or many payments associated with it)
  • belongs_to User (Driver)

Features/Issues

General

  • Angular-Devise working tokens
  • Search function from main page
  • Display list of rides that match search params
  • Select ride and display ride detail info (from click on ride in the list of rides)
  • Book ride -> input passenger details, number of seats booked
  • Process payment (Stripe Connect)

Drivers

  • Create rides
  • View messages
  • Send messages
  • View rides

Passengers

  • View messages
  • Send messages
  • View confirmed ride

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.