# sarweshwargoud/geolytics architecture

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

- Interactive diagram: https://gitdiagram.com/sarweshwargoud/geolytics
- Repository: https://github.com/sarweshwargoud/geolytics

## Overview

This is an SEO and generative-engine-visibility intelligence platform with a React client, FastAPI API, and Supabase-backed application data. A user signs in, selects a project, reviews crawl/SEO, Search Console, and AI-visibility data, then can review agent recommendations and track approved work as experiments. The README also describes automation, reporting, notifications, and persistent memory capabilities. Phase/status descriptions conflict with the substantial service and UI modules in the tree; unsampled implementation links are therefore omitted or shown as unverified. Routes are registered in the API entry point, but route-to-service calls were not sampled.

Main entry points: [`src/App.tsx`](https://github.com/sarweshwargoud/geolytics/blob/main/src/App.tsx) (Application routes), [`backend/app/services/agent/graph.py`](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/agent/graph.py) (Recommendation reasoning), [`backend/app/api/routes`](https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/api/routes) (API route handlers), [`backend/app/services/experiments/service.py`](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/experiments/service.py) (Experiment lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Application routes<br/>[App.tsx]"]
  node_project_context["Project selection<br/>[ProjectContext.tsx]"]
  node_auth_context["Authentication state<br/>[AuthContext.tsx]"]
  node_api_client["Authenticated API client<br/>[useApi.ts]"]
  node_seo_ui["SEO and audit views<br/>[AuditPage.tsx]"]
  node_gsc_ui["Search Console views"]
  node_geo_ui["GEO visibility views"]
  node_recommendation_ui["Recommendation review"]
  node_experiment_ui["Experiment tracking"]
  node_dashboard_ui["Dashboard<br/>[DashboardPage.tsx]"]
end

subgraph group_api["API and access"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_api_routes["API route handlers"]
  node_auth["Request authentication<br/>[auth.py]"]
  node_database[("Structured application data<br/>[database.py]")]
end

subgraph group_intelligence["SEO and GEO intelligence"]
  node_crawler["Site crawling"]
  node_seo_analyzer["SEO analysis"]
  node_gsc_service["Search Console data<br/>[service.py]"]
  node_geo_analysis["GEO visibility analysis"]
end

subgraph group_learning["Recommendations and learning"]
  node_agent_graph["Recommendation reasoning<br/>[graph.py]"]
  node_approval["Human approval feedback"]
  node_memory["Persistent agent memory<br/>[hindsight.py]"]
  node_experiment_service["Experiment lifecycle<br/>[service.py]"]
end

subgraph group_operations["Automation and insights"]
  node_automation["Scheduled job orchestration<br/>[service.py]"]
  node_reports["Reports and notifications<br/>[reports.py]"]
end

node_user(("Project user"))
node_supabase[("Supabase")]
node_google_search["Google Search Console"]
node_ai_providers["AI search providers"]
node_tavily["Tavily research"]
node_hindsight_service["Hindsight memory service"]

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_auth_context
node_app -->|"provides project"| node_project_context
node_app -->|"routes to"| node_dashboard_ui
node_app -->|"routes to"| node_seo_ui
node_app -->|"routes to"| node_gsc_ui
node_app -->|"routes to"| node_geo_ui
node_app -->|"routes to"| node_recommendation_ui
node_app -->|"routes to"| node_experiment_ui
node_api_client -->|"gets session"| node_auth_context
node_project_context -->|"requests projects"| node_api_client
node_experiment_ui -->|"uses API"| node_api_client
node_gsc_ui -->|"uses API"| node_api_client
node_api_app -->|"registers routes"| node_api_routes
node_api_app -.->|"serves API"| node_user
node_api_app -.->|"uses structured data"| node_supabase
node_seo_ui -.->|"fetches audit data"| node_api_client
node_gsc_service -.->|"reads metrics"| node_google_search
node_geo_analysis -.->|"observes citations"| node_ai_providers
node_agent_graph -.->|"collects evidence"| node_gsc_service
node_agent_graph -.->|"collects evidence"| node_geo_analysis
node_agent_graph -.->|"analyzes SEO"| node_seo_analyzer
node_agent_graph -.->|"researches competitors"| node_tavily
node_agent_graph -.->|"recalls lessons"| node_memory
node_agent_graph -.->|"generates proposals"| node_approval
node_approval -->|"records feedback"| node_memory
node_approval -->|"persists decisions"| node_supabase
node_agent_graph -.->|"saves recommendations"| node_supabase
node_experiment_service -->|"stores experiments"| node_supabase
node_experiment_service -.->|"captures baseline"| node_gsc_service
node_experiment_service -.->|"measures visibility"| node_geo_analysis
node_experiment_service -.->|"stores learning"| node_memory
node_memory -.->|"retains memories"| node_hindsight_service
node_automation -->|"logs job state"| node_supabase
node_automation -.->|"dispatches notices"| node_reports
node_api_routes -.->|"dispatches crawl"| node_crawler
node_crawler -.->|"provides crawl findings"| node_seo_analyzer
node_api_routes -.->|"starts analysis"| node_agent_graph
node_api_routes -.->|"manages experiments"| node_experiment_service
node_api_routes -.->|"manages automation"| node_automation

click node_app "https://github.com/sarweshwargoud/geolytics/blob/main/src/App.tsx"
click node_project_context "https://github.com/sarweshwargoud/geolytics/blob/main/src/contexts/ProjectContext.tsx"
click node_auth_context "https://github.com/sarweshwargoud/geolytics/blob/main/src/contexts/AuthContext.tsx"
click node_api_client "https://github.com/sarweshwargoud/geolytics/blob/main/src/hooks/useApi.ts"
click node_seo_ui "https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/AuditPage.tsx"
click node_gsc_ui "https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/SearchConsolePage.tsx"
click node_geo_ui "https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/GeoVisibilityPage.tsx"
click node_recommendation_ui "https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/RecommendationsPage.tsx"
click node_experiment_ui "https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/ExperimentsPage.tsx"
click node_dashboard_ui "https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/DashboardPage.tsx"
click node_api_app "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/main.py"
click node_api_routes "https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/api/routes"
click node_auth "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/core/auth.py"
click node_database "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/core/database.py"
click node_crawler "https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/services/crawler"
click node_seo_analyzer "https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/services/analyzer"
click node_gsc_service "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/gsc/service.py"
click node_geo_analysis "https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/services/geo"
click node_agent_graph "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/agent/graph.py"
click node_approval "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/agent/approval_service.py"
click node_memory "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/agent/hindsight.py"
click node_experiment_service "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/experiments/service.py"
click node_automation "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/automation/service.py"
click node_reports "https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/api/routes/reports.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_app,node_project_context,node_auth_context,node_api_client,node_seo_ui,node_gsc_ui,node_geo_ui,node_recommendation_ui,node_experiment_ui,node_dashboard_ui,node_user toneBlue
class node_api_app,node_api_routes,node_auth,node_database,node_supabase toneAmber
class node_crawler,node_seo_analyzer,node_gsc_service,node_geo_analysis toneMint
class node_agent_graph,node_approval,node_memory,node_experiment_service toneRose
class node_automation,node_reports,node_google_search,node_ai_providers,node_tavily,node_hindsight_service toneIndigo
```

## Components

### Web client

- [Application routes](https://github.com/sarweshwargoud/geolytics/blob/main/src/App.tsx): `src/App.tsx`
- [Project selection](https://github.com/sarweshwargoud/geolytics/blob/main/src/contexts/ProjectContext.tsx): `src/contexts/ProjectContext.tsx`
- [Authentication state](https://github.com/sarweshwargoud/geolytics/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Authenticated API client](https://github.com/sarweshwargoud/geolytics/blob/main/src/hooks/useApi.ts): `src/hooks/useApi.ts`
- [SEO and audit views](https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/AuditPage.tsx): `src/pages/AuditPage.tsx`
- [Search Console views](https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/SearchConsolePage.tsx): `src/pages/SearchConsolePage.tsx`
- [GEO visibility views](https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/GeoVisibilityPage.tsx): `src/pages/GeoVisibilityPage.tsx`
- [Recommendation review](https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/RecommendationsPage.tsx): `src/pages/RecommendationsPage.tsx`
- [Experiment tracking](https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/ExperimentsPage.tsx): `src/pages/ExperimentsPage.tsx`
- [Dashboard](https://github.com/sarweshwargoud/geolytics/blob/main/src/pages/DashboardPage.tsx): `src/pages/DashboardPage.tsx`

### API and access

- [FastAPI application](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/main.py): `backend/app/main.py`
- [API route handlers](https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/api/routes): `backend/app/api/routes`
- [Request authentication](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/core/auth.py): `backend/app/core/auth.py`
- [Structured application data](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/core/database.py): `backend/app/core/database.py`

### SEO and GEO intelligence

- [Site crawling](https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/services/crawler): `backend/app/services/crawler`
- [SEO analysis](https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/services/analyzer): `backend/app/services/analyzer`
- [Search Console data](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/gsc/service.py): `backend/app/services/gsc/service.py`
- [GEO visibility analysis](https://github.com/sarweshwargoud/geolytics/tree/main/backend/app/services/geo): `backend/app/services/geo`

### Recommendations and learning

- [Recommendation reasoning](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/agent/graph.py): `backend/app/services/agent/graph.py`
- [Human approval feedback](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/agent/approval_service.py): `backend/app/services/agent/approval_service.py`
- [Persistent agent memory](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/agent/hindsight.py): `backend/app/services/agent/hindsight.py`
- [Experiment lifecycle](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/experiments/service.py): `backend/app/services/experiments/service.py`

### Automation and insights

- [Scheduled job orchestration](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/services/automation/service.py): `backend/app/services/automation/service.py`
- [Reports and notifications](https://github.com/sarweshwargoud/geolytics/blob/main/backend/app/api/routes/reports.py): `backend/app/api/routes/reports.py`

### Other components

- **Project user**
- **Supabase**
- **Google Search Console**
- **AI search providers**
- **Tavily research**
- **Hindsight memory service**

## Connections

- Project user → Application routes: uses (evidence: `src/App.tsx`)
- Application routes → Authentication state: provides auth (evidence: `src/App.tsx`)
- Application routes → Project selection: provides project (evidence: `src/App.tsx`)
- Application routes → Dashboard: routes to (evidence: `src/App.tsx`)
- Application routes → SEO and audit views: routes to (evidence: `src/App.tsx`)
- Application routes → Search Console views: routes to (evidence: `src/App.tsx`)
- Application routes → GEO visibility views: routes to (evidence: `src/App.tsx`)
- Application routes → Recommendation review: routes to (evidence: `src/App.tsx`)
- Application routes → Experiment tracking: routes to (evidence: `src/App.tsx`)
- Authenticated API client → Authentication state: gets session (evidence: `src/hooks/useApi.ts`)
- Project selection → Authenticated API client: requests projects (evidence: `src/contexts/ProjectContext.tsx`)
- Experiment tracking → Authenticated API client: uses API (evidence: `src/pages/ExperimentsPage.tsx`)
- Search Console views → Authenticated API client: uses API (evidence: `src/pages/SearchConsolePage.tsx`)
- FastAPI application → API route handlers: registers routes (evidence: `backend/app/main.py`)
- FastAPI application → Project user: serves API (evidence: `README.md`)
- FastAPI application → Supabase: uses structured data (evidence: `README.md`)
- SEO and audit views → Authenticated API client: fetches audit data
- Search Console data → Google Search Console: reads metrics (evidence: `README.md`)
- GEO visibility analysis → AI search providers: observes citations (evidence: `README.md`)
- Recommendation reasoning → Search Console data: collects evidence (evidence: `README.md`)
- Recommendation reasoning → GEO visibility analysis: collects evidence (evidence: `README.md`)
- Recommendation reasoning → SEO analysis: analyzes SEO (evidence: `README.md`)
- Recommendation reasoning → Tavily research: researches competitors (evidence: `README.md`)
- Recommendation reasoning → Persistent agent memory: recalls lessons (evidence: `README.md`)
- Recommendation reasoning → Human approval feedback: generates proposals (evidence: `README.md`)
- Human approval feedback → Persistent agent memory: records feedback (evidence: `backend/app/services/agent/approval_service.py`)
- Human approval feedback → Supabase: persists decisions (evidence: `backend/app/services/agent/approval_service.py`)
- Recommendation reasoning → Supabase: saves recommendations (evidence: `README.md`)
- Experiment lifecycle → Supabase: stores experiments (evidence: `backend/app/services/experiments/service.py`)
- Experiment lifecycle → Search Console data: captures baseline (evidence: `README.md`)
- Experiment lifecycle → GEO visibility analysis: measures visibility (evidence: `README.md`)
- Experiment lifecycle → Persistent agent memory: stores learning (evidence: `README.md`)
- Persistent agent memory → Hindsight memory service: retains memories (evidence: `README.md`)
- Scheduled job orchestration → Supabase: logs job state (evidence: `backend/app/services/automation/service.py`)
- Scheduled job orchestration → Reports and notifications: dispatches notices (evidence: `backend/app/services/automation/service.py`)
- API route handlers → Site crawling: dispatches crawl
- Site crawling → SEO analysis: provides crawl findings
- API route handlers → Recommendation reasoning: starts analysis (evidence: `README.md`)
- API route handlers → Experiment lifecycle: manages experiments (evidence: `README.md`)
- API route handlers → Scheduled job orchestration: manages automation
