UH-Uber

UH Manoa Ride Share

Overview

UH Manoa Ride Share is a web application designed to address a critical challenge faced by UH Manoa students: the difficulties of campus commuting. With limited, expensive parking and sometimes inconvenient public transportation options, many students resort to driving alone, contributing to increased traffic, higher transportation costs, and elevated carbon emissions.

Our solution connects students who share similar routes and schedules, facilitating an efficient carpooling system that benefits both the community and the environment.

Goals

Key Features

1. Welcome Page

2. User Dashboard

3. Ride Posting

5. User Profiles

Special Features

Carpool Mapping

Community Board

Safety Features

Technical Implementation

Here’s a code snippet demonstrating how we generate our prisma db.

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  id             Int           @id @default(autoincrement())
  email          String        @unique
  password       String
  role           Role          @default(USER)
  avatarUrl      String?
  bio            String?
  campusLocation String?
  createdAt      DateTime      @default(now())
  name           String?
  phone          String?
  pronouns       String?
  updatedAt      DateTime      @updatedAt
  offeredRides   Ride[]        @relation("DriverRides")
  bookedRides    RideBooking[]
}

model Ride {
  id             Int           @id @default(autoincrement())
  driverId       Int
  startLocation  String
  endLocation    String
  departureTime  DateTime
  availableSeats Int
  status         RideStatus    @default(PENDING)
  description    String?
  createdAt      DateTime      @default(now())
  updatedAt      DateTime      @updatedAt
  driver         User          @relation("DriverRides", fields: [driverId], references: [id])
  bookings       RideBooking[]

  @@index([driverId])
}

model RideBooking {
  id          Int        @id @default(autoincrement())
  rideId      Int
  passengerId Int
  status      RideStatus @default(PENDING)
  createdAt   DateTime   @default(now())
  updatedAt   DateTime   @updatedAt
  passenger   User       @relation(fields: [passengerId], references: [id])
  ride        Ride       @relation(fields: [rideId], references: [id])

  @@unique([rideId, passengerId])
  @@index([rideId])
  @@index([passengerId])
}

model Stuff {
  id        Int       @id @default(autoincrement())
  name      String
  quantity  Int
  condition Condition
  owner     String
}

enum Role {
  USER
  ADMIN
}

enum RideStatus {
  PENDING
  ACTIVE
  COMPLETED
  CANCELLED
}

enum Condition {
  excellent
  good
  fair
  poor
}

Development Stack

Use Cases

Daily Commuter

Sarah, a regular commuter to UH Manoa, uses the app to:

Environmental Champion

Users can:

Semester Schedule Matching

Rachel and Josh demonstrate how students can:

Project Team

Development Status

This project is currently in the initial development phase. We are:

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/UH-Uber/UH-Uber-SourceCode.git
    cd UH-Uber-SourceCode
    
  2. Install dependencies:
    npm install
    
  3. Set up environment variables:
    • Copy .env.example to .env
    • Configure required variables
  4. Set up the database:
    npx prisma migrate dev
    npx prisma generate
    
  5. Start the development server:
    npm run dev
    

Contributing

We welcome contributions! Please feel free to submit a Pull Request.


Last Updated: December 15, 2024