# saikrishna762/lekka-analytics-website architecture

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

- Interactive diagram: https://gitdiagram.com/saikrishna762/lekka-analytics-website
- Repository: https://github.com/saikrishna762/lekka-analytics-website

## Overview

Lekka Analytics is a services and solutions website with a floating AI assistant and enquiry capture. Visitors explore service, solution, and project content, then contact the business or use the assistant; the frontend sends chat and enquiry requests to a Cloudflare Worker, which connects to Gemini and Supabase as documented. The graph preserves the major marketing capabilities and the principal request flow. Some backend wiring and unsampled page implementations are documented in the README rather than inspected in source.

Main entry points: [`src/app/solutions/page.tsx`](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/solutions/page.tsx) (Solutions page), [`src/app/services/page.tsx`](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/services/page.tsx) (Services page), [`worker/src/index.ts`](https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/index.ts) (Worker API), [`src/app/page.tsx`](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/page.tsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website experience"]
  node_home["Home page<br/>[page.tsx]"]
  node_servicespage["Services page<br/>[page.tsx]"]
  node_solutionspage["Solutions page<br/>[page.tsx]"]
  node_projectspage["Projects page<br/>[page.tsx]"]
  node_contact["Contact experience<br/>[page.tsx]"]
  node_assistant["AI assistant<br/>[LekkaAssistant.tsx]"]
  node_contactform["Contact form<br/>[ContactForm.tsx]"]
end

subgraph group_content["Offer and demonstrations"]
  node_servicecatalog["Service catalog<br/>[services.ts]"]
  node_servicesgrid["Service browser<br/>[ServicesGrid.tsx]"]
  node_solutionsdata["Solution content<br/>[solutions.ts]"]
  node_solutionmatrix["Solution matrix"]
  node_excel_demo["Excel insights demo"]
  node_architecture["Architecture diagram"]
  node_blueprints["Project blueprints"]
  node_reportcalc["Reporting calculator"]
end

subgraph group_frontend["Frontend services"]
  node_ui["UI primitives"]
  node_pageheader["Page header<br/>[PageHeader.tsx]"]
  node_navigation["Navigation data<br/>[navigation.ts]"]
  node_seo["SEO metadata<br/>[seo.ts]"]
  node_apiclient["API client<br/>[api.ts]"]
  node_validation["Payload validation<br/>[validation.ts]"]
end

subgraph group_backend["Worker backend"]
  node_worker["Worker API<br/>[index.ts]"]
  node_cors["CORS handling<br/>[cors.ts]"]
  node_worker_validation["Request validation<br/>[validate.ts]"]
  node_gemini["Gemini integration<br/>[gemini.ts]"]
  node_email["Enquiry email<br/>[email.ts]"]
  node_supabase[("Enquiry database<br/>[supabase.ts]")]
end

node_visitor(("Visitor"))
node_geminiservice{{"Google Gemini API"}}
node_supabaseservice[("Supabase PostgreSQL")]

node_visitor -->|"browses"| node_home
node_visitor -->|"browses"| node_servicespage
node_visitor -->|"browses"| node_solutionspage
node_visitor -->|"browses"| node_projectspage
node_visitor -->|"opens"| node_contact
node_home -->|"links to"| node_servicespage
node_home -->|"links to"| node_contact
node_servicespage -->|"renders"| node_servicesgrid
node_servicespage -->|"renders"| node_reportcalc
node_servicesgrid -->|"filters"| node_servicecatalog
node_solutionspage -->|"renders"| node_solutionmatrix
node_solutionspage -->|"renders"| node_excel_demo
node_solutionspage -->|"renders"| node_architecture
node_solutionspage -->|"reads"| node_solutionsdata
node_projectspage -->|"renders"| node_blueprints
node_assistant -->|"sends requests"| node_apiclient
node_contactform -.->|"submits enquiry"| node_apiclient
node_apiclient -->|"uses types"| node_validation
node_apiclient -->|"posts chat and enquiries"| node_worker
node_worker -.->|"checks origins"| node_cors
node_worker -.->|"validates payloads"| node_worker_validation
node_worker -.->|"dispatches chat"| node_gemini
node_worker -.->|"handles enquiries"| node_email
node_worker -.->|"stores enquiries"| node_supabase
node_gemini -.->|"calls"| node_geminiservice
node_supabase -.->|"writes records"| node_supabaseservice
node_servicespage -->|"builds metadata"| node_seo
node_solutionspage -->|"builds metadata"| node_seo
node_projectspage -->|"builds metadata"| node_seo
node_servicespage -->|"renders"| node_pageheader
node_solutionspage -->|"renders"| node_pageheader
node_projectspage -->|"renders"| node_pageheader
node_home -->|"uses"| node_ui
node_servicespage -->|"uses"| node_ui
node_navigation -->|"provides site config"| node_seo

click node_home "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/page.tsx"
click node_servicespage "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/services/page.tsx"
click node_solutionspage "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/solutions/page.tsx"
click node_projectspage "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/projects/page.tsx"
click node_contact "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/contact/page.tsx"
click node_assistant "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/chat/LekkaAssistant.tsx"
click node_contactform "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/ContactForm.tsx"
click node_servicecatalog "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/data/services.ts"
click node_servicesgrid "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/ServicesGrid.tsx"
click node_solutionsdata "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/data/solutions.ts"
click node_solutionmatrix "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/SolutionsMatrix.tsx"
click node_excel_demo "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/visualizations/ExcelToInsightsDemo.tsx"
click node_architecture "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/visualizations/ArchitectureDiagram.tsx"
click node_blueprints "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/BlueprintShowcase.tsx"
click node_reportcalc "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/ReportingAuditCalculator.tsx"
click node_ui "https://github.com/saikrishna762/lekka-analytics-website/tree/main/src/components/ui"
click node_pageheader "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/layout/PageHeader.tsx"
click node_navigation "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/data/navigation.ts"
click node_seo "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/lib/seo.ts"
click node_apiclient "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/lib/api.ts"
click node_validation "https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/lib/validation.ts"
click node_worker "https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/index.ts"
click node_cors "https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/cors.ts"
click node_worker_validation "https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/validate.ts"
click node_gemini "https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/gemini.ts"
click node_email "https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/email.ts"
click node_supabase "https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/supabase.ts"

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_home,node_servicespage,node_solutionspage,node_projectspage,node_contact,node_assistant,node_contactform toneBlue
class node_servicecatalog,node_servicesgrid,node_solutionsdata,node_solutionmatrix,node_excel_demo,node_architecture,node_blueprints,node_reportcalc,node_supabaseservice toneAmber
class node_ui,node_pageheader,node_navigation,node_seo,node_apiclient,node_validation,node_geminiservice toneMint
class node_worker,node_cors,node_worker_validation,node_gemini,node_email,node_supabase toneRose
class node_visitor toneIndigo
```

## Components

### Website experience

- [Home page](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Services page](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/services/page.tsx): `src/app/services/page.tsx`
- [Solutions page](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/solutions/page.tsx): `src/app/solutions/page.tsx`
- [Projects page](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/projects/page.tsx): `src/app/projects/page.tsx`
- [Contact experience](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/app/contact/page.tsx): `src/app/contact/page.tsx`
- [AI assistant](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/chat/LekkaAssistant.tsx): `src/components/chat/LekkaAssistant.tsx`
- [Contact form](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/ContactForm.tsx): `src/components/sections/ContactForm.tsx`

### Offer and demonstrations

- [Service catalog](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/data/services.ts): `src/data/services.ts`
- [Service browser](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/ServicesGrid.tsx): `src/components/sections/ServicesGrid.tsx`
- [Solution content](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/data/solutions.ts): `src/data/solutions.ts`
- [Solution matrix](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/SolutionsMatrix.tsx): `src/components/sections/SolutionsMatrix.tsx`
- [Excel insights demo](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/visualizations/ExcelToInsightsDemo.tsx): `src/components/visualizations/ExcelToInsightsDemo.tsx`
- [Architecture diagram](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/visualizations/ArchitectureDiagram.tsx): `src/components/visualizations/ArchitectureDiagram.tsx`
- [Project blueprints](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/BlueprintShowcase.tsx): `src/components/sections/BlueprintShowcase.tsx`
- [Reporting calculator](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/sections/ReportingAuditCalculator.tsx): `src/components/sections/ReportingAuditCalculator.tsx`

### Frontend services

- [UI primitives](https://github.com/saikrishna762/lekka-analytics-website/tree/main/src/components/ui): `src/components/ui`
- [Page header](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/components/layout/PageHeader.tsx): `src/components/layout/PageHeader.tsx`
- [Navigation data](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/data/navigation.ts): `src/data/navigation.ts`
- [SEO metadata](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/lib/seo.ts): `src/lib/seo.ts`
- [API client](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/lib/api.ts): `src/lib/api.ts`
- [Payload validation](https://github.com/saikrishna762/lekka-analytics-website/blob/main/src/lib/validation.ts): `src/lib/validation.ts`

### Worker backend

- [Worker API](https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/index.ts): `worker/src/index.ts`
- [CORS handling](https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/cors.ts): `worker/src/cors.ts`
- [Request validation](https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/validate.ts): `worker/src/validate.ts`
- [Gemini integration](https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/gemini.ts): `worker/src/gemini.ts`
- [Enquiry email](https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/email.ts): `worker/src/email.ts`
- [Enquiry database](https://github.com/saikrishna762/lekka-analytics-website/blob/main/worker/src/supabase.ts): `worker/src/supabase.ts`

### Other components

- **Visitor**
- **Google Gemini API**
- **Supabase PostgreSQL**

## Connections

- Visitor → Home page: browses
- Visitor → Services page: browses
- Visitor → Solutions page: browses
- Visitor → Projects page: browses
- Visitor → Contact experience: opens
- Home page → Services page: links to (evidence: `src/app/page.tsx`)
- Home page → Contact experience: links to (evidence: `src/app/page.tsx`)
- Services page → Service browser: renders (evidence: `src/app/services/page.tsx`)
- Services page → Reporting calculator: renders (evidence: `src/app/services/page.tsx`)
- Service browser → Service catalog: filters (evidence: `src/components/sections/ServicesGrid.tsx`)
- Solutions page → Solution matrix: renders (evidence: `src/app/solutions/page.tsx`)
- Solutions page → Excel insights demo: renders (evidence: `src/app/solutions/page.tsx`)
- Solutions page → Architecture diagram: renders (evidence: `src/app/solutions/page.tsx`)
- Solutions page → Solution content: reads (evidence: `src/app/solutions/page.tsx`)
- Projects page → Project blueprints: renders (evidence: `src/app/projects/page.tsx`)
- AI assistant → API client: sends requests (evidence: `src/components/chat/LekkaAssistant.tsx`)
- Contact form → API client: submits enquiry
- API client → Payload validation: uses types (evidence: `src/lib/api.ts`)
- API client → Worker API: posts chat and enquiries (evidence: `src/lib/api.ts`)
- Worker API → CORS handling: checks origins
- Worker API → Request validation: validates payloads
- Worker API → Gemini integration: dispatches chat
- Worker API → Enquiry email: handles enquiries
- Worker API → Enquiry database: stores enquiries
- Gemini integration → Google Gemini API: calls
- Enquiry database → Supabase PostgreSQL: writes records
- Services page → SEO metadata: builds metadata (evidence: `src/app/services/page.tsx`)
- Solutions page → SEO metadata: builds metadata (evidence: `src/app/solutions/page.tsx`)
- Projects page → SEO metadata: builds metadata (evidence: `src/app/projects/page.tsx`)
- Services page → Page header: renders (evidence: `src/app/services/page.tsx`)
- Solutions page → Page header: renders (evidence: `src/app/solutions/page.tsx`)
- Projects page → Page header: renders (evidence: `src/app/projects/page.tsx`)
- Home page → UI primitives: uses (evidence: `src/app/page.tsx`)
- Services page → UI primitives: uses (evidence: `src/app/services/page.tsx`)
- Navigation data → SEO metadata: provides site config (evidence: `src/lib/seo.ts`)
