# aayushkrgupta/pulse5g architecture

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

- Interactive diagram: https://gitdiagram.com/aayushkrgupta/pulse5g
- Repository: https://github.com/aayushkrgupta/pulse5g

## Overview

Pulse5G is a cross-platform incident-monitoring app. Its visible workflow is dashboard polling and live alert updates from an edge service, with incident history saved locally and camera streaming exposed through the camera UI. The README also describes geofencing, push notifications, Firebase, and edge processing, but the sampled source does not establish their implementation or wiring; those capabilities are not represented as implemented components here.

Main entry points: [`app/(tabs)/_layout.tsx`](https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/_layout.tsx) (Tab navigation), [`src/services/api.ts`](https://github.com/aayushkrgupta/pulse5g/blob/main/src/services/api.ts) (HTTP API), [`app/(tabs)/dashboard.tsx`](https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/dashboard.tsx) (Dashboard), [`app/(tabs)/incidents.tsx`](https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/incidents.tsx) (Incident history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Mobile interface"]
  node_app["App entry<br/>[App.tsx]"]
  node_index["Initial redirect<br/>[index.tsx]"]
  node_tabs["Tab navigation<br/>[_layout.tsx]"]
  node_cameras["Camera screen<br/>[cameras.tsx]"]
  node_network["Network screen<br/>[network.tsx]"]
  node_stream["Video stream"]
end

subgraph group_incident["Incident monitoring"]
  node_dashboard["Dashboard<br/>[dashboard.tsx]"]
  node_incidents["Incident history<br/>[incidents.tsx]"]
end

subgraph group_connectivity["Edge connectivity"]
  node_api["HTTP API<br/>[api.ts]"]
  node_socket["Alert socket<br/>[websocket.ts]"]
  node_config["Endpoint config<br/>[config.ts]"]
end

subgraph group_state["Local state"]
  node_secure[("Secure storage")]
end

node_operator(("Operator"))
node_edge{{"Edge service"}}

node_operator -->|"opens"| node_app
node_app -->|"loads"| node_index
node_index -->|"redirects"| node_tabs
node_tabs -->|"routes"| node_dashboard
node_tabs -->|"routes"| node_incidents
node_tabs -->|"routes"| node_cameras
node_tabs -->|"routes"| node_network
node_dashboard -->|"fetches latest"| node_api
node_dashboard -->|"subscribes"| node_socket
node_dashboard -->|"opens history"| node_incidents
node_incidents -->|"fetches latest"| node_api
node_incidents -->|"reads/writes history"| node_secure
node_cameras -->|"renders"| node_stream
node_stream -->|"gets stream URL"| node_api
node_api -->|"reads endpoints"| node_config
node_socket -->|"reads endpoint"| node_config
node_api -->|"requests data"| node_edge
node_socket -->|"connects"| node_edge
node_stream -->|"loads stream"| node_edge

click node_app "https://github.com/aayushkrgupta/pulse5g/blob/main/App.tsx"
click node_index "https://github.com/aayushkrgupta/pulse5g/blob/main/app/index.tsx"
click node_tabs "https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/_layout.tsx"
click node_dashboard "https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/dashboard.tsx"
click node_incidents "https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/incidents.tsx"
click node_cameras "https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/cameras.tsx"
click node_network "https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/network.tsx"
click node_stream "https://github.com/aayushkrgupta/pulse5g/blob/main/src/components/LiveVideoStream.tsx"
click node_api "https://github.com/aayushkrgupta/pulse5g/blob/main/src/services/api.ts"
click node_socket "https://github.com/aayushkrgupta/pulse5g/blob/main/src/services/websocket.ts"
click node_config "https://github.com/aayushkrgupta/pulse5g/blob/main/src/services/config.ts"

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,node_index,node_tabs,node_cameras,node_network,node_stream toneBlue
class node_dashboard,node_incidents toneAmber
class node_api,node_socket,node_config toneMint
class node_secure toneRose
class node_operator,node_edge toneIndigo
```

## Components

### Mobile interface

- [App entry](https://github.com/aayushkrgupta/pulse5g/blob/main/App.tsx): `App.tsx`
- [Initial redirect](https://github.com/aayushkrgupta/pulse5g/blob/main/app/index.tsx): `app/index.tsx`
- [Tab navigation](https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/_layout.tsx): `app/(tabs)/_layout.tsx`
- [Camera screen](https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/cameras.tsx): `app/(tabs)/cameras.tsx`
- [Network screen](https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/network.tsx): `app/(tabs)/network.tsx`
- [Video stream](https://github.com/aayushkrgupta/pulse5g/blob/main/src/components/LiveVideoStream.tsx): `src/components/LiveVideoStream.tsx`

### Incident monitoring

- [Dashboard](https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/dashboard.tsx): `app/(tabs)/dashboard.tsx`
- [Incident history](https://github.com/aayushkrgupta/pulse5g/blob/main/app/(tabs)/incidents.tsx): `app/(tabs)/incidents.tsx`

### Edge connectivity

- [HTTP API](https://github.com/aayushkrgupta/pulse5g/blob/main/src/services/api.ts): `src/services/api.ts`
- [Alert socket](https://github.com/aayushkrgupta/pulse5g/blob/main/src/services/websocket.ts): `src/services/websocket.ts`
- [Endpoint config](https://github.com/aayushkrgupta/pulse5g/blob/main/src/services/config.ts): `src/services/config.ts`

### Local state

- **Secure storage**

### Other components

- **Operator**
- **Edge service**

## Connections

- Operator → App entry: opens
- App entry → Initial redirect: loads
- Initial redirect → Tab navigation: redirects
- Tab navigation → Dashboard: routes
- Tab navigation → Incident history: routes
- Tab navigation → Camera screen: routes
- Tab navigation → Network screen: routes
- Dashboard → HTTP API: fetches latest
- Dashboard → Alert socket: subscribes
- Dashboard → Incident history: opens history
- Incident history → HTTP API: fetches latest
- Incident history → Secure storage: reads/writes history
- Camera screen → Video stream: renders
- Video stream → HTTP API: gets stream URL
- HTTP API → Endpoint config: reads endpoints
- Alert socket → Endpoint config: reads endpoint
- HTTP API → Edge service: requests data
- Alert socket → Edge service: connects
- Video stream → Edge service: loads stream
