EchoLoc

Privacy-first live location sharing — Expo/React Native app with timed sharing sessions, group invites, in-group chat, and a live map over Socket.IO with the custom Echo_API backend.

ExpoReact NativeSocket.IONode.jsMongoDB
GitHub
01

System Architecture

REQUESTWS session.start(group, ttl)tracing
auth · groupslocation pingsverifyregisterexpiry → endbroadcastExpo AppReact NativeCLIENTEcho_API RESTAuth · groups · invitesSVCSocket.IO GatewayPings · chat fanoutSVCGoogle · AppleOAuth verifyEXTSession ManagerTTL timers · auto-expirySVCMongoDBGroups · sessions · pingsDATA

The Expo app authenticates and manages groups over REST, then streams location pings through a Socket.IO channel while a session is live. The session manager enforces the time window — when the timer expires or the user stops, sharing ends and the channel closes for that member.

02

Database Design

SCHEMA6 tables · 7 relationshover a table
usersMongoDB_idobjectIdemailstringnamestringproviderenumavatar_urlstringgroupsMongoDB_idobjectIdnamestringowner_idobjectIdinvite_codestringcreated_atdategroup_membersMongoDB_idobjectIdgroup_idobjectIduser_idobjectIdroleenumjoined_atdatesessionsMongoDB_idobjectIdgroup_idobjectIduser_idobjectIdstarted_atdateexpires_atdatestatusenumlocation_pingsMongoDB_idobjectIdsession_idobjectIdlatdoublelngdoubletsdatemessagesMongoDB_idobjectIdgroup_idobjectIdsender_idobjectIdbodystringsent_atdate

Sharing is modeled as expiring sessions, not user state — pings hang off a session, so when it ends the location trail stops with it.

03

Engineering Challenges

01

Timed privacy model

Sharing is scoped to a user-defined window — sessions auto-expire server-side, so no client bug can leave tracking on.

02

Live group map

Location pings fan out over Socket.IO rooms to group members in real time while a session is active.

03

Event-based groups

Invite codes, membership roles, and in-group chat support temporary sharing circles around real events.

04

Multi-provider auth

Email plus Google and Apple sign-in for low-friction mobile onboarding.

04

Trade-offs & Decisions

ChoseOverBecause
Socket.IOPollingSub-second location updates with connection fallbacks that survive flaky mobile networks.
ExpoBare React NativeManaged workflow shipped both platforms fast; native modules were not a blocker.
TTL sessionsAlways-on sharingPrivacy is the product — expiry is enforced in the data model, not just the UI.