# rahul8879/coding_ninja_genai architecture

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

- Interactive diagram: https://gitdiagram.com/rahul8879/coding_ninja_genai
- Repository: https://github.com/rahul8879/coding_ninja_genai

## Overview

This repository is a collection of independent generative-AI learning examples and applications, not one product with a shared runtime. The clearest end-to-end workflows are HealthLink conversation handling, Inventra’s agent-backed chat, Hireflow resume ingestion, and several standalone RAG or classification services. The graph preserves the sampled application paths and the major core modules identified by the source index; many projects are unsampled, so their internal connections are intentionally omitted.

Main entry points: [`Projects/hireflow/ingestion/pipeline.py`](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/pipeline.py) (Ingestion pipeline), [`06_deployment/session-07/Demo-2/app/api/routes.py`](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/api/routes.py) (Employee policy API), [`Projects/healthlink-live/backend/app/agent/graph.py`](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/agent/graph.py) (Conversation agent), [`Projects/healthlink-live/backend/app/routes/conversation_routes.py`](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/routes/conversation_routes.py) (Conversation routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_healthlink["HealthLink care"]
  node_conversation_api["Conversation routes"]
  node_conversation_service["Conversation service"]
  node_health_agent["Conversation agent<br/>[graph.py]"]
  node_health_llm["LLM client<br/>[llm_client.py]"]
  node_health_tools["Tool executor<br/>[executor.py]"]
  node_scheduling["Scheduling<br/>[scheduling.py]"]
  node_health_db[("Database<br/>[database.py]")]
end

subgraph group_inventra["Inventra assistant"]
  node_inventra_ui["Chat interface<br/>[App.jsx]"]
  node_inventra_api["Chat API<br/>[routes.py]"]
  node_inventra_workflow["Agent workflow<br/>[workflow.py]"]
  node_inventra_state["Workflow state<br/>[state.py]"]
end

subgraph group_hireflow["Hireflow resumes"]
  node_hire_upload["Upload route<br/>[upload.py]"]
  node_hire_pipeline["Ingestion pipeline<br/>[pipeline.py]"]
  node_hire_loader["Resume loader<br/>[loader.py]"]
  node_hire_chunker["Chunking<br/>[chunker.py]"]
  node_hire_metadata["Candidate metadata<br/>[metadata.py]"]
  node_hire_embedder["Embedder<br/>[embedder.py]"]
  node_hire_vector[("Vector store<br/>[vector_store.py]")]
  node_hire_dedup["Deduplication<br/>[dedup.py]"]
end

subgraph group_deployed["Deployed AI demos"]
  node_policy_api["Policy chat API<br/>[main.py]"]
  node_policy_rag["Policy RAG<br/>[rag.py]"]
  node_policy_config["RAG configuration<br/>[config.py]"]
  node_policy_prompts["Prompt templates<br/>[prompts.py]"]
  node_modular_api["Employee policy API<br/>[routes.py]"]
  node_modular_retrieval["Document retrieval<br/>[service.py]"]
  node_modular_prompt["Prompt builder<br/>[builder.py]"]
  node_modular_llm["LLM service<br/>[service.py]"]
  node_modular_schema["Chat schemas<br/>[schemas.py]"]
  node_modular_logging["Request logging<br/>[logger.py]"]
  node_scam_api["Scam Guard API<br/>[main.py]"]
end

subgraph group_agents["Agent and prompt examples"]
end

node_patient(("User"))
node_inventra_user(("User"))
node_hire_user(("Resume submitter"))
node_policy_user(("Questioner"))

node_patient -->|"sends messages"| node_conversation_api
node_conversation_api -->|"loads and saves turns"| node_conversation_service
node_conversation_api -->|"invokes agent"| node_health_agent
node_health_agent -->|"uses model client"| node_health_llm
node_health_agent -->|"executes tools"| node_health_tools
node_health_agent -->|"uses scheduling"| node_scheduling
node_conversation_service -.->|"persists turns"| node_health_db
node_inventra_user -->|"asks question"| node_inventra_ui
node_inventra_ui -.->|"sends chat"| node_inventra_api
node_inventra_api -->|"invokes workflow"| node_inventra_workflow
node_inventra_workflow -.->|"uses state"| node_inventra_state
node_hire_user -.->|"uploads resume"| node_hire_upload
node_hire_upload -.->|"starts ingestion"| node_hire_pipeline
node_hire_pipeline -->|"loads resume"| node_hire_loader
node_hire_pipeline -->|"chunks text"| node_hire_chunker
node_hire_pipeline -->|"builds candidate ID"| node_hire_metadata
node_hire_pipeline -->|"embeds chunks"| node_hire_embedder
node_hire_pipeline -->|"upserts vectors"| node_hire_vector
node_hire_pipeline -->|"deduplicates"| node_hire_dedup
node_policy_user -->|"asks question"| node_policy_api
node_policy_api -->|"retrieves or answers"| node_policy_rag
node_policy_rag -->|"loads settings"| node_policy_config
node_policy_rag -->|"uses prompts"| node_policy_prompts
node_modular_api -->|"retrieves documents"| node_modular_retrieval
node_modular_api -->|"builds prompt"| node_modular_prompt
node_modular_api -->|"generates answer"| node_modular_llm
node_modular_api -->|"validates response"| node_modular_schema
node_modular_api -->|"logs request"| node_modular_logging
node_scam_api -->|"mounts batch router"| node_scam_api

click node_conversation_api "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/routes/conversation_routes.py"
click node_conversation_service "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/services/conversation_service.py"
click node_health_agent "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/agent/graph.py"
click node_health_llm "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/agent/llm_client.py"
click node_health_tools "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/tools/executor.py"
click node_scheduling "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/services/scheduling.py"
click node_health_db "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/db/database.py"
click node_inventra_ui "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/inventra/frontend/src/App.jsx"
click node_inventra_api "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/inventra/app/api/routes.py"
click node_inventra_workflow "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/inventra/app/graph/workflow.py"
click node_inventra_state "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/inventra/app/graph/state.py"
click node_hire_upload "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/api/routes/upload.py"
click node_hire_pipeline "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/pipeline.py"
click node_hire_loader "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/loader.py"
click node_hire_chunker "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/chunker.py"
click node_hire_metadata "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/metadata.py"
click node_hire_embedder "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/embedder.py"
click node_hire_vector "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/vector_store.py"
click node_hire_dedup "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/dedup.py"
click node_policy_api "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-01/app/main.py"
click node_policy_rag "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-01/app/rag.py"
click node_policy_config "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-01/app/config.py"
click node_policy_prompts "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-01/app/prompts.py"
click node_modular_api "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/api/routes.py"
click node_modular_retrieval "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/retrieval/service.py"
click node_modular_prompt "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/prompts/builder.py"
click node_modular_llm "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/llm/service.py"
click node_modular_schema "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/models/schemas.py"
click node_modular_logging "https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/observability/logger.py"
click node_scam_api "https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/scam_guard/main.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_conversation_api,node_conversation_service,node_health_agent,node_health_llm,node_health_tools,node_scheduling,node_health_db,node_patient,node_inventra_user toneBlue
class node_inventra_ui,node_inventra_api,node_inventra_workflow,node_inventra_state toneAmber
class node_hire_upload,node_hire_pipeline,node_hire_loader,node_hire_chunker,node_hire_metadata,node_hire_embedder,node_hire_vector,node_hire_dedup toneMint
class node_policy_api,node_policy_rag,node_policy_config,node_policy_prompts,node_modular_api,node_modular_retrieval,node_modular_prompt,node_modular_llm,node_modular_schema,node_modular_logging,node_scam_api toneRose
class node_hire_user,node_policy_user toneIndigo
```

## Components

### HealthLink care

- [Conversation routes](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/routes/conversation_routes.py): `Projects/healthlink-live/backend/app/routes/conversation_routes.py`
- [Conversation service](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/services/conversation_service.py): `Projects/healthlink-live/backend/app/services/conversation_service.py`
- [Conversation agent](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/agent/graph.py): `Projects/healthlink-live/backend/app/agent/graph.py`
- [LLM client](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/agent/llm_client.py): `Projects/healthlink-live/backend/app/agent/llm_client.py`
- [Tool executor](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/tools/executor.py): `Projects/healthlink-live/backend/app/tools/executor.py`
- [Scheduling](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/services/scheduling.py): `Projects/healthlink-live/backend/app/services/scheduling.py`
- [Database](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/healthlink-live/backend/app/db/database.py): `Projects/healthlink-live/backend/app/db/database.py`

### Inventra assistant

- [Chat interface](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/inventra/frontend/src/App.jsx): `Projects/inventra/frontend/src/App.jsx`
- [Chat API](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/inventra/app/api/routes.py): `Projects/inventra/app/api/routes.py`
- [Agent workflow](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/inventra/app/graph/workflow.py): `Projects/inventra/app/graph/workflow.py`
- [Workflow state](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/inventra/app/graph/state.py): `Projects/inventra/app/graph/state.py`

### Hireflow resumes

- [Upload route](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/api/routes/upload.py): `Projects/hireflow/api/routes/upload.py`
- [Ingestion pipeline](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/pipeline.py): `Projects/hireflow/ingestion/pipeline.py`
- [Resume loader](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/loader.py): `Projects/hireflow/ingestion/loader.py`
- [Chunking](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/chunker.py): `Projects/hireflow/ingestion/chunker.py`
- [Candidate metadata](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/metadata.py): `Projects/hireflow/ingestion/metadata.py`
- [Embedder](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/embedder.py): `Projects/hireflow/ingestion/embedder.py`
- [Vector store](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/vector_store.py): `Projects/hireflow/ingestion/vector_store.py`
- [Deduplication](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/hireflow/ingestion/dedup.py): `Projects/hireflow/ingestion/dedup.py`

### Deployed AI demos

- [Policy chat API](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-01/app/main.py): `06_deployment/session-01/app/main.py`
- [Policy RAG](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-01/app/rag.py): `06_deployment/session-01/app/rag.py`
- [RAG configuration](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-01/app/config.py): `06_deployment/session-01/app/config.py`
- [Prompt templates](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-01/app/prompts.py): `06_deployment/session-01/app/prompts.py`
- [Employee policy API](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/api/routes.py): `06_deployment/session-07/Demo-2/app/api/routes.py`
- [Document retrieval](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/retrieval/service.py): `06_deployment/session-07/Demo-2/app/retrieval/service.py`
- [Prompt builder](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/prompts/builder.py): `06_deployment/session-07/Demo-2/app/prompts/builder.py`
- [LLM service](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/llm/service.py): `06_deployment/session-07/Demo-2/app/llm/service.py`
- [Chat schemas](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/models/schemas.py): `06_deployment/session-07/Demo-2/app/models/schemas.py`
- [Request logging](https://github.com/rahul8879/coding_ninja_genai/blob/master/06_deployment/session-07/Demo-2/app/observability/logger.py): `06_deployment/session-07/Demo-2/app/observability/logger.py`
- [Scam Guard API](https://github.com/rahul8879/coding_ninja_genai/blob/master/Projects/scam_guard/main.py): `Projects/scam_guard/main.py`

### Other components

- **User**
- **User**
- **Resume submitter**
- **Questioner**

## Connections

- User → Conversation routes: sends messages (evidence: `Projects/healthlink-live/backend/app/routes/conversation_routes.py`)
- Conversation routes → Conversation service: loads and saves turns (evidence: `Projects/healthlink-live/backend/app/routes/conversation_routes.py`)
- Conversation routes → Conversation agent: invokes agent (evidence: `Projects/healthlink-live/backend/app/routes/conversation_routes.py`)
- Conversation agent → LLM client: uses model client (evidence: `Projects/healthlink-live/backend/app/agent/graph.py`)
- Conversation agent → Tool executor: executes tools (evidence: `Projects/healthlink-live/backend/app/agent/graph.py`)
- Conversation agent → Scheduling: uses scheduling (evidence: `Projects/healthlink-live/backend/app/agent/graph.py`)
- Conversation service → Database: persists turns
- User → Chat interface: asks question (evidence: `Projects/inventra/frontend/src/App.jsx`)
- Chat interface → Chat API: sends chat
- Chat API → Agent workflow: invokes workflow (evidence: `Projects/inventra/app/api/routes.py`)
- Agent workflow → Workflow state: uses state
- Resume submitter → Upload route: uploads resume
- Upload route → Ingestion pipeline: starts ingestion
- Ingestion pipeline → Resume loader: loads resume (evidence: `Projects/hireflow/ingestion/pipeline.py`)
- Ingestion pipeline → Chunking: chunks text (evidence: `Projects/hireflow/ingestion/pipeline.py`)
- Ingestion pipeline → Candidate metadata: builds candidate ID (evidence: `Projects/hireflow/ingestion/pipeline.py`)
- Ingestion pipeline → Embedder: embeds chunks (evidence: `Projects/hireflow/ingestion/pipeline.py`)
- Ingestion pipeline → Vector store: upserts vectors (evidence: `Projects/hireflow/ingestion/pipeline.py`)
- Ingestion pipeline → Deduplication: deduplicates (evidence: `Projects/hireflow/ingestion/pipeline.py`)
- Questioner → Policy chat API: asks question (evidence: `06_deployment/session-01/app/main.py`)
- Policy chat API → Policy RAG: retrieves or answers (evidence: `06_deployment/session-01/app/main.py`)
- Policy RAG → RAG configuration: loads settings (evidence: `06_deployment/session-01/app/rag.py`)
- Policy RAG → Prompt templates: uses prompts (evidence: `06_deployment/session-01/app/rag.py`)
- Employee policy API → Document retrieval: retrieves documents (evidence: `06_deployment/session-07/Demo-2/app/api/routes.py`)
- Employee policy API → Prompt builder: builds prompt (evidence: `06_deployment/session-07/Demo-2/app/api/routes.py`)
- Employee policy API → LLM service: generates answer (evidence: `06_deployment/session-07/Demo-2/app/api/routes.py`)
- Employee policy API → Chat schemas: validates response (evidence: `06_deployment/session-07/Demo-2/app/api/routes.py`)
- Employee policy API → Request logging: logs request (evidence: `06_deployment/session-07/Demo-2/app/api/routes.py`)
- Scam Guard API → Scam Guard API: mounts batch router (evidence: `Projects/scam_guard/main.py`)
