# lazydeveloper9/sih2026 architecture

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

- Interactive diagram: https://gitdiagram.com/lazydeveloper9/sih2026
- Repository: https://github.com/lazydeveloper9/sih2026

## Overview

#### 1. Repository Purpose
A dual-solution Smart India Hackathon repository containing architecture and deliverables for:
- **SafeNav-Mines (PS007):** edge-based low-visibility mine-vehicle perception, navigation, and collision warning.
- **SovereignAgent Workbench (PS117):** air-gapped, on-premise multimodal AI-agent platform for confidential industrial analysis.

Top-level orientation and shared material are in `README.md`, `Documents/`, and `Documents/Readme.md`.

#### 2. Solution Boundary and Entry Points
The two solutions are independent deployment units rather than a single integrated application:
- PS007’s deployment boundary is its container and edge dependency set: `PS007/Dockerfile`, `PS007/requirements.txt`.
- PS117’s deployment boundary is its composed on-premise stack: `PS117/docker-compose.yml`, `PS117/requirements.txt`.
- Per-solution project context is available at `PS007/Readme.md` and `PS117/Readme.md`.

#### 3. PS007: Edge Perception and Enhancement
The PS007 processing path begins with thermal IR, mmWave radar, and LiDAR inputs, then improves degraded visual input and creates a fused environmental representation. Core stages are represented by:
- Visual dehazing and contrast enhancement: `PS007/src/dehazing/`
- Multi-sensor spatial/object fusion: `PS007/src/sensor_fusion/`
- Edge deployment artifacts and vehicle/sensor integration materials: `PS007/hardware/`

Target runtime is NVIDIA Jetson Orin hardware, using ROS 2, OpenCV, TensorRT, and vision models such as YOLOv10 or RT-DETR. It is explicitly designed to function without cloud connectivity.

#### 4. PS007: Safety Decision and Telemetry Boundary
Fused perception feeds proximity evaluation, trajectory/path guidance, geofence awareness, and driver-facing collision warnings:
- Warning and trajectory-tracking stage: `PS007/src/collision_warning/`
- Containerized runtime: `PS007/Dockerfile`
- Technical architecture/specification artifact: `PS007/docs/`

Operational integrations named by the design include FastAPI for backend APIs, Mosquitto MQTT for telemetry/event transport, InfluxDB for time-series storage, and WebRTC for low-latency cab feeds. The safety-critical path is edge-local; telemetry/backend services are supporting boundaries rather than prerequisites for perception.

#### 5. PS117: Workbench and Agent Orchestration
PS117 is an internal-network workbench for analysis of confidential documents, diagrams, telemetry, and SOPs. Its primary control flow is user request → agent planning/ReAct loop → specialized task execution → governed result returned to the workbench:
- Agent definitions and orchestration layer: `PS117/backend/agents/`
- Backend service boundary: `PS117/backend/`
- User workbench application: `PS117/frontend/`

The intended AI runtime is local open-weight LLM/VLM inference, including DeepSeek, Llama, and Qwen models through vLLM or Ollama. LangGraph/CrewAI and a custom ReAct orchestrator support multi-agent coordination.

#### 6. PS117: Local Knowledge and Controlled Execution
Documents and industrial artifacts are ingested locally, embedded/indexed, retrieved under role/access constraints, and supplied to agents as grounded context:
- Air-gapped ingestion and RAG layer: `PS117/backend/rag_engine/`
- Quantized-model setup/runtime material: `PS117/models/`
- Security-focused implementation documentation: `PS117/docs/`

The design calls for Qdrant or Milvus vector search with BGE-M3 hybrid embeddings, alongside PostgreSQL for application data. The central architectural constraint is zero external API dependency or telemetry.

#### 7. PS117: Isolation and Deployment
Agent-requested code interpretation or diagnostics must cross an execution-isolation boundary rather than execute in the orchestration process:
- Isolated execution environment: `PS117/backend/sandbox/`
- Multi-service local deployment definition: `PS117/docker-compose.yml`
- Backend dependency/runtime definition: `PS117/requirements.txt`

The stated sandbox model uses Dockerized Python execution and/or gVisor. This boundary protects the host and the air-gapped industrial environment while allowing agents to perform controlled analysis.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ps007["PS007 SafeNav-Mines"]
  node_ps007_sensors{{"Vehicle sensors<br/>thermal, radar, LiDAR"}}
  node_ps007_enhancement["Visual enhancement<br/>dehazing"]
  node_ps007_fusion["Sensor fusion<br/>perception fusion"]
  node_ps007_safety["Safety guidance<br/>collision warning"]
  node_ps007_vehicle{{"Vehicle integration<br/>edge hardware"}}
  node_ps007_runtime["Edge runtime<br/>containerized ROS 2"]
  node_ps007_driver["Driver warning and cab feed<br/>local HMI"]
  node_ps007_telemetry[("Telemetry services<br/>MQTT, API, time series")]
end

