# exploretechvijay/api-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/exploretechvijay/api-pulse
- Repository: https://github.com/exploretechvijay/api-pulse

## Overview

API Pulse is a self-hosted API monitoring and performance-testing dashboard. Users configure monitors or latency/load tests in the web UI, the server runs checks and tests, persists results, and presents live status, alerts, and analysis. The README documents capabilities such as network simulation, test comparisons, maintenance windows, and public status pages; several implementing files are present in the tree but were not sampled, so those branches are shown without speculative internal call edges.

Main entry points: [`web/src/App.jsx`](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/App.jsx) (Web application), [`server/src/index.js`](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/index.js) (HTTP server), [`server/src/monitor/scheduler.js`](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/monitor/scheduler.js) (Check scheduler), [`server/src/alerts/service.js`](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/alerts/service.js) (Alert lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Dashboard"]
  node_app["Web application<br/>[App.jsx]"]
  node_client["API client<br/>[api.js]"]
  node_store["Live state<br/>[store.jsx]"]
  node_monitor_ui["Monitor UI<br/>[MonitorForm.jsx]"]
  node_test_ui["Test UI<br/>[LoadTest.jsx]"]
  node_results_ui["Results and insights<br/>[RunDetail.jsx]"]
  node_dashboard_ui["Status dashboard<br/>[Dashboard.jsx]"]
  node_status_page["Public status page<br/>[StatusPage.jsx]"]
end

subgraph group_api["Server API"]
  node_server["HTTP server<br/>[index.js]"]
  node_auth_routes["Authentication routes<br/>[auth.js]"]
  node_monitor_routes["Monitor routes<br/>[monitors.js]"]
  node_alert_routes["Alert routes<br/>[alerts.js]"]
  node_test_routes["Test routes<br/>[tests.js]"]
end

subgraph group_monitoring["Monitoring"]
  node_monitor_model["Monitor rules<br/>[model.js]"]
  node_scheduler["Check scheduler<br/>[scheduler.js]"]
  node_request["HTTP checks<br/>[request.js]"]
  node_alert_service["Alert lifecycle<br/>[service.js]"]
  node_channels["Alert channels<br/>[channels.js]"]
end

subgraph group_testing["Performance testing"]
  node_test_engine["Test execution<br/>[tests.js]"]
  node_throttle["Network simulation<br/>[throttle.js]"]
  node_profiles["Network profiles"]
  node_runs["Run history<br/>[Runs.jsx]"]
end

subgraph group_state["Persistence and operations"]
  node_db[("SQLite database<br/>[db.js]")]
  node_auth["Identity and sessions<br/>[auth.js]"]
  node_audit["Audit log<br/>[audit.js]"]
  node_config_io["Config import<br/>[configio.js]"]
  node_maintenance["Maintenance windows<br/>[maintenance.js]"]
end

node_user(("Operator"))
node_external_api{{"Monitored API"}}
node_alert_dest{{"Alert destinations"}}

node_user -->|"uses"| node_app
node_app -->|"requests status"| node_client
node_app -->|"routes to"| node_monitor_ui
node_app -->|"routes to"| node_test_ui
node_app -->|"routes to"| node_results_ui
node_app -->|"routes to"| node_dashboard_ui
node_app -->|"routes to"| node_status_page
node_store -->|"fetches data"| node_client
node_client -.->|"calls API"| node_server
node_server -->|"mounts routes"| node_auth_routes
node_server -->|"mounts routes"| node_monitor_routes
node_server -->|"mounts routes"| node_alert_routes
node_server -->|"mounts routes"| node_test_routes
node_server -->|"starts checks"| node_scheduler
node_scheduler -->|"loads rules"| node_monitor_model
node_scheduler -->|"checks target"| node_request
node_request -.->|"sends requests"| node_external_api
node_scheduler -->|"reports state"| node_alert_service
node_alert_service -->|"checks suppression"| node_maintenance
node_alert_service -->|"sends notices"| node_channels
node_channels -.->|"delivers alerts"| node_alert_dest
node_test_routes -.->|"simulates networks"| node_throttle
node_profiles -.->|"configures profiles"| node_test_ui
node_test_ui -.->|"submits tests"| node_test_routes
node_results_ui -.->|"shows history"| node_runs
node_auth_routes -->|"creates sessions"| node_auth
node_auth -->|"stores credentials"| node_db
node_monitor_model -->|"persists monitors"| node_db
node_alert_service -->|"persists alerts"| node_db
node_server -->|"imports configuration"| node_config_io
node_auth_routes -->|"records actions"| node_audit
node_user -.->|"views public status"| node_status_page

click node_app "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/App.jsx"
click node_client "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/api.js"
click node_store "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/store.jsx"
click node_monitor_ui "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/MonitorForm.jsx"
click node_test_ui "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/LoadTest.jsx"
click node_results_ui "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/RunDetail.jsx"
click node_dashboard_ui "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/Dashboard.jsx"
click node_server "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/index.js"
click node_auth_routes "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/auth.js"
click node_monitor_routes "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/monitors.js"
click node_alert_routes "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/alerts.js"
click node_test_routes "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/tests.js"
click node_monitor_model "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/monitor/model.js"
click node_scheduler "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/monitor/scheduler.js"
click node_request "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/http/request.js"
click node_alert_service "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/alerts/service.js"
click node_channels "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/alerts/channels.js"
click node_test_engine "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/tests.js"
click node_throttle "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/http/throttle.js"
click node_runs "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/Runs.jsx"
click node_db "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/db.js"
click node_auth "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/auth.js"
click node_audit "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/audit.js"
click node_config_io "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/configio.js"
click node_maintenance "https://github.com/exploretechvijay/api-pulse/blob/main/server/src/alerts/maintenance.js"
click node_status_page "https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/StatusPage.jsx"

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_client,node_store,node_monitor_ui,node_test_ui,node_results_ui,node_dashboard_ui,node_status_page toneBlue
class node_server,node_auth_routes,node_monitor_routes,node_alert_routes,node_test_routes toneAmber
class node_monitor_model,node_scheduler,node_request,node_alert_service,node_channels,node_external_api toneMint
class node_test_engine,node_throttle,node_profiles,node_runs toneRose
class node_db,node_auth,node_audit,node_config_io,node_maintenance,node_user,node_alert_dest toneIndigo
```

## Components

### Dashboard

- [Web application](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/App.jsx): `web/src/App.jsx`
- [API client](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/api.js): `web/src/api.js`
- [Live state](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/store.jsx): `web/src/store.jsx`
- [Monitor UI](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/MonitorForm.jsx): `web/src/pages/MonitorForm.jsx`
- [Test UI](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/LoadTest.jsx): `web/src/pages/LoadTest.jsx`
- [Results and insights](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/RunDetail.jsx): `web/src/pages/RunDetail.jsx`
- [Status dashboard](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/Dashboard.jsx): `web/src/pages/Dashboard.jsx`
- [Public status page](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/StatusPage.jsx): `web/src/pages/StatusPage.jsx`

### Server API

- [HTTP server](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/index.js): `server/src/index.js`
- [Authentication routes](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/auth.js): `server/src/routes/auth.js`
- [Monitor routes](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/monitors.js): `server/src/routes/monitors.js`
- [Alert routes](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/alerts.js): `server/src/routes/alerts.js`
- [Test routes](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/tests.js): `server/src/routes/tests.js`

### Monitoring

- [Monitor rules](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/monitor/model.js): `server/src/monitor/model.js`
- [Check scheduler](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/monitor/scheduler.js): `server/src/monitor/scheduler.js`
- [HTTP checks](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/http/request.js): `server/src/http/request.js`
- [Alert lifecycle](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/alerts/service.js): `server/src/alerts/service.js`
- [Alert channels](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/alerts/channels.js): `server/src/alerts/channels.js`

### Performance testing

- [Test execution](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/routes/tests.js): `server/src/routes/tests.js`
- [Network simulation](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/http/throttle.js): `server/src/http/throttle.js`
- **Network profiles**
- [Run history](https://github.com/exploretechvijay/api-pulse/blob/main/web/src/pages/Runs.jsx): `web/src/pages/Runs.jsx`

### Persistence and operations

- [SQLite database](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/db.js): `server/src/db.js`
- [Identity and sessions](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/auth.js): `server/src/auth.js`
- [Audit log](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/audit.js): `server/src/audit.js`
- [Config import](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/configio.js): `server/src/configio.js`
- [Maintenance windows](https://github.com/exploretechvijay/api-pulse/blob/main/server/src/alerts/maintenance.js): `server/src/alerts/maintenance.js`

### Other components

- **Operator**
- **Monitored API**
- **Alert destinations**

## Connections

- Operator → Web application: uses (evidence: `README.md`)
- Web application → API client: requests status (evidence: `web/src/App.jsx`)
- Web application → Monitor UI: routes to (evidence: `web/src/App.jsx`)
- Web application → Test UI: routes to (evidence: `web/src/App.jsx`)
- Web application → Results and insights: routes to (evidence: `web/src/App.jsx`)
- Web application → Status dashboard: routes to (evidence: `web/src/App.jsx`)
- Web application → Public status page: routes to (evidence: `web/src/App.jsx`)
- Live state → API client: fetches data (evidence: `web/src/store.jsx`)
- API client → HTTP server: calls API
- HTTP server → Authentication routes: mounts routes (evidence: `server/src/index.js`)
- HTTP server → Monitor routes: mounts routes (evidence: `server/src/index.js`)
- HTTP server → Alert routes: mounts routes (evidence: `server/src/index.js`)
- HTTP server → Test routes: mounts routes (evidence: `server/src/index.js`)
- HTTP server → Check scheduler: starts checks (evidence: `server/src/index.js`)
- Check scheduler → Monitor rules: loads rules (evidence: `server/src/monitor/scheduler.js`)
- Check scheduler → HTTP checks: checks target (evidence: `server/src/monitor/scheduler.js`)
- HTTP checks → Monitored API: sends requests
- Check scheduler → Alert lifecycle: reports state (evidence: `server/src/monitor/scheduler.js`)
- Alert lifecycle → Maintenance windows: checks suppression (evidence: `server/src/alerts/service.js`)
- Alert lifecycle → Alert channels: sends notices (evidence: `server/src/alerts/service.js`)
- Alert channels → Alert destinations: delivers alerts
- Test routes → Network simulation: simulates networks
- Network profiles → Test UI: configures profiles
- Test UI → Test routes: submits tests
- Results and insights → Run history: shows history
- Authentication routes → Identity and sessions: creates sessions (evidence: `server/src/routes/auth.js`)
- Identity and sessions → SQLite database: stores credentials (evidence: `server/src/auth.js`)
- Monitor rules → SQLite database: persists monitors (evidence: `server/src/monitor/model.js`)
- Alert lifecycle → SQLite database: persists alerts (evidence: `server/src/alerts/service.js`)
- HTTP server → Config import: imports configuration (evidence: `server/src/index.js`)
- Authentication routes → Audit log: records actions (evidence: `server/src/routes/auth.js`)
- Operator → Public status page: views public status
