Skip to content

🚙 Carpooling app with a mission to reduce carbon footprint and protect the environment

Notifications You must be signed in to change notification settings

ayushbudh/carpool

Repository files navigation

Carpool

Description

Carpool app is a cross platform app that can help to reduce carbon footprint by sharing car ride for people travelling on same route as of driver. This app is currently a MVP where a rider can request for ride to a driver that is currently driving for the same origin and destination location. The long term vision of this app is to solve problems like insecurity(by scanning government ID of drivers and riders for safety), close pickup location for riders (by enforcing 0.5 mile walk distance policy) and helping people use free electic bikes to minimize the walking distance for riders.

Carpool app has two separate UIs: Driver and Rider. Drivers have the ability to start/cancel a ride and during there ongoing drive they can received incoming request from the riders for a ride. Drivers can either accept/reject the request based on the drivers will. Riders have the ability to find a new ride and wait till there request gets accepted/rejected.

Demo

Carpooling.app.demo.mov

Prototype

Screen Shot 2022-04-14 at 12 38 23 AM

View on figma: https://www.figma.com/file/sYpzzz2ShWBI7K8lAojgAe/Car-Pooling?node-id=0%3A1

Flow Chart

Screen Shot 2022-04-17 at 12 43 14 AM

Technical Deep Dive

[1] User Authentication & Firstore

User authentication is setup signup/sign in users using either email and password or Google account auth with Firebase authentication service. When the app launches and no user is logged in on the launchscreen user can select between driver or rider as the role for signup/signin. Each new user is stored in the users collection with there user details in the Firebase Firestore. Whether a driver/rider exists already as a rider/driver in the users collection is handled by the code and it will display error for this type of situations.

[2] Firebase Firstore & Usage of Google Maps Platform

Firebase Firestore stores the users details and information like whether drivers are available or not, new incoming requests for drivers, etc. When a driver starts a ride the isDriving property is set to true so that the driver becomes visible to other riders for incoming ride requests. When a rider requests for a ride driver can either accepth or reject and based on that a request object with details like riders name, latlng points, status etc are stored in both riders and drivers requests collection. This approach helps to listen to new requests and keep track of status in real time for both drivers and riders. Even though this approach might not be good if the app is scaled as it will depend on the Firstore realtime event handling capability in which case an event driven architecture will need to be adopted. Google Places and Directions API are used to get the polypoints of a route to draw it on the Google Map Widget for both drivers and riders.

[3] Driver/Riders Matching Process

Currently, the drivers and riders are matched based on the start and end location latitude longitude points.

Technologies

Flutter SDK, Firebase Authentication, Firestore Database, Google Maps Platform APIs (Directions & Places API)

Project Status Board

Trello Board: https://trello.com/b/o7j75SKg/carpool

Platform Support

Currently the app works on both Android and IOS platform but there is an polyline drawing issue on the Web.

Setup Instructions

To setup the project follow the steps below:

  1. Clone the repository using git clone -b mapscreen https://github.com/ayushbudh/carpool/ on the terminal/cmd.
  2. Use cd carpool command to get at the root directory of the app
  3. Get and set up your api key in the code

About

🚙 Carpooling app with a mission to reduce carbon footprint and protect the environment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published