# maldoddiakshitha/lifeloop-ai12345 architecture

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

- Interactive diagram: https://gitdiagram.com/maldoddiakshitha/lifeloop-ai12345
- Repository: https://github.com/maldoddiakshitha/lifeloop-ai12345

## Overview

LifeLoop AI lets community members submit local problems, then analyzes and checks reports before they are saved and surfaced for community tracking. The main workflow runs through the app shell: report form, text/image analysis and duplicate matching, then persistence and dashboard views with confirmation, status, and category correction. Separate dashboard capabilities include a location heatmap, impact metrics, and contributor leaderboard. Evidence is limited to the excerpts and README; some documented UI and persistence details are therefore shown without asserted implementation-level links.

Main entry points: [`src/App.tsx`](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/App.tsx) (App shell), [`src/components/ReportForm.tsx`](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/ReportForm.tsx) (Report form), [`src/components/DuplicatePanel.tsx`](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/DuplicatePanel.tsx) (Duplicate review), [`src/lib/supabase.ts`](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/lib/supabase.ts) (Supabase client and report types)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_submission["Report Submission"]
  node_app["App shell<br/>[App.tsx]"]
  node_report_form["Report form<br/>[ReportForm.tsx]"]
end

subgraph group_analysis["Analysis and Matching"]
  node_ai_analysis["AI analysis<br/>[ai.ts]"]
  node_duplicate_matching["Duplicate matching<br/>[ai.ts]"]
  node_duplicate_panel["Duplicate review<br/>[DuplicatePanel.tsx]"]
end

subgraph group_community["Community Dashboard"]
  node_report_card["Report cards<br/>[ReportCard.tsx]"]
  node_heatmap["Community heatmap<br/>[Heatmap.tsx]"]
  node_impact_score["Impact score<br/>[ImpactScore.tsx]"]
  node_leaderboard["Contributor leaderboard<br/>[Leaderboard.tsx]"]
  node_badges["Category and status badges<br/>[Badges.tsx]"]
  node_logo["Brand mark<br/>[Logo.tsx]"]
end

subgraph group_platform["Data Platform"]
  node_reports_db[("Reports database")]
  node_photo_storage[("Photo storage")]
  node_supabase_client["Supabase client and report types<br/>[supabase.ts]"]
end

node_community_user(("Community member"))
node_speech_service{{"Browser speech recognition"}}

node_community_user -->|"uses"| node_app
node_app -->|"renders"| node_report_form
node_report_form -->|"submits report"| node_app
node_report_form -->|"previews with"| node_ai_analysis
node_app -->|"analyzes image"| node_ai_analysis
node_app -->|"checks duplicates"| node_duplicate_matching
node_duplicate_matching -.->|"surfaces matches"| node_duplicate_panel
node_report_form -->|"renders"| node_duplicate_panel
node_app -->|"uses"| node_supabase_client
node_report_form -->|"imports"| node_supabase_client
node_supabase_client -.->|"accesses reports"| node_reports_db
node_app -->|"renders"| node_report_card
node_app -->|"renders"| node_heatmap
node_app -->|"renders"| node_impact_score
node_app -.->|"shows leaderboard"| node_leaderboard
node_report_card -->|"uses"| node_badges
node_heatmap -->|"uses"| node_badges
node_duplicate_panel -->|"uses"| node_badges
node_app -->|"renders"| node_logo
node_community_user -.->|"dictates report"| node_speech_service
node_speech_service -.->|"provides transcript"| node_report_form

