# billashiva15/devnovatehackathon architecture

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

- Interactive diagram: https://gitdiagram.com/billashiva15/devnovatehackathon
- Repository: https://github.com/billashiva15/devnovatehackathon

## Overview

DealMind AI turns a sales representative’s client message into deal-aware guidance and a generated reply, with client-specific conversation memory. The documented flow combines objection and deal analysis, CRM context, memory recall, strategy, and LLM generation; the agent also saves eligible interactions for later recall. The Streamlit interface calls the FastAPI endpoints for suggestions, client briefs, and memory inspection. Source excerpts show the API and integrations; some agent and data-loader details are partial, so the graph avoids claiming finer-grained internal calls than the evidence supports.

Main entry points: [`backend/agent.py`](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/agent.py) (Agent Pipeline), [`backend/main.py`](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/main.py) (FastAPI Endpoints), [`backend/memory.py`](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/memory.py) (Memory Client), [`frontend/app.py`](https://github.com/billashiva15/devnovatehackathon/blob/main/frontend/app.py) (Streamlit Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_ui["Streamlit Dashboard<br/>[app.py]"]
end

subgraph group_service["Agent Service"]
  node_api["FastAPI Endpoints<br/>[main.py]"]
  node_agent["Agent Pipeline<br/>[agent.py]"]
end

subgraph group_intelligence["Sales Intelligence"]
  node_objection["Objection and Strategy<br/>[agent.py]"]
  node_deal["Deal Analysis<br/>[deal_engine.py]"]
end

subgraph group_integrations["Data and Integrations"]
  node_loader["CRM Data Loader<br/>[data_loader.py]"]
  node_raw[("Raw CRM Data")]
  node_master[("Merged Deal Dataset<br/>[deals_master.csv]")]
  node_memory["Memory Client<br/>[memory.py]"]
  node_config["API Key Configuration<br/>[config.py]"]
end

node_rep(("Sales Representative"))
node_hindsight[("Hindsight Memory API")]
node_llm["Groq LLM"]

node_rep -->|"enters message"| node_ui
node_ui -->|"calls chat"| node_api
node_ui -->|"requests memory"| node_api
node_api -->|"invokes pipeline"| node_agent
node_api -->|"queries memory"| node_memory
node_agent -->|"detects and selects"| node_objection
node_agent -->|"requests deal analysis"| node_deal
node_deal -->|"retrieves CRM records"| node_loader
node_loader -->|"loads CSVs"| node_raw
node_loader -->|"saves merged data"| node_master
node_agent -->|"recalls and saves"| node_memory
node_memory -->|"stores and recalls"| node_hindsight
node_agent -->|"generates reply"| node_llm
node_memory -->|"reads API key"| node_config
node_llm -->|"reads API key"| node_config

click node_ui "https://github.com/billashiva15/devnovatehackathon/blob/main/frontend/app.py"
click node_api "https://github.com/billashiva15/devnovatehackathon/blob/main/backend/main.py"
click node_agent "https://github.com/billashiva15/devnovatehackathon/blob/main/backend/agent.py"
click node_objection "https://github.com/billashiva15/devnovatehackathon/blob/main/backend/agent.py"
click node_deal "https://github.com/billashiva15/devnovatehackathon/blob/main/backend/deal_engine.py"
click node_loader "https://github.com/billashiva15/devnovatehackathon/blob/main/backend/data_loader.py"
click node_raw "https://github.com/billashiva15/devnovatehackathon/tree/main/data/raw_data"
click node_master "https://github.com/billashiva15/devnovatehackathon/blob/main/data/processed/deals_master.csv"
click node_memory "https://github.com/billashiva15/devnovatehackathon/blob/main/backend/memory.py"
click node_config "https://github.com/billashiva15/devnovatehackathon/blob/main/backend/config.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_ui toneBlue
class node_api,node_agent,node_hindsight toneAmber
class node_objection,node_deal toneMint
class node_loader,node_raw,node_master,node_memory,node_config toneRose
class node_rep,node_llm toneIndigo
```

## Components

### User Experience

- [Streamlit Dashboard](https://github.com/billashiva15/devnovatehackathon/blob/main/frontend/app.py): `frontend/app.py`

### Agent Service

- [FastAPI Endpoints](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/main.py): `backend/main.py`
- [Agent Pipeline](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/agent.py): `backend/agent.py`

### Sales Intelligence

- [Objection and Strategy](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/agent.py): `backend/agent.py`
- [Deal Analysis](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/deal_engine.py): `backend/deal_engine.py`

### Data and Integrations

- [CRM Data Loader](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/data_loader.py): `backend/data_loader.py`
- [Raw CRM Data](https://github.com/billashiva15/devnovatehackathon/tree/main/data/raw_data): `data/raw_data`
- [Merged Deal Dataset](https://github.com/billashiva15/devnovatehackathon/blob/main/data/processed/deals_master.csv): `data/processed/deals_master.csv`
- [Memory Client](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/memory.py): `backend/memory.py`
- [API Key Configuration](https://github.com/billashiva15/devnovatehackathon/blob/main/backend/config.py): `backend/config.py`

### Other components

- **Sales Representative**
- **Hindsight Memory API**
- **Groq LLM**

## Connections

- Sales Representative → Streamlit Dashboard: enters message (evidence: `frontend/app.py`)
- Streamlit Dashboard → FastAPI Endpoints: calls chat (evidence: `frontend/app.py`)
- Streamlit Dashboard → FastAPI Endpoints: requests memory (evidence: `frontend/app.py`)
- FastAPI Endpoints → Agent Pipeline: invokes pipeline (evidence: `backend/main.py`)
- FastAPI Endpoints → Memory Client: queries memory (evidence: `backend/main.py`)
- Agent Pipeline → Objection and Strategy: detects and selects (evidence: `README.md`)
- Agent Pipeline → Deal Analysis: requests deal analysis (evidence: `backend/agent.py`)
- Deal Analysis → CRM Data Loader: retrieves CRM records (evidence: `backend/deal_engine.py`)
- CRM Data Loader → Raw CRM Data: loads CSVs (evidence: `backend/data_loader.py`)
- CRM Data Loader → Merged Deal Dataset: saves merged data (evidence: `backend/data_loader.py`)
- Agent Pipeline → Memory Client: recalls and saves (evidence: `backend/agent.py`)
- Memory Client → Hindsight Memory API: stores and recalls (evidence: `backend/memory.py`)
- Agent Pipeline → Groq LLM: generates reply (evidence: `backend/agent.py`)
- Memory Client → API Key Configuration: reads API key (evidence: `backend/memory.py`)
- Groq LLM → API Key Configuration: reads API key
