A real-time location sharing and group coordination application that helps people find each other in crowded places. Built with the MERN stack (MongoDB, Express, React, Node.js) and Socket.io for real-time communication.
- Create Room: Host can create a group room with a unique 8-character room ID
- Join Room: Members can join using room ID or by scanning a QR code
- QR Code Sharing: Auto-generated QR codes for easy room sharing
- Leave Room: Members can leave at any time; room closes when host leaves
- Live GPS Tracking: Real-time location updates using browser Geolocation API
- Map Visualization: Interactive map showing all member locations
- Distance Calculation: Shows distance between each member and the host
- Auto-Center: Map automatically centers on all group members
- Kalman Filter: Smooths GPS jitter for stable marker positions
- Crowd Mode: Basic location sharing with connection lines between members
- Tracking Mode: Advanced mode with:
- Configurable tracking range (5-200 meters)
- Automatic alerts when members fall behind the group
- Range visualization circles on the map
- Set Target Location: Host can set a destination on the map
- Live Navigation: Shows distance, bearing (direction), and estimated time of arrival
- Visual Path: Dashed lines connecting all members to the target
- Push-to-Talk: Hold button to transmit voice
- Real-time Indicator: See who's currently talking
- Voice Activity Detection: Auto-stops when you stop speaking
- Member Status: Visual indicator on who's speaking
- Compact FAB Button: Always visible at bottom-right corner
- Long Press SOS: Press anywhere on screen for 5 seconds to activate
- Visual Progress: Circular progress indicator shows hold progress
- Countdown Timer: 5-second countdown with cancel option
- Live Alert: All room members receive emergency notification instantly
- Location Sharing: SOS includes precise GPS location
- Vibration: Device vibrates during SOS activation
- Visual Feedback: Red pulsing button for easy activation
- SOS Button: Floating π button always accessible
- Toggle Trip Mode: Enable from host menu options
- Fair Center Point: Calculates optimal meeting point for all group members
- Nearest Landmarks: Finds popular places nearby using Google Places API
- Nearest Exits/Gates: Locates transit stations, airports, subway stations
- Collapsible Panel: Compact strip at top, expandable for details
- Horizontal Scrolling: Quick access cards for landmarks and exits
- One-Tap Set Target: Select any recommendation as meeting point
- Google Places Integration: Uses real-world location data via backend proxy
- Multiple Map Styles: Switch between OpenStreetMap (standard) and Satellite views
- Custom Markers: Distinct markers for host, current user, and other members
- π’ Green: Current user
- π£ Purple: Host
- π©· Pink: Other members
- Dynamic Marker Sizing: Markers scale smaller when zoomed in, larger when zoomed out
- Connection Lines: Visual lines showing relationships between members
- Distance Labels: Real-time distance display on map
- Semi-Transparent Popups: Minimal popup design for better map visibility
- Smooth Transitions: Markers animate smoothly between positions
- Mobile-First: Optimized for mobile devices
- Desktop Features: Full feature set on desktop browsers
- Compact Mobile UI: Single-line top bar with Room ID and menu
- Floating Components: Walkie-talkie and SOS buttons at accessible positions
- React 19 - UI framework
- Vite - Build tool and dev server
- Tailwind CSS 4 - Styling
- React Leaflet - Interactive maps (OpenStreetMap)
- Socket.io Client - Real-time communication
- React Router - Client-side routing
- Node.js - Runtime environment
- Express - Web framework
- Socket.io - Real-time WebSocket server
- MongoDB - Database (with in-memory fallback)
- QRCode - QR code generation
- Google Places API - Location data via backend proxy
Coordinate/
βββ Backend/
β βββ server.js # Main server entry point
β βββ db.js # MongoDB connection & operations
β βββ package.json
β βββ Routes/
β βββ group.js # Group-related API routes
β βββ places.js # Google Places API proxy routes
β
βββ Frontend/
β βββ src/
β β βββ components/
β β β βββ MapView.jsx # Interactive map with dynamic markers
β β β βββ LiveChat.jsx # Walkie-talkie PTT button
β β β βββ SOSOverlay.jsx # Emergency SOS system
β β β βββ SmartMeetingPoint.jsx # Trip mode panel
β β βββ pages/
β β β βββ HomePage.jsx # Landing page
β β β βββ HostRoomPage.jsx # Host room management
β β β βββ MemberRoomPage.jsx # Member room view
β β β βββ JoinRoomPage.jsx # Join room page
β β βββ context/
β β β βββ MapContext.jsx # Global state + SOS management
β β βββ utils/
β β β βββ locationSmoother.js # Kalman filter implementation
β β β βββ placesService.js # Google Places API service
β β βββ App.jsx
β β βββ main.jsx
β β βββ index.css
β βββ package.json
β βββ index.html
β
βββ README.md
- Node.js (v18 or higher)
- MongoDB (optional - app works without it)
- Google Maps API Key (optional - for Trip Mode features)
cd Backend
npm installCreate a .env file in Backend directory:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
FRONTEND_URL=http://localhost:5173
GOOGLE_MAPS_API_KEY=your_google_api_keyStart the backend server:
npm start
# or for development
npm run devcd Frontend
npm installCreate a .env file in Frontend directory:
VITE_SOCKET_URL=http://localhost:5000
VITE_GOOGLE_MAPS_API_KEY=your_google_api_keyStart the development server:
npm run devThe app will be available at http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/rooms/create |
Create a new room |
| POST | /api/rooms/join |
Join an existing room |
| GET | /api/rooms/:roomId |
Get room details |
| POST | /api/rooms/:roomId/leave |
Leave a room |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/places/nearby |
Find nearby places |
| GET | /api/places/search |
Search for places |
| GET | /api/places/directions |
Get route directions |
| GET | /api/places/details |
Get place details |
user:join- User joins a roomlocation:update- Update user locationroom:sync- Request current room stateroom:settings:update- Update room settings (host only)room:warning- Send out-of-range warningwalkie:start- Start push-to-talk transmissionwalkie:stop- Stop push-to-talk transmissionsos:activate- Activate emergency SOSsos:cancel- Cancel emergency SOSsos:countdown- Broadcast countdown to others
location:updated- Location update broadcastroom:settings- Room settings changedroom:warning- Out-of-range warningwalkie:Speaking- Someone started talkingwalkie:Stopped- Someone stopped talkingsos:activated- SOS alert broadcastsos:cancelled- SOS cancelledsos:countdown- Countdown broadcastuser:left- User left notification
- mode:
"crowd"or"tracking" - trackingRange: Distance in meters (5-200)
- targetLocation:
{ lat: number, lng: number } - mapStyle:
"osm"or"satellite" - tripMode:
trueorfalse
- Set environment variables (
MONGODB_URI,FRONTEND_URL,GOOGLE_MAPS_API_KEY) - Deploy from the Backend folder
- Note: Works with in-memory storage if MongoDB unavailable
- Build:
npm run build - Deploy the
distfolder - Configure environment variable
VITE_SOCKET_URLto your backend URL
- User enters their name on the home page
- Clicks "Create Room"
- Backend generates a unique 8-character room ID
- Room is saved to MongoDB (or memory fallback)
- QR code is generated for easy sharing
- User enters room ID or scans QR code
- Enters their name
- Backend validates room exists and is active
- User is added to room members
- Redirected to room page
- User grants browser location permission
- Geolocation API provides coordinates
- Kalman filter smooths the GPS data
- Location is sent via Socket.io to server
- Server broadcasts to all room members
- Map updates in real-time with smooth animations
- User holds the PTT button
- Microphone activates, voice is monitored
- "Speaking" indicator shows to other members
- Voice activity detection auto-stops when silent
- Release button to stop transmission
- User long-presses anywhere on screen (5 seconds)
- Progress indicator shows hold progress
- Countdown modal appears with cancel option
- SOS activated β all members receive instant alert
- Location and vibration included
- Host can cancel anytime
- Host enables Trip Mode from menu
- Fair center point calculated from all member locations
- Google Places API finds nearby landmarks and exits
- Results displayed in compact horizontal cards
- Tap any option to set as target location
- All members see the target on their maps
ISC