SafeArrival is a service-request platform that connects people who need home help — AC repair, plumbing, electrical work — with verified providers nearby, in real time. Post a request, get matched with the closest qualified provider, watch it go from "open" to "claimed" to "completed," chat with the provider along the way, and rate the job when it's done.
Built solo by Punam Behera for the Prasunet Hackathon (₹1,00,000 prize track).
Note: the backend is hosted on Render's free tier, so the very first request after a period of inactivity can take 20–30 seconds to wake up. Everything after that is fast.
| Role | Password | |
|---|---|---|
| User | demo.user@safearrival.demo | password123 |
| Provider (AC Repair) | ramesh.kumar@safearrival.demo | password123 |
| Provider (AC Repair) | sunita.devi@safearrival.demo | password123 |
| Provider (Plumber) | ajay.singh@safearrival.demo | password123 |
| Provider (Plumber) | priya.nair@safearrival.demo | password123 |
| Provider (Electrician) | vikram.rao@safearrival.demo | password123 |
| Provider (Electrician) | meena.joshi@safearrival.demo | password123 |
To see the real-time matching in action, open the user account in one browser and a provider account in a different browser (or a different browser profile — using two tabs of the same incognito window shares storage and will log you into the same session twice).
A user picks a category and describes the problem. The backend finds every verified provider in that category within a 15 km radius and pushes the request to them instantly over a socket connection — no polling, no refresh needed. Whichever provider taps "Claim" first gets the job; the request is locked atomically at the database level, and it disappears from every other nearby provider's screen the moment it's claimed, so nobody wastes time chasing a job that's already gone.
From there, the user and provider get a private chat tied to that job. The provider can mark themselves en route and then mark the job complete. Once the user submits a rating, the chat history is deleted — it's not meant to be a permanent record, just enough context to get the job done safely.
There's also a lightweight admin view at /admin/flags for reviewing anything users have flagged as a problem.
Frontend: React, React Router, Tailwind CSS, Socket.IO client, deployed on Netlify
Backend: Node.js, Express, MongoDB with Mongoose, Socket.IO for real-time events, deployed on Render
Auth: JWT-based, with role checks (user / provider) enforced on every protected route
This was the trickiest part to get right, so it's worth explaining.
When a request is created, the server looks up every provider with a matching category and isVerified: true, filters them down to whoever is within 15 km using a Haversine distance calculation, and emits a request:new event to each of their personal socket rooms (provider:<id>).
When a provider claims a job, the update is done as a single atomic findOneAndUpdate that only succeeds if the request is still status: "open". If two providers tap "Claim" within milliseconds of each other, only one write goes through — the second gets a 409 and a "someone beat you to it" message instead of a silent double-booking.
The server then re-runs the same nearby-provider lookup and emits request:locked to everyone else who was eligible for that job, so it disappears from their list instantly rather than sitting there as a dead link until they refresh.
Backend
cd backend
npm install
# add a .env file with MONGO_URI, JWT_SECRET, and PORT
npm run seed # creates the demo accounts above
npm startFrontend
cd frontend
npm install
# add a .env file with VITE_API_URL and VITE_SOCKET_URL pointing at your backend
npm run dev- Provider verification is seeded as
truefor the demo accounts rather than going through an actual document-verification flow — that's the obvious next thing to build for a real launch. - Distance is calculated as straight-line (Haversine), not actual road distance, so "15 km away" doesn't account for traffic or routing.
- No push notifications outside the app — if a provider's tab isn't open, they won't see a new request until they come back.
The idea came from a simple, annoying problem: when something breaks at home, you either call someone you already know or you scroll through unreviewed listings hoping for the best. SafeArrival tries to close that gap — verified providers only, first-come-first-served claiming so nobody's left waiting on a provider who never shows up, and a chat that exists only as long as the job does.