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.
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
}
Sarah, a regular commuter to UH Manoa, uses the app to:
Users can:
Rachel and Josh demonstrate how students can:
This project is currently in the initial development phase. We are:
git clone https://github.com/UH-Uber/UH-Uber-SourceCode.git
cd UH-Uber-SourceCode
npm install
.env.example
to .env
npx prisma migrate dev
npx prisma generate
npm run dev
We welcome contributions! Please feel free to submit a Pull Request.
Last Updated: December 15, 2024