# apishrana/locate-me architecture

> Architecture diagram of the GitHub repository apishrana/locate-me, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/apishrana/locate-me
- Repository: https://github.com/apishrana/locate-me

## Overview

Locate Me is a React Native location-sharing app backed by FastAPI. Users authenticate, create or join groups, and share foreground or background location; group views and map customization provide the results and presentation. The backend separates HTTP routes from authentication, group, user, and location operations, with Supabase persistence and Firebase messaging. The README documents encryption and background requests, but frontend-to-API wiring and several app interactions were not shown, so those links are marked unverified.

Main entry points: [`Backend/Routs/groups.py`](https://github.com/apishrana/locate-me/blob/main/Backend/Routs/groups.py) (Group routes), [`Backend/Routs/location.py`](https://github.com/apishrana/locate-me/blob/main/Backend/Routs/location.py) (Location routes), [`Backend/Routs/user.py`](https://github.com/apishrana/locate-me/blob/main/Backend/Routs/user.py) (User routes), [`Backend/Dependencies/auth.py`](https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/auth.py) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_app_shell["App shell<br/>[_layout.jsx]"]
  node_auth_ui["Sign in<br/>[Login.jsx]"]
  node_group_ui["Group view<br/>[index.jsx]"]
  node_home_ui["Home map<br/>[hero.jsx]"]
  node_location_client["Location upload<br/>[upload-location.js]"]
  node_map_settings["Map settings<br/>[map.jsx]"]
  node_settings_ui["Profile settings<br/>[index.jsx]"]
end

subgraph group_api["HTTP API"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_auth_routes["Auth routes<br/>[auth.py]"]
  node_group_routes["Group routes<br/>[groups.py]"]
  node_location_routes["Location routes<br/>[location.py]"]
  node_user_routes["User routes<br/>[user.py]"]
end

subgraph group_domain["Backend operations"]
  node_auth_ops["Authentication<br/>[auth.py]"]
  node_group_ops["Group operations<br/>[groups.py]"]
  node_user_ops["User operations<br/>[user.py]"]
  node_location_ops["Location operations<br/>[location.py]"]
end

subgraph group_integrations["External services"]
  node_supabase_client["Supabase client<br/>[db.py]"]
  node_supabase[("Supabase")]
  node_firebase["Firebase messaging"]
end

node_person(("App user"))

node_person -->|"signs in"| node_auth_ui
node_person -->|"manages groups"| node_group_ui
node_person -->|"shares location"| node_home_ui
node_person -->|"customizes map"| node_map_settings
node_app_shell -->|"loads"| node_location_client
node_auth_ui -.->|"submits credentials"| node_auth_routes
node_group_ui -.->|"manages groups"| node_group_routes
node_location_client -.->|"uploads location"| node_location_routes
node_settings_ui -.->|"updates profile"| node_user_routes
node_api_app -->|"registers router"| node_auth_routes
node_api_app -->|"registers router"| node_user_routes
node_api_app -->|"registers router"| node_group_routes
node_api_app -->|"registers router"| node_location_routes
node_auth_routes -->|"authenticates"| node_auth_ops
node_auth_routes -->|"updates user"| node_user_ops
node_group_routes -->|"checks identity"| node_auth_ops
node_group_routes -->|"manages groups"| node_group_ops
node_group_routes -->|"updates members"| node_user_ops
node_group_routes -->|"requests location"| node_location_ops
node_location_routes -->|"checks identity"| node_auth_ops
node_location_routes -->|"checks membership"| node_group_ops
node_location_routes -->|"handles location"| node_location_ops
node_user_routes -->|"checks identity"| node_auth_ops
node_user_routes -->|"updates groups"| node_group_ops
node_user_routes -->|"updates profile"| node_user_ops
node_auth_ops -->|"reads users"| node_supabase_client
node_group_ops -->|"reads writes groups"| node_supabase_client
node_user_ops -->|"writes users"| node_supabase_client
node_location_ops -->|"stores locations"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase
node_location_ops -->|"sends requests"| node_firebase

click node_app_shell "https://github.com/apishrana/locate-me/blob/main/App/src/app/_layout.jsx"
click node_auth_ui "https://github.com/apishrana/locate-me/blob/main/App/src/components/Auth/Login.jsx"
click node_group_ui "https://github.com/apishrana/locate-me/blob/main/App/src/app/group/%5Bid%5D/index.jsx"
click node_home_ui "https://github.com/apishrana/locate-me/blob/main/App/src/components/Home/hero.jsx"
click node_location_client "https://github.com/apishrana/locate-me/blob/main/App/src/hooks/upload-location.js"
click node_map_settings "https://github.com/apishrana/locate-me/blob/main/App/src/app/setting/Customization/map.jsx"
click node_settings_ui "https://github.com/apishrana/locate-me/blob/main/App/src/app/setting/index.jsx"
click node_api_app "https://github.com/apishrana/locate-me/blob/main/Backend/main.py"
click node_auth_routes "https://github.com/apishrana/locate-me/blob/main/Backend/Routs/auth.py"
click node_group_routes "https://github.com/apishrana/locate-me/blob/main/Backend/Routs/groups.py"
click node_location_routes "https://github.com/apishrana/locate-me/blob/main/Backend/Routs/location.py"
click node_user_routes "https://github.com/apishrana/locate-me/blob/main/Backend/Routs/user.py"
click node_auth_ops "https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/auth.py"
click node_group_ops "https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/groups.py"
click node_user_ops "https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/user.py"
click node_location_ops "https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/location.py"
click node_supabase_client "https://github.com/apishrana/locate-me/blob/main/Backend/db.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_shell,node_auth_ui,node_group_ui,node_home_ui,node_location_client,node_map_settings,node_settings_ui,node_person toneBlue
class node_api_app,node_auth_routes,node_group_routes,node_location_routes,node_user_routes toneAmber
class node_auth_ops,node_group_ops,node_user_ops,node_location_ops toneMint
class node_supabase_client,node_supabase,node_firebase toneRose
```

## Components

### Mobile app

- [App shell](https://github.com/apishrana/locate-me/blob/main/App/src/app/_layout.jsx): `App/src/app/_layout.jsx`
- [Sign in](https://github.com/apishrana/locate-me/blob/main/App/src/components/Auth/Login.jsx): `App/src/components/Auth/Login.jsx`
- [Group view](https://github.com/apishrana/locate-me/blob/main/App/src/app/group/%5Bid%5D/index.jsx): `App/src/app/group/[id]/index.jsx`
- [Home map](https://github.com/apishrana/locate-me/blob/main/App/src/components/Home/hero.jsx): `App/src/components/Home/hero.jsx`
- [Location upload](https://github.com/apishrana/locate-me/blob/main/App/src/hooks/upload-location.js): `App/src/hooks/upload-location.js`
- [Map settings](https://github.com/apishrana/locate-me/blob/main/App/src/app/setting/Customization/map.jsx): `App/src/app/setting/Customization/map.jsx`
- [Profile settings](https://github.com/apishrana/locate-me/blob/main/App/src/app/setting/index.jsx): `App/src/app/setting/index.jsx`

### HTTP API

- [FastAPI app](https://github.com/apishrana/locate-me/blob/main/Backend/main.py): `Backend/main.py`
- [Auth routes](https://github.com/apishrana/locate-me/blob/main/Backend/Routs/auth.py): `Backend/Routs/auth.py`
- [Group routes](https://github.com/apishrana/locate-me/blob/main/Backend/Routs/groups.py): `Backend/Routs/groups.py`
- [Location routes](https://github.com/apishrana/locate-me/blob/main/Backend/Routs/location.py): `Backend/Routs/location.py`
- [User routes](https://github.com/apishrana/locate-me/blob/main/Backend/Routs/user.py): `Backend/Routs/user.py`

### Backend operations

- [Authentication](https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/auth.py): `Backend/Dependencies/auth.py`
- [Group operations](https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/groups.py): `Backend/Dependencies/groups.py`
- [User operations](https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/user.py): `Backend/Dependencies/user.py`
- [Location operations](https://github.com/apishrana/locate-me/blob/main/Backend/Dependencies/location.py): `Backend/Dependencies/location.py`

### External services

- [Supabase client](https://github.com/apishrana/locate-me/blob/main/Backend/db.py): `Backend/db.py`
- **Supabase**
- **Firebase messaging**

### Other components

- **App user**

## Connections

- App user → Sign in: signs in (evidence: `README.md`)
- App user → Group view: manages groups (evidence: `README.md`)
- App user → Home map: shares location (evidence: `README.md`)
- App user → Map settings: customizes map (evidence: `README.md`)
- App shell → Location upload: loads
- Sign in → Auth routes: submits credentials
- Group view → Group routes: manages groups
- Location upload → Location routes: uploads location
- Profile settings → User routes: updates profile
- FastAPI app → Auth routes: registers router (evidence: `Backend/main.py`)
- FastAPI app → User routes: registers router (evidence: `Backend/main.py`)
- FastAPI app → Group routes: registers router (evidence: `Backend/main.py`)
- FastAPI app → Location routes: registers router (evidence: `Backend/main.py`)
- Auth routes → Authentication: authenticates (evidence: `Backend/Routs/auth.py`)
- Auth routes → User operations: updates user (evidence: `Backend/Routs/auth.py`)
- Group routes → Authentication: checks identity (evidence: `Backend/Routs/groups.py`)
- Group routes → Group operations: manages groups (evidence: `Backend/Routs/groups.py`)
- Group routes → User operations: updates members (evidence: `Backend/Routs/groups.py`)
- Group routes → Location operations: requests location (evidence: `Backend/Routs/groups.py`)
- Location routes → Authentication: checks identity (evidence: `Backend/Routs/location.py`)
- Location routes → Group operations: checks membership (evidence: `Backend/Routs/location.py`)
- Location routes → Location operations: handles location (evidence: `Backend/Routs/location.py`)
- User routes → Authentication: checks identity (evidence: `Backend/Routs/user.py`)
- User routes → Group operations: updates groups (evidence: `Backend/Routs/user.py`)
- User routes → User operations: updates profile (evidence: `Backend/Routs/user.py`)
- Authentication → Supabase client: reads users (evidence: `Backend/Dependencies/auth.py`)
- Group operations → Supabase client: reads writes groups (evidence: `Backend/Dependencies/groups.py`)
- User operations → Supabase client: writes users (evidence: `Backend/Dependencies/user.py`)
- Location operations → Supabase client: stores locations (evidence: `Backend/Dependencies/location.py`)
- Supabase client → Supabase: connects (evidence: `Backend/db.py`)
- Location operations → Firebase messaging: sends requests (evidence: `Backend/Dependencies/location.py`)
