# princeverma73/resolvex architecture

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

- Interactive diagram: https://gitdiagram.com/princeverma73/resolvex
- Repository: https://github.com/princeverma73/resolvex

## Overview

ResolveX is an AI customer-support and ticket-automation platform. A customer sends a message through the web client or API; the API invokes the LangGraph orchestrator, which routes the inquiry to policy, order/payment, action, diagnostics, or escalation handling, then returns a response. The documented policy workflow uses retrieval and reranking to ground answers; other major capabilities include WebSocket streaming, session history, caching, guardrails, and domain-service persistence. The README documents capabilities and some integrations; source-index references and excerpts support the cited implementation links, but unsampled modules are not treated as inspected.

Main entry points: [`Backend/agent/nodes.py`](https://github.com/princeverma73/resolvex/blob/main/Backend/agent/nodes.py) (Specialist nodes), [`Backend/agent/graph.py`](https://github.com/princeverma73/resolvex/blob/main/Backend/agent/graph.py) (Graph orchestrator), [`Backend/db/supabase_client.py`](https://github.com/princeverma73/resolvex/blob/main/Backend/db/supabase_client.py) (Supabase database), [`Backend/api/routes.py`](https://github.com/princeverma73/resolvex/blob/main/Backend/api/routes.py) (REST routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer interface"]
  node_web_client["Chat client<br/>[script.js]"]
end

subgraph group_gateway["API gateway"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_http_routes["REST routes<br/>[routes.py]"]
  node_ws_route["WebSocket chat<br/>[websocket.py]"]
  node_cache[("Response cache<br/>[redis_cache.py]")]
end

subgraph group_agents["Agent orchestration"]
  node_orchestrator["Graph orchestrator<br/>[graph.py]"]
  node_intent_router["Intent router<br/>[router.py]"]
  node_agent_nodes["Specialist nodes<br/>[nodes.py]"]
  node_agent_state["Conversation state<br/>[state.py]"]
  node_technical_support["Diagnostics agent"]
  node_guardrails["Input guardrails<br/>[guardrails.py]"]
end

subgraph group_knowledge["Policy knowledge"]
  node_chunking["Policy chunking<br/>[chunking.py]"]
  node_ingestion["Vector ingestion<br/>[ingestion.py]"]
  node_retrieval["Hybrid retrieval<br/>[retrieval.py]"]
  node_reranking["RRF reranking<br/>[reranking.py]"]
  node_generation["Answer generation<br/>[generation.py]"]
  node_qdrant[("Qdrant vectors<br/>[qdrant_client.py]")]
end

subgraph group_domain["Support domain"]
  node_supabase[("Supabase database<br/>[supabase_client.py]")]
  node_order_service["Order service<br/>[order_service.py]"]
  node_payment_service["Payment service<br/>[payment_service.py]"]
  node_customer_service["Customer service"]
  node_ticket_service["Ticket service<br/>[ticket_service.py]"]
  node_chat_service["Chat history<br/>[chat_service.py]"]
  node_domain_schemas["Domain schemas<br/>[common.py]"]
end

node_customer(("Customer"))

node_customer -->|"sends inquiry"| node_web_client
node_web_client -->|"streams chat"| node_ws_route
node_web_client -->|"calls REST"| node_http_routes
node_api_app -->|"registers routes"| node_http_routes
node_api_app -->|"registers route"| node_ws_route
node_http_routes -->|"invokes graph"| node_orchestrator
node_ws_route -->|"invokes graph"| node_orchestrator
node_http_routes -->|"checks cache"| node_cache
node_ws_route -->|"uses cache"| node_cache
node_http_routes -->|"logs messages"| node_chat_service
node_orchestrator -->|"classifies intent"| node_intent_router
node_orchestrator -->|"dispatches work"| node_agent_nodes
node_orchestrator -->|"maintains state"| node_agent_state
node_orchestrator -->|"dispatches diagnostics"| node_technical_support
node_orchestrator -->|"applies checks"| node_guardrails
node_agent_nodes -->|"retrieves policy"| node_retrieval
node_agent_nodes -->|"ranks evidence"| node_reranking
node_agent_nodes -->|"generates answer"| node_generation
node_technical_support -->|"uses knowledge"| node_retrieval
node_technical_support -->|"generates guidance"| node_generation
node_retrieval -.->|"searches vectors"| node_qdrant
node_retrieval -->|"queries embeddings"| node_supabase
node_reranking -->|"ranks candidates"| node_retrieval
node_chunking -->|"provides chunks"| node_ingestion
node_ingestion -->|"persists vectors"| node_supabase
node_agent_nodes -->|"looks up orders"| node_order_service
node_agent_nodes -->|"looks up payments"| node_payment_service
node_agent_nodes -->|"looks up customers"| node_customer_service
node_agent_nodes -->|"creates tickets"| node_ticket_service
node_order_service -.->|"reads and updates"| node_supabase
node_payment_service -.->|"persists records"| node_supabase
node_customer_service -.->|"persists records"| node_supabase
node_ticket_service -.->|"creates and updates"| node_supabase
node_chat_service -.->|"stores history"| node_supabase
node_agent_nodes -->|"validates payloads"| node_domain_schemas

click node_web_client "https://github.com/princeverma73/resolvex/blob/main/frontend/script.js"
click node_api_app "https://github.com/princeverma73/resolvex/blob/main/Backend/main.py"
click node_http_routes "https://github.com/princeverma73/resolvex/blob/main/Backend/api/routes.py"
click node_ws_route "https://github.com/princeverma73/resolvex/blob/main/Backend/api/websocket.py"
click node_cache "https://github.com/princeverma73/resolvex/blob/main/Backend/services/redis_cache.py"
click node_orchestrator "https://github.com/princeverma73/resolvex/blob/main/Backend/agent/graph.py"
click node_intent_router "https://github.com/princeverma73/resolvex/blob/main/Backend/agent/router.py"
click node_agent_nodes "https://github.com/princeverma73/resolvex/blob/main/Backend/agent/nodes.py"
click node_agent_state "https://github.com/princeverma73/resolvex/blob/main/Backend/agent/state.py"
click node_technical_support "https://github.com/princeverma73/resolvex/blob/main/Backend/agent/technical_support.py"
click node_guardrails "https://github.com/princeverma73/resolvex/blob/main/Backend/core/guardrails.py"
click node_chunking "https://github.com/princeverma73/resolvex/blob/main/Backend/rag/chunking.py"
click node_ingestion "https://github.com/princeverma73/resolvex/blob/main/Backend/rag/ingestion.py"
click node_retrieval "https://github.com/princeverma73/resolvex/blob/main/Backend/rag/retrieval.py"
click node_reranking "https://github.com/princeverma73/resolvex/blob/main/Backend/rag/reranking.py"
click node_generation "https://github.com/princeverma73/resolvex/blob/main/Backend/rag/generation.py"
click node_qdrant "https://github.com/princeverma73/resolvex/blob/main/Backend/db/qdrant_client.py"
click node_supabase "https://github.com/princeverma73/resolvex/blob/main/Backend/db/supabase_client.py"
click node_order_service "https://github.com/princeverma73/resolvex/blob/main/Backend/services/order_service.py"
click node_payment_service "https://github.com/princeverma73/resolvex/blob/main/Backend/services/payment_service.py"
click node_customer_service "https://github.com/princeverma73/resolvex/blob/main/Backend/services/customer_service.py"
click node_ticket_service "https://github.com/princeverma73/resolvex/blob/main/Backend/services/ticket_service.py"
click node_chat_service "https://github.com/princeverma73/resolvex/blob/main/Backend/services/chat_service.py"
click node_domain_schemas "https://github.com/princeverma73/resolvex/blob/main/Backend/schemas/common.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_web_client toneBlue
class node_api_app,node_http_routes,node_ws_route,node_cache toneAmber
class node_orchestrator,node_intent_router,node_agent_nodes,node_agent_state,node_technical_support,node_guardrails toneMint
class node_chunking,node_ingestion,node_retrieval,node_reranking,node_generation,node_qdrant toneRose
class node_supabase,node_order_service,node_payment_service,node_customer_service,node_ticket_service,node_chat_service,node_domain_schemas,node_customer toneIndigo
```

## Components

### Customer interface

- [Chat client](https://github.com/princeverma73/resolvex/blob/main/frontend/script.js): `frontend/script.js`

### API gateway

- [FastAPI app](https://github.com/princeverma73/resolvex/blob/main/Backend/main.py): `Backend/main.py`
- [REST routes](https://github.com/princeverma73/resolvex/blob/main/Backend/api/routes.py): `Backend/api/routes.py`
- [WebSocket chat](https://github.com/princeverma73/resolvex/blob/main/Backend/api/websocket.py): `Backend/api/websocket.py`
- [Response cache](https://github.com/princeverma73/resolvex/blob/main/Backend/services/redis_cache.py): `Backend/services/redis_cache.py`

### Agent orchestration

- [Graph orchestrator](https://github.com/princeverma73/resolvex/blob/main/Backend/agent/graph.py): `Backend/agent/graph.py`
- [Intent router](https://github.com/princeverma73/resolvex/blob/main/Backend/agent/router.py): `Backend/agent/router.py`
- [Specialist nodes](https://github.com/princeverma73/resolvex/blob/main/Backend/agent/nodes.py): `Backend/agent/nodes.py`
- [Conversation state](https://github.com/princeverma73/resolvex/blob/main/Backend/agent/state.py): `Backend/agent/state.py`
- [Diagnostics agent](https://github.com/princeverma73/resolvex/blob/main/Backend/agent/technical_support.py): `Backend/agent/technical_support.py`
- [Input guardrails](https://github.com/princeverma73/resolvex/blob/main/Backend/core/guardrails.py): `Backend/core/guardrails.py`

### Policy knowledge

- [Policy chunking](https://github.com/princeverma73/resolvex/blob/main/Backend/rag/chunking.py): `Backend/rag/chunking.py`
- [Vector ingestion](https://github.com/princeverma73/resolvex/blob/main/Backend/rag/ingestion.py): `Backend/rag/ingestion.py`
- [Hybrid retrieval](https://github.com/princeverma73/resolvex/blob/main/Backend/rag/retrieval.py): `Backend/rag/retrieval.py`
- [RRF reranking](https://github.com/princeverma73/resolvex/blob/main/Backend/rag/reranking.py): `Backend/rag/reranking.py`
- [Answer generation](https://github.com/princeverma73/resolvex/blob/main/Backend/rag/generation.py): `Backend/rag/generation.py`
- [Qdrant vectors](https://github.com/princeverma73/resolvex/blob/main/Backend/db/qdrant_client.py): `Backend/db/qdrant_client.py`

### Support domain

- [Supabase database](https://github.com/princeverma73/resolvex/blob/main/Backend/db/supabase_client.py): `Backend/db/supabase_client.py`
- [Order service](https://github.com/princeverma73/resolvex/blob/main/Backend/services/order_service.py): `Backend/services/order_service.py`
- [Payment service](https://github.com/princeverma73/resolvex/blob/main/Backend/services/payment_service.py): `Backend/services/payment_service.py`
- [Customer service](https://github.com/princeverma73/resolvex/blob/main/Backend/services/customer_service.py): `Backend/services/customer_service.py`
- [Ticket service](https://github.com/princeverma73/resolvex/blob/main/Backend/services/ticket_service.py): `Backend/services/ticket_service.py`
- [Chat history](https://github.com/princeverma73/resolvex/blob/main/Backend/services/chat_service.py): `Backend/services/chat_service.py`
- [Domain schemas](https://github.com/princeverma73/resolvex/blob/main/Backend/schemas/common.py): `Backend/schemas/common.py`

### Other components

- **Customer**

## Connections

- Customer → Chat client: sends inquiry
- Chat client → WebSocket chat: streams chat
- Chat client → REST routes: calls REST
- FastAPI app → REST routes: registers routes (evidence: `Backend/main.py`)
- FastAPI app → WebSocket chat: registers route (evidence: `Backend/main.py`)
- REST routes → Graph orchestrator: invokes graph (evidence: `Backend/api/routes.py`)
- WebSocket chat → Graph orchestrator: invokes graph (evidence: `Backend/api/websocket.py`)
- REST routes → Response cache: checks cache (evidence: `Backend/api/routes.py`)
- WebSocket chat → Response cache: uses cache (evidence: `Backend/api/websocket.py`)
- REST routes → Chat history: logs messages (evidence: `Backend/api/routes.py`)
- Graph orchestrator → Intent router: classifies intent (evidence: `Backend/agent/graph.py`)
- Graph orchestrator → Specialist nodes: dispatches work (evidence: `Backend/agent/graph.py`)
- Graph orchestrator → Conversation state: maintains state (evidence: `Backend/agent/graph.py`)
- Graph orchestrator → Diagnostics agent: dispatches diagnostics (evidence: `Backend/agent/graph.py`)
- Graph orchestrator → Input guardrails: applies checks (evidence: `Backend/agent/graph.py`)
- Specialist nodes → Hybrid retrieval: retrieves policy (evidence: `Backend/agent/nodes.py`)
- Specialist nodes → RRF reranking: ranks evidence (evidence: `Backend/agent/nodes.py`)
- Specialist nodes → Answer generation: generates answer (evidence: `Backend/agent/nodes.py`)
- Diagnostics agent → Hybrid retrieval: uses knowledge (evidence: `Backend/agent/technical_support.py`)
- Diagnostics agent → Answer generation: generates guidance (evidence: `Backend/agent/technical_support.py`)
- Hybrid retrieval → Qdrant vectors: searches vectors (evidence: `Backend/rag/retrieval.py`)
- Hybrid retrieval → Supabase database: queries embeddings (evidence: `Backend/rag/retrieval.py`)
- RRF reranking → Hybrid retrieval: ranks candidates (evidence: `Backend/rag/reranking.py`)
- Policy chunking → Vector ingestion: provides chunks (evidence: `Backend/rag/ingest.py`)
- Vector ingestion → Supabase database: persists vectors (evidence: `Backend/rag/ingestion.py`)
- Specialist nodes → Order service: looks up orders (evidence: `Backend/agent/nodes.py`)
- Specialist nodes → Payment service: looks up payments (evidence: `Backend/agent/nodes.py`)
- Specialist nodes → Customer service: looks up customers (evidence: `Backend/agent/nodes.py`)
- Specialist nodes → Ticket service: creates tickets (evidence: `Backend/agent/nodes.py`)
- Order service → Supabase database: reads and updates (evidence: `Backend/services/order_service.py`)
- Payment service → Supabase database: persists records
- Customer service → Supabase database: persists records
- Ticket service → Supabase database: creates and updates (evidence: `Backend/services/ticket_service.py`)
- Chat history → Supabase database: stores history
- Specialist nodes → Domain schemas: validates payloads (evidence: `Backend/agent/nodes.py`)
