Skip to content

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synchronicity

Team Name: Hackstreet Boys

Synchronicity is a multipurpose Flask web app built for the Uber Hackathon. It uses live route data, carbon-footprint calculations, and rideshare optimisation to encourage more environmentally friendly travel choices.

The project was designed to do three things well:

  1. compare different transport options using live traffic-aware routing
  2. estimate the CO2 emissions of a trip under different travel modes
  3. help users coordinate shared rides more efficiently

General Info

Built with

  • Python 3.11.5
  • Flask 2.3.3
  • Google Maps API 3.54
  • Jinja 3.1.2
  • SQLite 3.41.1
  • CSS 4.15
  • JavaScript ES13
  • HTML 5

Introduction

Synchronicity is a travel-planning and ridesharing website designed to promote environmentally friendly behaviour and reduce traffic congestion. The app lets users compare journey options, estimate emissions, and earn points for making lower-carbon travel choices.

The platform provides:

  • the shortest route
  • the lowest-carbon route
  • routes with less walking and fewer transfers for disabled or elderly users
  • rideshare suggestions for multiple users travelling between different origin-destination pairs

How It Works

1. Live route and traffic data

The app uses the Google Maps API to geocode user-entered addresses and retrieve route information in real time. For each journey, it extracts the route distance and duration from Google Maps directions results, which means the calculations are based on live routing rather than static estimates.

For transit journeys, the app can also request a less_walking route preference to better support users who want reduced walking distance.

2. Carbon footprint calculations

The core journey calculator estimates emissions by combining:

  • distance travelled
  • mode of transport
  • traffic-related idle time for cars, buses, and trains.

This allows the app to compare transport options in a way that reflects both the route length and real traffic conditions.

3. Green Points system

The app awards users Green Points based on the estimated CO2 saved by choosing a lower-emission option. For car journeys, it compares solo driving with ridesharing. For transit journeys, it compares the selected route against the car baseline.

These points are stored in the user database and updated after each journey calculation.

4. Ridesharing optimisation

The app also includes a ridesharing planner for multiple users. It stores trip requests in SQLite, then searches possible permutations of trip pairings to find an arrangement with the minimum total travel distance while keeping start and end ordering valid.

This is the part of the project that makes the system more than just a trip calculator: it also tries to organise several journeys together in a way that is more efficient than treating them separately.

Key Features

  • user registration and login
  • secure password hashing
  • trip planning with live Google Maps routing
  • driving vs transit comparison
  • reduced-walking route option
  • CO2 estimation for cars, buses, and trains
  • Green Points rewards system
  • rideshare trip coordination
  • SQLite-backed storage for users, points, money, and trip requests

Setup

Requirements

You will need:

  • Python 3.11+
  • Flask
  • Flask-Session
  • Flask-CORS
  • googlemaps
  • SQLite
  • a valid Google Maps API key, see comment for insertion point in main.py.

Install dependencies

pip install flask flask-session flask-cors googlemaps werkzeug

Database

The app uses accounts.db for:

  • user accounts
  • points balance
  • money balance
  • saved trip requests

Run the app

python app.py

Then open the local Flask server in your browser.

Troubleshooting

If you enter an invalid address, the app will return an error rather than producing a misleading route. If Google Maps cannot geocode the location, try entering a more specific address.

For the rideshare planner, the trip database is reset after a full batch of trips is processed.

If the app does not run correctly using these files, try the Replit version instead:

https://replit.com/@KrishivKukreja/Hackstreet-Boys

Notes

  • The project was built as part of the Uber Hackathon.
  • It combines live mapping data, sustainability modelling, and basic optimisation.
  • The code is organised around Flask routes for registration, login, trip comparison, points tracking, and rideshare planning.

Award

Top 5 in Asia Pacific at the 2023 Uber Hackathon. A travel-planning and ridesharing platform designed to make lower-carbon journeys easier to compare, share, and reward.

About

Top 5 in APAC, Uber Hackathon 2023. A website which allows users to enter trip details. Computes the most carbon-efficient set of rideshare trips from database of pending trips, accessing current traffic conditions using an API. Rewards users with points based on amount of carbon emissions avoided by ridesharing.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages