# rakeshvarma007/codesense-doc-string-generator architecture

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

- Interactive diagram: https://gitdiagram.com/rakeshvarma007/codesense-doc-string-generator
- Repository: https://github.com/rakeshvarma007/codesense-doc-string-generator

## Overview

Nasiko is an AI-agent registry and orchestration platform. A user or operator submits requests through the API or CLI; the backend manages agent records, search, uploads, and orchestration, while the router selects an agent and forwards requests to deployed agents. Deployment commands flow through Redis to a Kubernetes build worker. The README also documents observability and integrations. Some branches are represented by their exact subsystem directories because their implementation files were not sampled; edges without direct evidence are omitted.

Main entry points: [`app/main.py`](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/main.py) (FastAPI Backend), [`agent-gateway/router/src/services/router_orchestrator.py`](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/services/router_orchestrator.py) (Request Orchestrator), [`app/api/handlers`](https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/api/handlers) (API Handlers), [`app/service`](https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/service) (Platform Services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Client Interfaces"]
  node_cli["Nasiko CLI<br/>[main.py]"]
end

subgraph group_platform["Platform API"]
  node_api["FastAPI Backend<br/>[main.py]"]
  node_routes["API Routes"]
  node_handlers["API Handlers"]
  node_services["Platform Services"]
  node_repositories["Repositories"]
  node_mongo[("MongoDB")]
  node_search[("Search Index")]
  node_auth["Auth Service<br/>[main.py]"]
  node_chat_history["Chat History Service<br/>[main.py]"]
  node_observability["Observability Services"]
end

subgraph group_routing["Agent Routing"]
  node_router_service["Router Service<br/>[main.py]"]
  node_router_orchestrator["Request Orchestrator"]
  node_agent_registry["Agent Registry Client<br/>[agent_registry.py]"]
  node_routing_engine["Routing Engine<br/>[routing_engine.py]"]
  node_vector_store[("Agent Vector Store<br/>[vector_store.py]")]
  node_agent_client["Agent Client<br/>[agent_client.py]"]
end

subgraph group_deployment["Deployment Orchestration"]
  node_orchestration_service["Orchestration Service"]
  node_redis_stream["Redis Command Stream"]
  node_build_worker["Kubernetes Build Worker"]
  node_k8s["Kubernetes"]
  node_registry_manager["Registry Manager"]
end

subgraph group_runtime["Agent Runtime"]
  node_agents["Agent Services"]
  node_translator["Translator Agent<br/>[engine.py]"]
end

node_operator(("User or Operator"))

node_operator -->|"uses"| node_cli
node_operator -->|"requests"| node_api
node_cli -->|"calls API"| node_api
node_api -->|"mounts"| node_routes
node_routes -->|"routes to"| node_handlers
node_handlers -->|"delegates to"| node_services
node_services -->|"uses"| node_repositories
node_repositories -.->|"reads and writes"| node_mongo
node_handlers -->|"queries"| node_search
node_api -->|"initializes"| node_mongo
node_operator -->|"routes query"| node_router_service
node_router_service -->|"coordinates"| node_router_orchestrator
node_router_orchestrator -->|"fetches cards"| node_agent_registry
node_router_orchestrator -->|"selects agent"| node_routing_engine
node_routing_engine -->|"searches"| node_vector_store
node_router_orchestrator -->|"sends request"| node_agent_client
node_agent_client -->|"forwards request"| node_agents
node_operator -.->|"chats with"| node_translator
node_translator -.->|"stores history"| node_chat_history
node_services -.->|"triggers deployment"| node_orchestration_service
node_orchestration_service -->|"adds command"| node_redis_stream
node_redis_stream -->|"dispatches command"| node_build_worker
node_build_worker -.->|"builds and deploys"| node_k8s
node_build_worker -.->|"registers agent"| node_registry_manager
node_api -->|"offers monitoring"| node_observability
node_operator -->|"authenticates"| node_auth

click node_cli "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/cli/main.py"
click node_api "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/main.py"
click node_routes "https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/api/routes"
click node_handlers "https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/api/handlers"
click node_services "https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/service"
click node_repositories "https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/repository"
click node_search "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/service/redis_search_service.py"
click node_auth "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/auth-service-oss/main.py"
click node_router_service "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/main.py"
click node_router_orchestrator "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/services/router_orchestrator.py"
click node_agent_registry "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/core/agent_registry.py"
click node_routing_engine "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/core/routing_engine.py"
click node_vector_store "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/core/vector_store.py"
click node_agent_client "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/core/agent_client.py"
click node_agents "https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/agents"
click node_translator "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agents/translator/src/engine.py"
click node_chat_history "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/chat-history-service/main.py"
click node_orchestration_service "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/service/orchestration_service.py"
click node_build_worker "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/worker/k8s_build_worker.py"
click node_registry_manager "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/orchestrator/registry_manager.py"
click node_observability "https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/service/observability_service.py"

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_cli,node_operator toneBlue
class node_api,node_routes,node_handlers,node_services,node_repositories,node_mongo,node_search,node_auth,node_chat_history,node_observability toneAmber
class node_router_service,node_router_orchestrator,node_agent_registry,node_routing_engine,node_vector_store,node_agent_client toneMint
class node_orchestration_service,node_redis_stream,node_build_worker,node_k8s,node_registry_manager toneRose
class node_agents,node_translator toneIndigo
```

## Components

### Client Interfaces

- [Nasiko CLI](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/cli/main.py): `cli/main.py`

### Platform API

- [FastAPI Backend](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/main.py): `app/main.py`
- [API Routes](https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/api/routes): `app/api/routes`
- [API Handlers](https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/api/handlers): `app/api/handlers`
- [Platform Services](https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/service): `app/service`
- [Repositories](https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/app/repository): `app/repository`
- **MongoDB**
- [Search Index](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/service/redis_search_service.py): `app/service/redis_search_service.py`
- [Auth Service](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/auth-service-oss/main.py): `auth-service-oss/main.py`
- [Chat History Service](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/chat-history-service/main.py): `agent-gateway/chat-history-service/main.py`
- [Observability Services](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/service/observability_service.py): `app/service/observability_service.py`

### Agent Routing

- [Router Service](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/main.py): `agent-gateway/router/src/main.py`
- [Request Orchestrator](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/services/router_orchestrator.py): `agent-gateway/router/src/services/router_orchestrator.py`
- [Agent Registry Client](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/core/agent_registry.py): `agent-gateway/router/src/core/agent_registry.py`
- [Routing Engine](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/core/routing_engine.py): `agent-gateway/router/src/core/routing_engine.py`
- [Agent Vector Store](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/core/vector_store.py): `agent-gateway/router/src/core/vector_store.py`
- [Agent Client](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agent-gateway/router/src/core/agent_client.py): `agent-gateway/router/src/core/agent_client.py`

### Deployment Orchestration

- [Orchestration Service](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/app/service/orchestration_service.py): `app/service/orchestration_service.py`
- **Redis Command Stream**
- [Kubernetes Build Worker](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/worker/k8s_build_worker.py): `worker/k8s_build_worker.py`
- **Kubernetes**
- [Registry Manager](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/orchestrator/registry_manager.py): `orchestrator/registry_manager.py`

### Agent Runtime

- [Agent Services](https://github.com/rakeshvarma007/codesense-doc-string-generator/tree/main/agents): `agents`
- [Translator Agent](https://github.com/rakeshvarma007/codesense-doc-string-generator/blob/main/agents/translator/src/engine.py): `agents/translator/src/engine.py`

### Other components

- **User or Operator**

## Connections

- User or Operator → Nasiko CLI: uses (evidence: `README.md`)
- User or Operator → FastAPI Backend: requests (evidence: `README.md`)
- Nasiko CLI → FastAPI Backend: calls API (evidence: `README.md`)
- FastAPI Backend → API Routes: mounts (evidence: `app/main.py`)
- API Routes → API Handlers: routes to (evidence: `README.md`)
- API Handlers → Platform Services: delegates to (evidence: `app/api/handlers/search_handler.py`)
- Platform Services → Repositories: uses (evidence: `app/main.py`)
- Repositories → MongoDB: reads and writes
- API Handlers → Search Index: queries (evidence: `app/api/handlers/search_handler.py`)
- FastAPI Backend → MongoDB: initializes (evidence: `app/main.py`)
- User or Operator → Router Service: routes query (evidence: `README.md`)
- Router Service → Request Orchestrator: coordinates (evidence: `agent-gateway/router/src/main.py`)
- Request Orchestrator → Agent Registry Client: fetches cards (evidence: `agent-gateway/router/src/services/router_orchestrator.py`)
- Request Orchestrator → Routing Engine: selects agent (evidence: `agent-gateway/router/src/services/router_orchestrator.py`)
- Routing Engine → Agent Vector Store: searches (evidence: `agent-gateway/router/src/core/routing_engine.py`)
- Request Orchestrator → Agent Client: sends request (evidence: `agent-gateway/router/src/services/router_orchestrator.py`)
- Agent Client → Agent Services: forwards request (evidence: `README.md`)
- User or Operator → Translator Agent: chats with
- Translator Agent → Chat History Service: stores history
- Platform Services → Orchestration Service: triggers deployment
- Orchestration Service → Redis Command Stream: adds command (evidence: `app/service/orchestration_service.py`)
- Redis Command Stream → Kubernetes Build Worker: dispatches command (evidence: `worker/k8s_build_worker.py`)
- Kubernetes Build Worker → Kubernetes: builds and deploys
- Kubernetes Build Worker → Registry Manager: registers agent
- FastAPI Backend → Observability Services: offers monitoring (evidence: `README.md`)
- User or Operator → Auth Service: authenticates (evidence: `README.md`)