subgraph group_ps117["PS117 SovereignAgent"]
  node_ps117_workbench["User workbench<br/>frontend"]
  node_ps117_backend["Backend service<br/>internal API"]
  node_ps117_orchestrator["Agent orchestration<br/>ReAct multi-agent"]
  node_ps117_rag["Knowledge ingestion and RAG<br/>grounded retrieval"]
  node_ps117_knowledge[("Local knowledge stores<br/>vector and application data")]
  node_ps117_models{{"Local model runtime<br/>LLM/VLM inference"}}
  node_ps117_sandbox["Isolated execution<br/>Docker or gVisor sandbox"]
  node_ps117_deployment["On-prem stack<br/>Compose deployment"]
end

node_ps007_sensors -->|"thermal visual input"| node_ps007_enhancement
node_ps007_sensors -->|"radar and LiDAR input"| node_ps007_fusion
node_ps007_enhancement -->|"enhanced imagery"| node_ps007_fusion
node_ps007_fusion -->|"fused environment"| node_ps007_safety
node_ps007_safety -->|"warnings and guidance"| node_ps007_driver
node_ps007_safety -.->|"events and telemetry"| node_ps007_telemetry
node_ps007_vehicle -->|"deploys on"| node_ps007_runtime
node_ps007_runtime -.->|"hosts"| node_ps007_enhancement
node_ps007_runtime -.->|"hosts"| node_ps007_fusion
node_ps007_runtime -.->|"hosts"| node_ps007_safety
node_ps117_workbench -->|"user request"| node_ps117_backend
node_ps117_backend -->|"analysis request"| node_ps117_orchestrator
node_ps117_orchestrator -->|"grounded context query"| node_ps117_rag
node_ps117_rag -->|"indexes and retrieves"| node_ps117_knowledge
node_ps117_orchestrator -->|"local inference"| node_ps117_models
node_ps117_orchestrator -->|"controlled execution"| node_ps117_sandbox
node_ps117_orchestrator -->|"governed result"| node_ps117_backend
node_ps117_backend -->|"result"| node_ps117_workbench
node_ps117_deployment -.->|"deploys"| node_ps117_backend
node_ps117_deployment -.->|"deploys"| node_ps117_models
node_ps117_deployment -.->|"deploys"| node_ps117_knowledge
node_ps117_deployment -.->|"deploys"| node_ps117_sandbox

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_ps007_sensors,node_ps007_enhancement,node_ps007_fusion,node_ps007_safety,node_ps007_vehicle,node_ps007_runtime,node_ps007_driver,node_ps007_telemetry toneBlue
class node_ps117_workbench,node_ps117_backend,node_ps117_orchestrator,node_ps117_rag,node_ps117_knowledge,node_ps117_models,node_ps117_sandbox,node_ps117_deployment toneAmber
```

## Components

### PS007 SafeNav-Mines

Edge-local mine-vehicle safety system.

- **Vehicle sensors**: thermal, radar, LiDAR
- **Visual enhancement**: dehazing
- **Sensor fusion**: perception fusion · Builds a fused environmental representation.
- **Safety guidance**: collision warning · Evaluates proximity, trajectory, and geofences.
- **Vehicle integration**: edge hardware · Jetson and vehicle/sensor integration materials.
- **Edge runtime**: containerized ROS 2 · Runs perception and safety logic without cloud connectivity.
- **Driver warning and cab feed**: local HMI
- **Telemetry services**: MQTT, API, time series · Supporting Mosquitto, FastAPI, and InfluxDB boundary.

### PS117 SovereignAgent

Air-gapped industrial AI workbench.

- **User workbench**: frontend
- **Backend service**: internal API · Local service boundary for workbench requests and results.
- **Agent orchestration**: ReAct multi-agent · Plans and coordinates specialized tasks.
- **Knowledge ingestion and RAG**: grounded retrieval · Locally indexes and retrieves governed industrial context.
- **Local knowledge stores**: vector and application data · Qdrant or Milvus alongside PostgreSQL.
- **Local model runtime**: LLM/VLM inference · Open-weight models served through vLLM or Ollama.
- **Isolated execution**: Docker or gVisor sandbox · Executes diagnostics outside the orchestration process.
- **On-prem stack**: Compose deployment · Air-gapped multi-service deployment boundary.

## Connections

- Vehicle sensors → Visual enhancement: thermal visual input
- Vehicle sensors → Sensor fusion: radar and LiDAR input
- Visual enhancement → Sensor fusion: enhanced imagery
- Sensor fusion → Safety guidance: fused environment
- Safety guidance → Driver warning and cab feed: warnings and guidance
- Safety guidance → Telemetry services: events and telemetry
- Vehicle integration → Edge runtime: deploys on
- Edge runtime → Visual enhancement: hosts
- Edge runtime → Sensor fusion: hosts
- Edge runtime → Safety guidance: hosts
- User workbench → Backend service: user request
- Backend service → Agent orchestration: analysis request
- Agent orchestration → Knowledge ingestion and RAG: grounded context query
- Knowledge ingestion and RAG → Local knowledge stores: indexes and retrieves
- Agent orchestration → Local model runtime: local inference
- Agent orchestration → Isolated execution: controlled execution
- Agent orchestration → Backend service: governed result
- Backend service → User workbench: result
- On-prem stack → Backend service: deploys
- On-prem stack → Local model runtime: deploys
- On-prem stack → Local knowledge stores: deploys
- On-prem stack → Isolated execution: deploys
