# sureshmagix/remote-care architecture

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

- Interactive diagram: https://gitdiagram.com/sureshmagix/remote-care
- Repository: https://github.com/sureshmagix/remote-care

## Overview

Remote Care Monitor is a local-first desktop and headless monitoring application. Users configure monitors and settings in the dashboard; the monitor engine runs checks, records status transitions and history locally, and presents alerts. The app also supports authentication, reports, webhooks, and optional cloud publishing and history sync. The graph includes these documented branches, though some implementations are unsampled and are represented only at their existing source directories. Edges reflect calls visible in excerpts or capabilities and relationships documented in the README.

Main entry points: [`src/daemon/index.js`](https://github.com/sureshmagix/remote-care/blob/main/src/daemon/index.js) (Headless daemon), [`src/main/database.js`](https://github.com/sureshmagix/remote-care/blob/main/src/main/database.js) (SQLite store), [`src/main/app.js`](https://github.com/sureshmagix/remote-care/blob/main/src/main/app.js) (Desktop app), [`src/main/monitor-engine.js`](https://github.com/sureshmagix/remote-care/blob/main/src/main/monitor-engine.js) (Monitor engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_desktop["Desktop app<br/>[app.js]"]
  node_dashboard["Dashboard<br/>[app.js]"]
  node_auth["Authentication<br/>[auth.js]"]
  node_autostart["Sign-in launch<br/>[autostart.js]"]
  node_notifications["Desktop alerts"]
  node_popup["Alert renderer<br/>[notification.js]"]
end

subgraph group_monitoring["Monitoring"]
  node_engine["Monitor engine<br/>[monitor-engine.js]"]
  node_checks["Monitor checks<br/>[checks.js]"]
  node_daemon["Headless daemon<br/>[index.js]"]
end

subgraph group_localdata["Local data"]
  node_database[("SQLite store<br/>[database.js]")]
  node_history["History and reports<br/>[database.js]"]
end

subgraph group_integrations["External delivery"]
  node_webhooks["Webhook delivery<br/>[webhooks.js]"]
  node_cloud["Cloud publisher<br/>[cloud-publisher.js]"]
  node_heartbeat["Device heartbeat<br/>[heartbeat.js]"]
  node_historysync["History sync<br/>[history-sync.js]"]
end

node_user(("Operator"))
node_webhookservice{{"Webhook endpoint"}}
node_cloudservice{{"Cloud endpoint"}}

node_user -->|"uses"| node_dashboard
node_dashboard -.->|"sends actions"| node_desktop
node_desktop -->|"verifies credentials"| node_auth
node_desktop -->|"reads and writes"| node_database
node_desktop -->|"starts monitoring"| node_engine
node_desktop -.->|"dispatches alerts"| node_notifications
node_desktop -->|"registers launch"| node_autostart
node_engine -->|"executes checks"| node_checks
node_engine -->|"records results"| node_database
node_engine -.->|"signals transitions"| node_notifications
node_database -->|"stores history"| node_history
node_notifications -->|"sends alert data"| node_popup
node_daemon -->|"starts monitoring"| node_engine
node_daemon -->|"opens local store"| node_database
node_daemon -->|"dispatches events"| node_webhooks
node_webhooks -->|"posts alerts"| node_webhookservice
node_daemon -->|"starts publishing"| node_cloud
node_daemon -->|"starts heartbeat"| node_heartbeat
node_daemon -->|"starts sync"| node_historysync
node_cloud -->|"reads queued events"| node_database
node_cloud -->|"posts batches"| node_cloudservice
node_heartbeat -->|"queues telemetry"| node_database
node_heartbeat -->|"triggers publish"| node_cloud
node_historysync -->|"reads history"| node_database
node_historysync -->|"sends history"| node_cloudservice
node_dashboard -.->|"views and exports"| node_history

click node_desktop "https://github.com/sureshmagix/remote-care/blob/main/src/main/app.js"
click node_dashboard "https://github.com/sureshmagix/remote-care/blob/main/src/renderer/app.js"
click node_auth "https://github.com/sureshmagix/remote-care/blob/main/src/main/auth.js"
click node_autostart "https://github.com/sureshmagix/remote-care/blob/main/src/main/autostart.js"
click node_engine "https://github.com/sureshmagix/remote-care/blob/main/src/main/monitor-engine.js"
click node_checks "https://github.com/sureshmagix/remote-care/blob/main/src/main/checks.js"
click node_notifications "https://github.com/sureshmagix/remote-care/blob/main/src/main/notification-center.js"
click node_popup "https://github.com/sureshmagix/remote-care/blob/main/src/renderer/notification.js"
click node_database "https://github.com/sureshmagix/remote-care/blob/main/src/main/database.js"
click node_history "https://github.com/sureshmagix/remote-care/blob/main/src/main/database.js"
click node_daemon "https://github.com/sureshmagix/remote-care/blob/main/src/daemon/index.js"
click node_webhooks "https://github.com/sureshmagix/remote-care/blob/main/src/main/webhooks.js"
click node_cloud "https://github.com/sureshmagix/remote-care/blob/main/src/main/cloud-publisher.js"
click node_heartbeat "https://github.com/sureshmagix/remote-care/blob/main/src/main/heartbeat.js"
click node_historysync "https://github.com/sureshmagix/remote-care/blob/main/src/main/history-sync.js"

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_desktop,node_dashboard,node_auth,node_autostart,node_notifications,node_popup toneBlue
class node_engine,node_checks,node_daemon toneAmber
class node_database,node_history,node_webhookservice toneMint
class node_webhooks,node_cloud,node_heartbeat,node_historysync toneRose
class node_user,node_cloudservice toneIndigo
```

## Components

### Desktop interface

- [Desktop app](https://github.com/sureshmagix/remote-care/blob/main/src/main/app.js): `src/main/app.js`
- [Dashboard](https://github.com/sureshmagix/remote-care/blob/main/src/renderer/app.js): `src/renderer/app.js`
- [Authentication](https://github.com/sureshmagix/remote-care/blob/main/src/main/auth.js): `src/main/auth.js`
- [Sign-in launch](https://github.com/sureshmagix/remote-care/blob/main/src/main/autostart.js): `src/main/autostart.js`
- [Desktop alerts](https://github.com/sureshmagix/remote-care/blob/main/src/main/notification-center.js): `src/main/notification-center.js`
- [Alert renderer](https://github.com/sureshmagix/remote-care/blob/main/src/renderer/notification.js): `src/renderer/notification.js`

### Monitoring

- [Monitor engine](https://github.com/sureshmagix/remote-care/blob/main/src/main/monitor-engine.js): `src/main/monitor-engine.js`
- [Monitor checks](https://github.com/sureshmagix/remote-care/blob/main/src/main/checks.js): `src/main/checks.js`
- [Headless daemon](https://github.com/sureshmagix/remote-care/blob/main/src/daemon/index.js): `src/daemon/index.js`

### Local data

- [SQLite store](https://github.com/sureshmagix/remote-care/blob/main/src/main/database.js): `src/main/database.js`
- [History and reports](https://github.com/sureshmagix/remote-care/blob/main/src/main/database.js): `src/main/database.js`

### External delivery

- [Webhook delivery](https://github.com/sureshmagix/remote-care/blob/main/src/main/webhooks.js): `src/main/webhooks.js`
- [Cloud publisher](https://github.com/sureshmagix/remote-care/blob/main/src/main/cloud-publisher.js): `src/main/cloud-publisher.js`
- [Device heartbeat](https://github.com/sureshmagix/remote-care/blob/main/src/main/heartbeat.js): `src/main/heartbeat.js`
- [History sync](https://github.com/sureshmagix/remote-care/blob/main/src/main/history-sync.js): `src/main/history-sync.js`

### Other components

- **Operator**
- **Webhook endpoint**
- **Cloud endpoint**

## Connections

- Operator → Dashboard: uses (evidence: `README.md`)
- Dashboard → Desktop app: sends actions
- Desktop app → Authentication: verifies credentials (evidence: `src/main/app.js`)
- Desktop app → SQLite store: reads and writes (evidence: `src/main/app.js`)
- Desktop app → Monitor engine: starts monitoring (evidence: `src/main/app.js`)
- Desktop app → Desktop alerts: dispatches alerts (evidence: `src/main/app.js`)
- Desktop app → Sign-in launch: registers launch (evidence: `README.md`)
- Monitor engine → Monitor checks: executes checks (evidence: `src/main/monitor-engine.js`)
- Monitor engine → SQLite store: records results (evidence: `src/main/monitor-engine.js`)
- Monitor engine → Desktop alerts: signals transitions
- SQLite store → History and reports: stores history (evidence: `README.md`)
- Desktop alerts → Alert renderer: sends alert data (evidence: `src/main/notification-center.js`)
- Headless daemon → Monitor engine: starts monitoring (evidence: `src/daemon/index.js`)
- Headless daemon → SQLite store: opens local store (evidence: `src/daemon/index.js`)
- Headless daemon → Webhook delivery: dispatches events (evidence: `src/daemon/index.js`)
- Webhook delivery → Webhook endpoint: posts alerts (evidence: `src/main/webhooks.js`)
- Headless daemon → Cloud publisher: starts publishing (evidence: `src/daemon/index.js`)
- Headless daemon → Device heartbeat: starts heartbeat (evidence: `src/daemon/index.js`)
- Headless daemon → History sync: starts sync (evidence: `src/daemon/index.js`)
- Cloud publisher → SQLite store: reads queued events (evidence: `src/main/cloud-publisher.js`)
- Cloud publisher → Cloud endpoint: posts batches (evidence: `src/main/cloud-publisher.js`)
- Device heartbeat → SQLite store: queues telemetry (evidence: `src/main/heartbeat.js`)
- Device heartbeat → Cloud publisher: triggers publish (evidence: `src/main/heartbeat.js`)
- History sync → SQLite store: reads history (evidence: `src/main/history-sync.js`)
- History sync → Cloud endpoint: sends history (evidence: `src/main/history-sync.js`)
- Dashboard → History and reports: views and exports (evidence: `README.md`)
