๐ŸšถSameWay

Walk home together.

SameWay connects verified students heading the same way at the same time โ€” so nobody has to walk home alone.

Next.js ยท React ยท TypeScript ยท Firebase ยท Google Maps


Cecilia closes the NYU library door at 1 AM. The street is empty. Her phone is at 12%. The next bus is in 40 minutes. An Uber is $28 she doesn't have. So she does what she does three nights a week โ€” she starts walking, keys between her fingers, and hopes.

She isn't looking for an app that calls 911 after something happens. She's looking for someone to walk with. Nobody built that. So we did.

๐ŸŒ™ Every Night, One Walk Too Many

The loneliest risk in a student's day is the walk home.

Rideshares cost money students don't have. Buses stop running. Parents can't always come. So the student walks alone, and the danger isn't hypothetical โ€” it's the most common, most avoidable risk they face.

Every safety app on the market shares the same flaw: they react. An alert fires. A location gets shared. A call gets placed. All of it happens after something has gone wrong.

Nothing prevents the lonely walk in the first place. And most schools have no system at all to help students walk together.

๐Ÿค What If the Fix Was Just... Someone to Walk With?

SameWay is a peer-to-peer safety platform that connects verified students heading the same way at the same time โ€” so nobody has to walk home alone.

A student signs in with their school email, enters a destination and a departure time, and instantly sees the classmates whose trips overlap with theirs. One tap to reach out. Then they walk together.

The whole idea fits in one sentence: it's prevention, not reaction.

Trust is built in from the first screen. Sign-up only admits email addresses on the school's configured domain, so every match comes from the same school community โ€” not a stranger, not a database of randoms. Verified classmates, same route, same hour.

๐Ÿงญ Four Steps. Zero Strangers.

  1. ๐Ÿ”‘ Sign in with your school email. Only addresses on the configured school domain get in.
  2. ๐Ÿ“ Set your destination and time. Type where you're going, pick when you're leaving.
  3. ๐Ÿค See who's walking your way. Classmates leaving within the same hour, ranked by how close their destinations are.
  4. ๐Ÿ’ฌ Connect and walk together. One tap opens a message to that classmate.

No setup. No contacts to upload. No strangers.

๐Ÿ“Š Before SameWay vs. After SameWay

Before SameWay After SameWay
๐Ÿšถ Walking alone at 1 AM ๐Ÿšถโ€โ™€๏ธ Walking with a verified classmate
๐Ÿ“ต Checking if anyone's free ๐Ÿ“ฒ Seeing who's already going your way
๐Ÿ’ธ An expensive rideshare ๐Ÿ†“ Free, one tap
๐Ÿšจ A safety app that reacts ๐Ÿ›ก๏ธ A platform that prevents
๐Ÿ˜ฐ Praying nothing happens ๐Ÿค Knowing someone's beside you

โš™๏ธ What's Actually Under the Hood

SameWay is a Next.js 12 app built with React 17 and TypeScript.

  • ๐Ÿ”ฅ Firebase Auth + Cloud Firestore. School-email sign-up and sign-in, and saved trips stored as documents keyed by the student's email. Real-time data with no backend to build or maintain.
  • ๐Ÿ—บ๏ธ Google Maps Platform. Places Autocomplete powers the destination field, the Geocoding API turns the chosen address into latitude and longitude, and the Maps JavaScript SDK renders a map on every match card.
  • ๐Ÿงฎ The matching pipeline (pages/sameWayList.tsx): load all saved trips โ†’ drop your own entry โ†’ compute Haversine distance between your coordinates and each trip โ†’ keep only trips within the same hour (same, one before, or one after) โ†’ sort by distance, closest first โ†’ show the top 4 as match cards.
  • ๐ŸŽ“ Per-school configuration. The school name and email domain come from environment variables, read through config/school.ts. Nothing is hardcoded โ€” pointing SameWay at a different school is one environment change.

๐Ÿ›๏ธ Architecture at a Glance

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                            THE STUDENT                               โ”‚
โ”‚        signs in  ยท  sets a destination  ยท  picks a departure time    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                                   โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        NEXT.JS 12 FRONTEND                           โ”‚
โ”‚                     React 17  ยท  TypeScript 4.5                      โ”‚
โ”‚   index ยท login ยท signup ยท home ยท sameWayList ยท sameWayCard          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                โ”‚ auth + trips                     โ”‚ places + geocode
                โ†“                                  โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      FIREBASE (DATA LAYER)    โ”‚   โ”‚  GOOGLE MAPS PLATFORM (MAPS)     โ”‚
โ”‚  Authentication               โ”‚   โ”‚  Places Autocomplete             โ”‚
โ”‚  Cloud Firestore              โ”‚   โ”‚  Geocoding API  โ†’  lat / lng     โ”‚
โ”‚  collection: "location"       โ”‚   โ”‚  Maps JavaScript SDK             โ”‚
โ”‚  { email, location, time,     โ”‚   โ”‚    โ†’ map on each match card      โ”‚
โ”‚    lat, long }                โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                โ”‚  read all saved trips
                โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                       MATCHING PIPELINE                              โ”‚
โ”‚                                                                      โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚  all saved trips โ”‚ โ†’ โ”‚  drop own entry  โ”‚ โ†’ โ”‚ Haversine (km) โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                         โ†“            โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚  top 4 matches   โ”‚ โ† โ”‚ sort by distance โ”‚ โ† โ”‚  ยฑ1 hour windowโ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
             โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         MATCH CARDS                                  โ”‚
โ”‚     classmate email  ยท  departure time  ยท  distance in miles  ยท      โ”‚
โ”‚     embedded Google Map  ยท  "Connect on SameWay"                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

In one line: a trip is written to Firestore, read back with every other trip, filtered and ranked by the matching pipeline, then rendered as map-backed cards the student can act on.

๐Ÿ’ก Why This Isn't Just Another Safety App

  • ๐Ÿค Peer matching, not post-incident alerts. It prevents the lonely walk instead of responding to it.
  • ๐ŸŽ“ Verified students only. Sign-up requires a school-email address on the configured domain.
  • ๐Ÿ“ Distance-aware ranking, not just time. Matches are ordered by how close classmates' destinations are.
  • ๐Ÿซ Deployable at any school with one config change. No code edits.
  • ๐Ÿ†“ Free. No subscription. No paid tier.

๐Ÿ”ญ What Comes Next

  • ๐Ÿ“ก Live location sharing during the walk, so students can see each other on the move. (planned)
  • ๐Ÿ†˜ An SOS button for the moments when something still goes wrong. (planned)
  • ๐Ÿ”„ Persistent walk sessions that survive a reload or restart. (planned)
  • ๐Ÿ“ฑ An iOS app alongside the web experience. (planned)
  • ๐ŸŒ Multi-school rollout with per-school domains and cohorts. (planned)

๐Ÿค– AI Disclosure

AI tools were used as development assistants for brainstorming, debugging, refactoring, and documentation. All product decisions, the matching logic, and the final behavior of the app were reviewed and validated by the team, who can explain how each part works. Anything not yet implemented is marked as planned above.


SameWay isn't really about maps, matches, or coordinates. It's about the walk at the end of a long day โ€” and making sure it doesn't have to be made alone.

No student should have to choose between an expensive ride and an unsafe walk. SameWay gives them the third option: a classmate, going the same way.

SameWay. Walk home together.

Built With

Share this project:

Updates

Submission history