A webapp application built with the MERNN (MongoDB, Express, React, Node.js, React Native) stack. It enables users to share rides, either as drivers offering seats or as passengers booking a seat in an existing ride. FareShare integrates Firebase Authentication for secure user sign-in and OTP-based ride verification to ensure passenger safety.
- User Authentication: Sign up and log in with email/password via Firebase Auth
- Driver Registration: Submit driver details (license number, car name, available seats)
- Ride Hosting: Drivers create rides with origin, destination, date/time, cost, and seat count
- Ride Search & Booking: Passengers search available rides, book seats, and receive a unique OTP
- OTP Verification: Drivers start rides by validating each passenger’s OTP via a modal
- Ride Status & Mapping: View ongoing rides on a map (Mapbox integration) with real-time status
- Profile Management: Update personal and driver information in-app
- Group Rides: Create and join carpool groups to share recurring journeys
- Backend: Node.js, Express.js, Mongoose (MongoDB)
- Authentication: Firebase Authentication
- Mobile Frontend: React Native (Expo), Expo Router
- Mapping: Mapbox GL JS for React Native web view
- Database: MongoDB Atlas or local MongoDB
- Node.js (v14+)
- npm (v6+)
- MongoDB instance or MongoDB Atlas cluster
- Firebase project with Web configuration and service account JSON
-
Clone the repository from VScode or any terminal and navigate inside the directory.
git clone https://github.com/UOA-CS732-S1-2025/group-project-think-tank.git cd group-project-think-tank git checkout localhost-deployment
-
Navigate to the backend folder:
cd backend_server -
Create the .env file using the Private API keys (folder submitted for private API keys), and copy the firebaseserviceaccount.json file into the backend_server root directory. These files are required for the backend to run properly.
touch .env # Open and edit .env to set environment variables like PORT, MONGO_URI, etc. (Copy the contents from Private API keys/backend_server/.env) cp path/to/firebaseserviceaccount.json . (Copy the entire firebaseserviceaccount.json from Private API keys/backend_server/firebaseserviceaccount.json)
-
Install dependencies:
npm install
-
Start the server:
npm start
-
Navigate to the frontend folder:
cd ../frontend_reactNative -
Create the
.envfile from the Private API keys (for frontend):touch .env # Open and edit .env to set environment variables like PORT, MONGO_URI, etc. (Copy the contents from Private API keys/frontend_reactNative/.env) -
Install dependencies:
npm install
-
Run the Expo app:
npm start
-
Open the URL or open the App in the emulator (Scan the QR code after installing Expo Go for mobile app).
http://localhost:8081
├── README.md # Project documentation
├── Think Tank.png # Project logo/image
├── docker-compose.yml # Docker configuration for fullstack setup
├── package.json # Root-level metadata (unused, can be removed if not needed)
├── package-lock.json
├── backend_server/ # Backend Express server
│ ├── Dockerfile
│ ├── package.json
│ ├── server.js # Entry point
│ ├── config/ # Configuration (DB, Firebase, etc.)
│ ├── controllers/ # Route logic handlers
│ ├── middlewares/ # Auth middleware, etc.
│ ├── models/ # Mongoose models
│ └── routes/ # Express route definitions
│
├── frontend_reactNative/ # Expo + React Native frontend
│ ├── Dockerfile
│ ├── app.json # Expo project config
│ ├── babel.config.js
│ ├── tsconfig.json
│ ├── package.json
│ ├── app/ # expo-router screens
│ │ ├── _layout.jsx
│ │ ├── index.jsx
│ │ ├── (tabs)/ # Main app screens after login
│ │ │ ├── index.jsx
│ │ │ ├── ride.jsx
│ │ │ └── profile.jsx
│ │ ├── (no_tabs)/ # Screens without bottom tabs
│ │ │ ├── login.jsx
│ │ │ ├── register.jsx
│ │ │ ├── host.jsx
│ │ │ ├── mapview.jsx
│ │ │ ├── past_ride.jsx
│ │ │ ├── ride_status.jsx
│ │ │ ├── groups/[groupID].jsx
│ │ │ └── rides/[rideID].jsx
│ │ └── +not-found.jsx
│ │
│ ├── assets/ # Images, fonts
│ │ └── images/fareshare/
│ │ └── [logo, backgrounds, icons]
│ │
│ ├── components/ # Reusable UI components
│ ├── constants/ # Static constants (like CDN_URL)
│ ├── hooks/ # Custom React hooks
│ ├── services/ # API calls, firebaseConfig.js
│ ├── styles/ # Tailwind-style CSS/JS styles
│ └── utils/ # Location services, helpers
│
└── android/ # Native Android files (generated by Expo)
https://docs.google.com/presentation/d/14kh_Y-OsH950C8boempDGVfEctJHbpGlFCFZLlChFqs/edit?usp=sharing
https://drive.google.com/file/d/1_Nau5MsH6Q5-XqVfo9MJNOYw85OYfrDq/view?usp=drive_link
- Sign Up / Sign In: Create an account or log in.
- Driver Setup: In your profile, enable
licenseValidatedand enter license/car details. - Host a Ride: Go to "Host" tab, fill out ride info and submit.
- Search Rides: On the home screen, filter by origin, destination, seats, date.
- Book Seat: Tap a ride, confirm booking to receive your OTP.
- Start Ride: As a driver, tap "Start Ride", validate each passenger OTP.
- Ongoing Ride: Switch to map view to track route and status.
- Manage Groups: Notify people of a new ride.
- Rate your driver: Make host accountable and promotes friendly behaviour.