๐ถ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.
- ๐ Sign in with your school email. Only addresses on the configured school domain get in.
- ๐ Set your destination and time. Type where you're going, pick when you're leaving.
- ๐ค See who's walking your way. Classmates leaving within the same hour, ranked by how close their destinations are.
- ๐ฌ 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
- axios
- bootstrap
- campus-safety
- css
- education
- firebase
- firebase-auth
- firestore
- google-geocoding-api
- google-maps
- google-places
- haversine
- html
- javascript
- matching-algorithm
- next.js
- peer-to-peer
- pwa
- react
- react-hook-form
- social-good
- student-safety
- styled-components
- typescript
- web-app
Log in or sign up for Devpost to join the conversation.