# 1nsharma/hive architecture

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

- Interactive diagram: https://gitdiagram.com/1nsharma/hive
- Repository: https://github.com/1nsharma/hive

## Overview

AI Hive is a multi-agent enterprise platform spanning a web command center, a native desktop orchestrator, business-unit services, and autonomous research and deal-closing tools. The documented user workflow is to enter through the web or desktop interface, coordinate agent and business operations, and use specialized engines for prospect verification and acquisition; enterprise units provide domain-specific workflows. The graph preserves the major README capabilities, but several web and enterprise internals are unsampled, so those components are shown at directory or entry-point level and their internal connections are omitted.

Main entry points: [`web/server.js`](https://github.com/1nsharma/hive/blob/main/web/server.js) (Web Command Center), [`web/services`](https://github.com/1nsharma/hive/tree/main/web/services) (Business Services), [`desktop/src/main/index.ts`](https://github.com/1nsharma/hive/blob/main/desktop/src/main/index.ts) (Desktop Host), [`desktop/src/renderer/src/App.tsx`](https://github.com/1nsharma/hive/blob/main/desktop/src/renderer/src/App.tsx) (Desktop Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Platform"]
  node_webui["Web Command Center<br/>[server.js]"]
  node_modelrouter["Model Routing<br/>[model-router.js]"]
  node_fleet["Workforce Fleet<br/>[fleet-engine.js]"]
  node_schedule["Scheduling<br/>[schedule-engine.js]"]
  node_businessservices["Business Services"]
end

subgraph group_desktop["Desktop Orchestrator"]
  node_desktopmain["Desktop Host<br/>[index.ts]"]
  node_desktopui["Desktop Interface<br/>[App.tsx]"]
  node_agentcatalog["Agent Providers<br/>[agentProvider.ts]"]
  node_toolcatalog["Tool Catalog<br/>[toolCatalog.ts]"]
  node_realtime["Realtime Sessions<br/>[session.ts]"]
end

subgraph group_revenue["Revenue Engines"]
  node_research["B2B Research<br/>[engine.mjs]"]
  node_dossiers[("Prospect Dossiers")]
  node_validators["Authority Validators"]
  node_closing["Deal Closing<br/>[engine.mjs]"]
end

subgraph group_enterprise["Enterprise Units"]
  node_commerce["Commerce Unit<br/>[app.routes.ts]"]
  node_logistics["Logistics Unit"]
  node_cleantech["CleanTech Unit"]
  node_opportunity["Opportunity Engine"]
end

subgraph group_agentops["Agent Operations"]
  node_policyview["Policy Simulator"]
  node_policyengine["Policy Engine<br/>[policyEngine.ts]"]
end

node_user(("Operator"))

node_user -->|"operates"| node_webui
node_user -->|"operates"| node_desktopui
node_webui -.->|"accesses"| node_businessservices
node_webui -.->|"routes models"| node_modelrouter
node_webui -.->|"coordinates agents"| node_fleet
node_webui -.->|"uses schedule"| node_schedule
node_desktopui -.->|"uses host"| node_desktopmain
node_desktopmain -.->|"uses providers"| node_agentcatalog
node_desktopmain -.->|"checks tools"| node_toolcatalog
node_desktopui -.->|"offers sessions"| node_realtime
node_user -->|"researches prospects"| node_research
node_research -->|"searches dossiers"| node_dossiers
node_research -->|"validates authority"| node_validators
node_user -->|"closes deals"| node_closing
node_closing -->|"loads leads"| node_dossiers
node_businessservices -.->|"includes commerce"| node_commerce
node_businessservices -.->|"includes logistics"| node_logistics
node_user -.->|"simulates opportunities"| node_opportunity
node_user -->|"simulates policy"| node_policyview
node_policyview -->|"evaluates policy"| node_policyengine

click node_webui "https://github.com/1nsharma/hive/blob/main/web/server.js"
click node_modelrouter "https://github.com/1nsharma/hive/blob/main/web/shared/core/model-router.js"
click node_fleet "https://github.com/1nsharma/hive/blob/main/web/core/fleet-engine.js"
click node_schedule "https://github.com/1nsharma/hive/blob/main/web/core/schedule-engine.js"
click node_businessservices "https://github.com/1nsharma/hive/tree/main/web/services"
click node_desktopmain "https://github.com/1nsharma/hive/blob/main/desktop/src/main/index.ts"
click node_desktopui "https://github.com/1nsharma/hive/blob/main/desktop/src/renderer/src/App.tsx"
click node_agentcatalog "https://github.com/1nsharma/hive/blob/main/desktop/src/shared/agentProvider.ts"
click node_toolcatalog "https://github.com/1nsharma/hive/blob/main/desktop/src/shared/toolCatalog.ts"
click node_realtime "https://github.com/1nsharma/hive/blob/main/desktop/src/renderer/src/realtime/session.ts"
click node_research "https://github.com/1nsharma/hive/blob/main/client-research-engine/engine.mjs"
click node_dossiers "https://github.com/1nsharma/hive/blob/main/client-research-engine/dossiers/enterprise-leads.mjs"
click node_validators "https://github.com/1nsharma/hive/tree/main/client-research-engine/validators"
click node_closing "https://github.com/1nsharma/hive/blob/main/closing-engine/engine.mjs"
click node_commerce "https://github.com/1nsharma/hive/blob/main/enterprise/02_COMMERCE_RETAIL_AND_MSME/DukaanMitra-OS_desktop/apps/core-engine/src/api/routes/app.routes.ts"
click node_logistics "https://github.com/1nsharma/hive/blob/main/enterprise/03_LOGISTICS_AND_SUPPLY_CHAIN/truck-wala-24x7-operations/src/components/JobLifecycleEngine.tsx"
click node_cleantech "https://github.com/1nsharma/hive/blob/main/enterprise/05_CLEANTECH_AND_ENERGY/solar-hub_desktop/management/engineering/engineering_loop.py"
click node_opportunity "https://github.com/1nsharma/hive/blob/main/enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/seed-to-forest-autonomous-ai-enterprise-os/src/components/OpportunityEngineSimulator.tsx"
click node_policyview "https://github.com/1nsharma/hive/blob/main/enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/universal-autonomous-agent/src/components/PolicyEngineView.tsx"
click node_policyengine "https://github.com/1nsharma/hive/blob/main/enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/universal-autonomous-agent/src/lib/policyEngine.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_webui,node_modelrouter,node_fleet,node_schedule,node_businessservices toneBlue
class node_desktopmain,node_desktopui,node_agentcatalog,node_toolcatalog,node_realtime toneAmber
class node_research,node_dossiers,node_validators,node_closing toneMint
class node_commerce,node_logistics,node_cleantech,node_opportunity toneRose
class node_policyview,node_policyengine,node_user toneIndigo
```

## Components

### Web Platform

- [Web Command Center](https://github.com/1nsharma/hive/blob/main/web/server.js): `web/server.js`
- [Model Routing](https://github.com/1nsharma/hive/blob/main/web/shared/core/model-router.js): `web/shared/core/model-router.js`
- [Workforce Fleet](https://github.com/1nsharma/hive/blob/main/web/core/fleet-engine.js): `web/core/fleet-engine.js`
- [Scheduling](https://github.com/1nsharma/hive/blob/main/web/core/schedule-engine.js): `web/core/schedule-engine.js`
- [Business Services](https://github.com/1nsharma/hive/tree/main/web/services): `web/services`

### Desktop Orchestrator

- [Desktop Host](https://github.com/1nsharma/hive/blob/main/desktop/src/main/index.ts): `desktop/src/main/index.ts`
- [Desktop Interface](https://github.com/1nsharma/hive/blob/main/desktop/src/renderer/src/App.tsx): `desktop/src/renderer/src/App.tsx`
- [Agent Providers](https://github.com/1nsharma/hive/blob/main/desktop/src/shared/agentProvider.ts): `desktop/src/shared/agentProvider.ts`
- [Tool Catalog](https://github.com/1nsharma/hive/blob/main/desktop/src/shared/toolCatalog.ts): `desktop/src/shared/toolCatalog.ts`
- [Realtime Sessions](https://github.com/1nsharma/hive/blob/main/desktop/src/renderer/src/realtime/session.ts): `desktop/src/renderer/src/realtime/session.ts`

### Revenue Engines

- [B2B Research](https://github.com/1nsharma/hive/blob/main/client-research-engine/engine.mjs): `client-research-engine/engine.mjs`
- [Prospect Dossiers](https://github.com/1nsharma/hive/blob/main/client-research-engine/dossiers/enterprise-leads.mjs): `client-research-engine/dossiers/enterprise-leads.mjs`
- [Authority Validators](https://github.com/1nsharma/hive/tree/main/client-research-engine/validators): `client-research-engine/validators`
- [Deal Closing](https://github.com/1nsharma/hive/blob/main/closing-engine/engine.mjs): `closing-engine/engine.mjs`

### Enterprise Units

- [Commerce Unit](https://github.com/1nsharma/hive/blob/main/enterprise/02_COMMERCE_RETAIL_AND_MSME/DukaanMitra-OS_desktop/apps/core-engine/src/api/routes/app.routes.ts): `enterprise/02_COMMERCE_RETAIL_AND_MSME/DukaanMitra-OS_desktop/apps/core-engine/src/api/routes/app.routes.ts`
- [Logistics Unit](https://github.com/1nsharma/hive/blob/main/enterprise/03_LOGISTICS_AND_SUPPLY_CHAIN/truck-wala-24x7-operations/src/components/JobLifecycleEngine.tsx): `enterprise/03_LOGISTICS_AND_SUPPLY_CHAIN/truck-wala-24x7-operations/src/components/JobLifecycleEngine.tsx`
- [CleanTech Unit](https://github.com/1nsharma/hive/blob/main/enterprise/05_CLEANTECH_AND_ENERGY/solar-hub_desktop/management/engineering/engineering_loop.py): `enterprise/05_CLEANTECH_AND_ENERGY/solar-hub_desktop/management/engineering/engineering_loop.py`
- [Opportunity Engine](https://github.com/1nsharma/hive/blob/main/enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/seed-to-forest-autonomous-ai-enterprise-os/src/components/OpportunityEngineSimulator.tsx): `enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/seed-to-forest-autonomous-ai-enterprise-os/src/components/OpportunityEngineSimulator.tsx`

### Agent Operations

- [Policy Simulator](https://github.com/1nsharma/hive/blob/main/enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/universal-autonomous-agent/src/components/PolicyEngineView.tsx): `enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/universal-autonomous-agent/src/components/PolicyEngineView.tsx`
- [Policy Engine](https://github.com/1nsharma/hive/blob/main/enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/universal-autonomous-agent/src/lib/policyEngine.ts): `enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/universal-autonomous-agent/src/lib/policyEngine.ts`

### Other components

- **Operator**

## Connections

- Operator → Web Command Center: operates
- Operator → Desktop Interface: operates
- Web Command Center → Business Services: accesses
- Web Command Center → Model Routing: routes models
- Web Command Center → Workforce Fleet: coordinates agents
- Web Command Center → Scheduling: uses schedule
- Desktop Interface → Desktop Host: uses host
- Desktop Host → Agent Providers: uses providers
- Desktop Host → Tool Catalog: checks tools
- Desktop Interface → Realtime Sessions: offers sessions
- Operator → B2B Research: researches prospects
- B2B Research → Prospect Dossiers: searches dossiers (evidence: `client-research-engine/engine.mjs`)
- B2B Research → Authority Validators: validates authority (evidence: `client-research-engine/engine.mjs`)
- Operator → Deal Closing: closes deals
- Deal Closing → Prospect Dossiers: loads leads (evidence: `closing-engine/engine.mjs`)
- Business Services → Commerce Unit: includes commerce
- Business Services → Logistics Unit: includes logistics
- Operator → Opportunity Engine: simulates opportunities
- Operator → Policy Simulator: simulates policy (evidence: `enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/universal-autonomous-agent/src/components/PolicyEngineView.tsx`)
- Policy Simulator → Policy Engine: evaluates policy (evidence: `enterprise/01_AI_CORE_AND_AUTONOMOUS_AGENTS/universal-autonomous-agent/src/components/PolicyEngineView.tsx`)
