sarvekshanam_v2

Architecture Overview

Sarvekshanam uses a distributed architecture designed for scalability, security, and real-time orchestration.

Architecture Diagram

Core Components

1. Master Node (Node.js)

The brain of the operation. It serves the frontend, handles authentication, maintains the database, and orchestrates the distributed slaves.

2. Remote Runners / Slaves (Go)

Lightweight execution agents deployed on target networks or edge nodes.

3. Databases

The “Appointment” Entity

The core operational unit in Sarvekshanam is the Appointment. An appointment groups multiple scan sessions and AI chat histories together. When you ask the AI to “analyze my scans”, it automatically has context of all scans executed within the active appointment.

Master ↔ Slave Data Flow

  1. Discovery: Master polls registered Runners.
  2. Auth: Master signs a short-lived JWT using its RSA private key. Runner verifies using Master’s public JWKS.
  3. Execution: Master POSTs to Runner’s /run endpoint. Sensitive arguments are encrypted using the Runner’s public RSA key.
  4. Streaming: Runner spawns the task, streams output back to Master via SSE.
  5. Storage: Master broadcasts updates to the UI via WebSocket, and stores the final result in the database and Vector DB.