click node_app "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/App.tsx"
click node_report_form "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/ReportForm.tsx"
click node_ai_analysis "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/lib/ai.ts"
click node_duplicate_matching "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/lib/ai.ts"
click node_duplicate_panel "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/DuplicatePanel.tsx"
click node_reports_db "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/supabase/migrations/20261121113747_create_reports_table.sql"
click node_photo_storage "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/supabase/migrations/20261121114008_storage_bucket_and_seed.sql"
click node_supabase_client "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/lib/supabase.ts"
click node_report_card "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/ReportCard.tsx"
click node_heatmap "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/Heatmap.tsx"
click node_impact_score "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/ImpactScore.tsx"
click node_leaderboard "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/Leaderboard.tsx"
click node_badges "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/Badges.tsx"
click node_logo "https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/Logo.tsx"

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_report_form,node_speech_service toneBlue
class node_ai_analysis,node_duplicate_matching,node_duplicate_panel toneAmber
class node_report_card,node_heatmap,node_impact_score,node_leaderboard,node_badges,node_logo toneMint
class node_reports_db,node_photo_storage,node_supabase_client toneRose
class node_community_user toneIndigo
```

## Components

### Report Submission

- [App shell](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/App.tsx): `src/App.tsx`
- [Report form](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/ReportForm.tsx): `src/components/ReportForm.tsx`

### Analysis and Matching

- [AI analysis](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/lib/ai.ts): `src/lib/ai.ts`
- [Duplicate matching](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/lib/ai.ts): `src/lib/ai.ts`
- [Duplicate review](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/DuplicatePanel.tsx): `src/components/DuplicatePanel.tsx`

### Community Dashboard

- [Report cards](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/ReportCard.tsx): `src/components/ReportCard.tsx`
- [Community heatmap](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/Heatmap.tsx): `src/components/Heatmap.tsx`
- [Impact score](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/ImpactScore.tsx): `src/components/ImpactScore.tsx`
- [Contributor leaderboard](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/Leaderboard.tsx): `src/components/Leaderboard.tsx`
- [Category and status badges](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/Badges.tsx): `src/components/Badges.tsx`
- [Brand mark](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/components/Logo.tsx): `src/components/Logo.tsx`

### Data Platform

- [Reports database](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/supabase/migrations/20261121113747_create_reports_table.sql): `supabase/migrations/20261121113747_create_reports_table.sql`
- [Photo storage](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/supabase/migrations/20261121114008_storage_bucket_and_seed.sql): `supabase/migrations/20261121114008_storage_bucket_and_seed.sql`
- [Supabase client and report types](https://github.com/maldoddiakshitha/lifeloop-ai12345/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Other components

- **Community member**
- **Browser speech recognition**

## Connections

- Community member → App shell: uses (evidence: `README.md`)
- App shell → Report form: renders (evidence: `src/App.tsx`)
- Report form → App shell: submits report (evidence: `src/components/ReportForm.tsx`)
- Report form → AI analysis: previews with (evidence: `src/components/ReportForm.tsx`)
- App shell → AI analysis: analyzes image (evidence: `src/App.tsx`)
- App shell → Duplicate matching: checks duplicates (evidence: `src/App.tsx`)
- Duplicate matching → Duplicate review: surfaces matches
- Report form → Duplicate review: renders (evidence: `src/components/ReportForm.tsx`)
- App shell → Supabase client and report types: uses (evidence: `src/App.tsx`)
- Report form → Supabase client and report types: imports (evidence: `src/components/ReportForm.tsx`)
- Supabase client and report types → Reports database: accesses reports
- App shell → Report cards: renders (evidence: `src/App.tsx`)
- App shell → Community heatmap: renders (evidence: `src/App.tsx`)
- App shell → Impact score: renders (evidence: `src/App.tsx`)
- App shell → Contributor leaderboard: shows leaderboard (evidence: `src/App.tsx`)
- Report cards → Category and status badges: uses (evidence: `src/components/ReportCard.tsx`)
- Community heatmap → Category and status badges: uses (evidence: `src/components/Heatmap.tsx`)
- Duplicate review → Category and status badges: uses (evidence: `src/components/DuplicatePanel.tsx`)
- App shell → Brand mark: renders (evidence: `src/App.tsx`)
- Community member → Browser speech recognition: dictates report (evidence: `README.md`)
- Browser speech recognition → Report form: provides transcript (evidence: `README.md`)
