# rohan9446/bizspot-ai architecture

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

- Interactive diagram: https://gitdiagram.com/rohan9446/bizspot-ai
- Repository: https://github.com/rohan9446/bizspot-ai

## Overview

BizSpot AI is a business-location advisor. Users choose a business type, pin a target area and radius, then explore ranked candidate locations with demographic, competitor and AI-generated detail, including side-by-side comparison. The React app calls an Express API; the backend scores candidates and enriches area reports with external data. The backend excerpt is partial, so links for unsampled Census and geocoding calls are supported by README claims rather than inspected call sites.

Main entry points: [`frontend/src/App.jsx`](https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/App.jsx) (Advisor dashboard), [`backend/server.js`](https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js) (Express API), [`frontend/src/main.jsx`](https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/main.jsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Advisor dashboard<br/>[App.jsx]"]
  node_map["Map and pin<br/>[App.jsx]"]
  node_reports["Area reports<br/>[App.jsx]"]
  node_react_entry["React entry<br/>[main.jsx]"]
end

subgraph group_api["Advisor API"]
  node_api_routes["Express API<br/>[server.js]"]
  node_type_search["Business type search<br/>[server.js]"]
end

subgraph group_analysis["Location analysis"]
  node_scoring["Candidate scoring<br/>[server.js]"]
  node_area_enrichment["Area data enrichment<br/>[server.js]"]
  node_insights["AI area insights<br/>[server.js]"]
end

subgraph group_integrations["Data and AI integrations"]
  node_places{{"Google Places"}}
  node_census{{"US Census"}}
  node_geocoding{{"Google Geocoding"}}
  node_groq{{"Groq LLM"}}
  node_google_maps{{"Google Maps"}}
end

node_entrepreneur(("Entrepreneur"))

node_entrepreneur -->|"uses"| node_app
node_react_entry -->|"renders"| node_app
node_app -->|"sets location"| node_map
node_app -->|"searches types"| node_type_search
node_app -->|"requests analysis"| node_api_routes
node_app -->|"requests competitors"| node_api_routes
node_app -->|"requests insights"| node_api_routes
node_app -->|"shows results"| node_reports
node_map -->|"renders map"| node_google_maps
node_api_routes -->|"scores candidates"| node_scoring
node_api_routes -.->|"enriches areas"| node_area_enrichment
node_api_routes -->|"builds insights"| node_insights
node_api_routes -->|"fetches places"| node_places
node_area_enrichment -->|"fetches proximity"| node_places
node_area_enrichment -.->|"gets demographics"| node_census
node_area_enrichment -->|"gets area names"| node_geocoding
node_insights -.->|"generates advice"| node_groq

click node_app "https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/App.jsx"
click node_map "https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/App.jsx"
click node_reports "https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/App.jsx"
click node_react_entry "https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/main.jsx"
click node_api_routes "https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js"
click node_type_search "https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js"
click node_scoring "https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js"
click node_area_enrichment "https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js"
click node_insights "https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js"

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_app,node_map,node_reports,node_react_entry toneBlue
class node_api_routes,node_type_search toneAmber
class node_scoring,node_area_enrichment,node_insights toneMint
class node_places,node_census,node_geocoding,node_groq,node_google_maps toneRose
class node_entrepreneur toneIndigo
```

## Components

### User experience

- [Advisor dashboard](https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Map and pin](https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Area reports](https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [React entry](https://github.com/rohan9446/bizspot-ai/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`

### Advisor API

- [Express API](https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js): `backend/server.js`
- [Business type search](https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js): `backend/server.js`

### Location analysis

- [Candidate scoring](https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js): `backend/server.js`
- [Area data enrichment](https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js): `backend/server.js`
- [AI area insights](https://github.com/rohan9446/bizspot-ai/blob/main/backend/server.js): `backend/server.js`

### Data and AI integrations

- **Google Places**
- **US Census**
- **Google Geocoding**
- **Groq LLM**
- **Google Maps**

### Other components

- **Entrepreneur**

## Connections

- Entrepreneur → Advisor dashboard: uses (evidence: `README.md`)
- React entry → Advisor dashboard: renders (evidence: `frontend/src/main.jsx`)
- Advisor dashboard → Map and pin: sets location (evidence: `frontend/src/App.jsx`)
- Advisor dashboard → Business type search: searches types (evidence: `frontend/src/App.jsx`)
- Advisor dashboard → Express API: requests analysis (evidence: `frontend/src/App.jsx`)
- Advisor dashboard → Express API: requests competitors (evidence: `frontend/src/App.jsx`)
- Advisor dashboard → Express API: requests insights (evidence: `frontend/src/App.jsx`)
- Advisor dashboard → Area reports: shows results (evidence: `frontend/src/App.jsx`)
- Map and pin → Google Maps: renders map (evidence: `frontend/src/App.jsx`)
- Express API → Candidate scoring: scores candidates (evidence: `backend/server.js`)
- Express API → Area data enrichment: enriches areas (evidence: `backend/server.js`)
- Express API → AI area insights: builds insights (evidence: `backend/server.js`)
- Express API → Google Places: fetches places (evidence: `backend/server.js`)
- Area data enrichment → Google Places: fetches proximity (evidence: `backend/server.js`)
- Area data enrichment → US Census: gets demographics (evidence: `README.md`)
- Area data enrichment → Google Geocoding: gets area names (evidence: `backend/server.js`)
- AI area insights → Groq LLM: generates advice (evidence: `README.md`)
