# anushkapunekar/bizgenie architecture

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

- Interactive diagram: https://gitdiagram.com/anushkapunekar/bizgenie
- Repository: https://github.com/anushkapunekar/bizgenie

## Overview

BizGenie is a small-business support agent with business-profile and document management, customer chat, appointment scheduling, and outbound messaging. The principal customer flow is chat through the frontend API to the LangGraph agent, which routes questions to FAQ or document retrieval and can dispatch tool actions before returning a reply. Businesses can register and upload PDFs; the upload route records the document and indexes its content for later retrieval. The graph reflects README-described branches where implementation was not sampled; exact wiring for those branches is therefore limited.

Main entry points: [`app/routes/business.py`](https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/business.py) (Business management), [`app/main.py`](https://github.com/anushkapunekar/bizgenie/blob/main/app/main.py) (FastAPI app), [`app/agents/graph.py`](https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/graph.py) (Intent routing), [`app/agents/nodes/tools_executor.py`](https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/nodes/tools_executor.py) (Tool execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web experience"]
  node_web_app["Web application<br/>[App.tsx]"]
  node_business_pages["Business pages"]
  node_chat_page["Chat page<br/>[Chat.tsx]"]
  node_upload_ui["Document upload<br/>[DocumentUpload.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and business data"]
  node_fastapi["FastAPI app<br/>[main.py]"]
  node_business_routes["Business management<br/>[business.py]"]
  node_chat_routes["Chat endpoint<br/>[chat.py]"]
  node_appointment_routes["Appointments API<br/>[appointments.py]"]
  node_business_data["Business records<br/>[models.py]"]
  node_relational_db[("Relational database<br/>[database.py]")]
  node_document_files[("Document files<br/>[business.py]")]
end

subgraph group_agent["Chat and knowledge"]
  node_agent_graph["Intent routing<br/>[graph.py]"]
  node_faq_node["FAQ answers<br/>[faq.py]"]
  node_rag_node["Document answers<br/>[rag.py]"]
  node_ingestion["PDF ingestion<br/>[ingest.py]"]
  node_vector_store[("Vector index<br/>[vectorstore.py]")]
  node_tool_executor["Tool execution<br/>[tools_executor.py]"]
  node_llm["Language model service<br/>[llm_service.py]"]
end

subgraph group_integrations["Scheduling and messaging"]
  node_calendar_tool["Calendar tool<br/>[calendar_mcp.py]"]
  node_email_tool["Email tool<br/>[email_mcp.py]"]
  node_whatsapp_tool["WhatsApp tool<br/>[whatsapp_mcp.py]"]
end

node_business_owner(("Business owner"))
node_customer(("Customer"))
node_external_calendar(("Calendar service"))
node_smtp(("SMTP service"))
node_whatsapp_service(("WhatsApp service"))
node_supabase(("Supabase storage"))

node_business_owner -->|"uses"| node_web_app
node_customer -->|"opens chat"| node_web_app
node_web_app -->|"shows routes"| node_business_pages
node_web_app -->|"shows route"| node_chat_page
node_business_pages -->|"requests data"| node_api_client
node_upload_ui -->|"uploads PDF"| node_api_client
node_chat_page -->|"sends message"| node_api_client
node_api_client -->|"calls API"| node_fastapi
node_fastapi -->|"dispatches"| node_business_routes
node_fastapi -->|"dispatches"| node_chat_routes
node_fastapi -->|"dispatches"| node_appointment_routes
node_business_routes -->|"reads/writes"| node_business_data
node_business_routes -->|"uses sessions"| node_relational_db
node_business_routes -->|"stores files"| node_document_files
node_business_routes -->|"indexes document"| node_vector_store
node_business_routes -->|"notifies by email"| node_email_tool
node_business_routes -->|"notifies by WhatsApp"| node_whatsapp_tool
node_chat_routes -->|"runs agent"| node_agent_graph
node_agent_graph -->|"routes FAQ"| node_faq_node
node_agent_graph -->|"routes retrieval"| node_rag_node
node_agent_graph -->|"dispatches tools"| node_tool_executor
node_rag_node -->|"queries"| node_vector_store
node_ingestion -->|"adds chunks"| node_vector_store
node_appointment_routes -->|"uses sessions"| node_relational_db
node_tool_executor -->|"invokes"| node_calendar_tool
node_tool_executor -->|"invokes"| node_email_tool
node_tool_executor -->|"invokes"| node_whatsapp_tool
node_calendar_tool -.->|"connects"| node_external_calendar
node_email_tool -->|"sends mail"| node_smtp
node_whatsapp_tool -.->|"sends message"| node_whatsapp_service
node_business_routes -.->|"optional storage"| node_supabase

click node_web_app "https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/App.tsx"
click node_business_pages "https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/pages/BusinessDashboard.tsx"
click node_chat_page "https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/pages/Chat.tsx"
click node_upload_ui "https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/components/DocumentUpload.tsx"
click node_api_client "https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/services/api.ts"
click node_fastapi "https://github.com/anushkapunekar/bizgenie/blob/main/app/main.py"
click node_business_routes "https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/business.py"
click node_chat_routes "https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/chat.py"
click node_appointment_routes "https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/appointments.py"
click node_business_data "https://github.com/anushkapunekar/bizgenie/blob/main/app/models.py"
click node_relational_db "https://github.com/anushkapunekar/bizgenie/blob/main/app/database.py"
click node_document_files "https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/business.py"
click node_agent_graph "https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/graph.py"
click node_faq_node "https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/nodes/faq.py"
click node_rag_node "https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/nodes/rag.py"
click node_ingestion "https://github.com/anushkapunekar/bizgenie/blob/main/app/rag/ingest.py"
click node_vector_store "https://github.com/anushkapunekar/bizgenie/blob/main/app/rag/vectorstore.py"
click node_tool_executor "https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/nodes/tools_executor.py"
click node_llm "https://github.com/anushkapunekar/bizgenie/blob/main/app/llm_service.py"
click node_calendar_tool "https://github.com/anushkapunekar/bizgenie/blob/main/app/tools/calendar_mcp.py"
click node_email_tool "https://github.com/anushkapunekar/bizgenie/blob/main/app/tools/email_mcp.py"
click node_whatsapp_tool "https://github.com/anushkapunekar/bizgenie/blob/main/app/tools/whatsapp_mcp.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_app,node_business_pages,node_chat_page,node_upload_ui,node_api_client toneBlue
class node_fastapi,node_business_routes,node_chat_routes,node_appointment_routes,node_business_data,node_relational_db,node_document_files,node_supabase toneAmber
class node_agent_graph,node_faq_node,node_rag_node,node_ingestion,node_vector_store,node_tool_executor,node_llm toneMint
class node_calendar_tool,node_email_tool,node_whatsapp_tool toneRose
class node_business_owner,node_customer,node_external_calendar,node_smtp,node_whatsapp_service toneIndigo
```

## Components

### Web experience

- [Web application](https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Business pages](https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/pages/BusinessDashboard.tsx): `frontend/src/pages/BusinessDashboard.tsx`
- [Chat page](https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/pages/Chat.tsx): `frontend/src/pages/Chat.tsx`
- [Document upload](https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/components/DocumentUpload.tsx): `frontend/src/components/DocumentUpload.tsx`
- [API client](https://github.com/anushkapunekar/bizgenie/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### API and business data

- [FastAPI app](https://github.com/anushkapunekar/bizgenie/blob/main/app/main.py): `app/main.py`
- [Business management](https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/business.py): `app/routes/business.py`
- [Chat endpoint](https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/chat.py): `app/routes/chat.py`
- [Appointments API](https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/appointments.py): `app/routes/appointments.py`
- [Business records](https://github.com/anushkapunekar/bizgenie/blob/main/app/models.py): `app/models.py`
- [Relational database](https://github.com/anushkapunekar/bizgenie/blob/main/app/database.py): `app/database.py`
- [Document files](https://github.com/anushkapunekar/bizgenie/blob/main/app/routes/business.py): `app/routes/business.py`

### Chat and knowledge

- [Intent routing](https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/graph.py): `app/agents/graph.py`
- [FAQ answers](https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/nodes/faq.py): `app/agents/nodes/faq.py`
- [Document answers](https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/nodes/rag.py): `app/agents/nodes/rag.py`
- [PDF ingestion](https://github.com/anushkapunekar/bizgenie/blob/main/app/rag/ingest.py): `app/rag/ingest.py`
- [Vector index](https://github.com/anushkapunekar/bizgenie/blob/main/app/rag/vectorstore.py): `app/rag/vectorstore.py`
- [Tool execution](https://github.com/anushkapunekar/bizgenie/blob/main/app/agents/nodes/tools_executor.py): `app/agents/nodes/tools_executor.py`
- [Language model service](https://github.com/anushkapunekar/bizgenie/blob/main/app/llm_service.py): `app/llm_service.py`

### Scheduling and messaging

- [Calendar tool](https://github.com/anushkapunekar/bizgenie/blob/main/app/tools/calendar_mcp.py): `app/tools/calendar_mcp.py`
- [Email tool](https://github.com/anushkapunekar/bizgenie/blob/main/app/tools/email_mcp.py): `app/tools/email_mcp.py`
- [WhatsApp tool](https://github.com/anushkapunekar/bizgenie/blob/main/app/tools/whatsapp_mcp.py): `app/tools/whatsapp_mcp.py`

### Other components

- **Business owner**
- **Customer**
- **Calendar service**
- **SMTP service**
- **WhatsApp service**
- **Supabase storage**

## Connections

- Business owner → Web application: uses
- Customer → Web application: opens chat
- Web application → Business pages: shows routes
- Web application → Chat page: shows route
- Business pages → API client: requests data
- Document upload → API client: uploads PDF
- Chat page → API client: sends message
- API client → FastAPI app: calls API
- FastAPI app → Business management: dispatches
- FastAPI app → Chat endpoint: dispatches
- FastAPI app → Appointments API: dispatches
- Business management → Business records: reads/writes
- Business management → Relational database: uses sessions
- Business management → Document files: stores files
- Business management → Vector index: indexes document
- Business management → Email tool: notifies by email
- Business management → WhatsApp tool: notifies by WhatsApp
- Chat endpoint → Intent routing: runs agent
- Intent routing → FAQ answers: routes FAQ
- Intent routing → Document answers: routes retrieval
- Intent routing → Tool execution: dispatches tools
- Document answers → Vector index: queries
- PDF ingestion → Vector index: adds chunks
- Appointments API → Relational database: uses sessions
- Tool execution → Calendar tool: invokes
- Tool execution → Email tool: invokes
- Tool execution → WhatsApp tool: invokes
- Calendar tool → Calendar service: connects
- Email tool → SMTP service: sends mail
- WhatsApp tool → WhatsApp service: sends message
- Business management → Supabase storage: optional storage
