# sarathi377/aqualens-fishid-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/sarathi377/aqualens-fishid-v2
- Repository: https://github.com/sarathi377/aqualens-fishid-v2

## Overview

AquaLens is a fish-identification and marine-safety application. Its user flow starts at the landing/authentication interface, then enters the React app for fish analysis and related marine tools; the documented architecture also describes cloud AI, weather, emergency routing, and a backend for accounts and scan history. The shown sources confirm the UI entry, selected component links, and backend persistence. Several product features are documented but their implementation details are not shown, so those links are documented rather than inferred from module names.

Main entry points: [`src/App.tsx`](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx) (AquaLens App), [`src/components/About.tsx`](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/About.tsx) (Landing and Login), [`server.js`](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/server.js) (Express API), [`src/main.tsx`](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/main.tsx) (Web Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client Experience"]
  node_entry["Web Entry<br/>[main.tsx]"]
  node_landing["Landing and Login<br/>[About.tsx]"]
  node_authui["Authentication UI<br/>[Auth.tsx]"]
  node_app["AquaLens App<br/>[App.tsx]"]
  node_analysis["Fish Analysis Results"]
  node_team["Team Section<br/>[TeamSection.tsx]"]
end

subgraph group_marine["Marine Intelligence"]
  node_fishwiki["Fish Wiki<br/>[App.tsx]"]
  node_marinechat["Marine Chat<br/>[App.tsx]"]
  node_safety["Weather and SOS<br/>[App.tsx]"]
  node_cnninfo["CNN Overview<br/>[CNNModel.tsx]"]
end

subgraph group_services["Cloud Services"]
  node_gemini{{"Gemini Vision AI"}}
  node_weatherapi{{"Open-Meteo"}}
  node_coastguard{{"Coast Guard Routing"}}
  node_backend["Express API<br/>[server.js]"]
  node_authroutes["Account Routes<br/>[server.js]"]
  node_scanroutes["Scan Sync and History<br/>[server.js]"]
end

subgraph group_storage["Persistence"]
  node_mongodb[("MongoDB")]
end

node_user(("Fisher or Operator"))

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"shows when logged out"| node_landing
node_landing -->|"renders"| node_authui
node_app -->|"uses"| node_analysis
node_app -->|"sends images online"| node_gemini
node_app -->|"requests weather"| node_weatherapi
node_app -->|"routes distress"| node_coastguard
node_app -->|"uses API"| node_backend
node_backend -->|"routes requests"| node_authroutes
node_backend -->|"routes requests"| node_scanroutes
node_backend -->|"persists records"| node_mongodb
node_app -->|"provides"| node_fishwiki
node_app -->|"provides"| node_marinechat
node_app -->|"provides"| node_safety
node_landing -->|"presents feature"| node_cnninfo
node_landing -->|"renders"| node_team

click node_entry "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/main.tsx"
click node_landing "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/About.tsx"
click node_authui "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/Auth.tsx"
click node_app "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx"
click node_analysis "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/FishAnalysisDashboard.tsx"
click node_fishwiki "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx"
click node_marinechat "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx"
click node_safety "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx"
click node_cnninfo "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/AI/CNNModel.tsx"
click node_backend "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/server.js"
click node_authroutes "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/server.js"
click node_scanroutes "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/server.js"
click node_team "https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/TeamSection.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_entry,node_landing,node_authui,node_app,node_analysis,node_team toneBlue
class node_fishwiki,node_marinechat,node_safety,node_cnninfo toneAmber
class node_gemini,node_weatherapi,node_coastguard,node_backend,node_authroutes,node_scanroutes toneMint
class node_mongodb toneRose
class node_user toneIndigo
```

## Components

### Client Experience

- [Web Entry](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/main.tsx): `src/main.tsx`
- [Landing and Login](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/About.tsx): `src/components/About.tsx`
- [Authentication UI](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/Auth.tsx): `src/components/Auth.tsx`
- [AquaLens App](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx): `src/App.tsx`
- [Fish Analysis Results](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/FishAnalysisDashboard.tsx): `src/components/FishAnalysisDashboard.tsx`
- [Team Section](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/TeamSection.tsx): `src/components/TeamSection.tsx`

### Marine Intelligence

- [Fish Wiki](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx): `src/App.tsx`
- [Marine Chat](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx): `src/App.tsx`
- [Weather and SOS](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/App.tsx): `src/App.tsx`
- [CNN Overview](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/src/components/AI/CNNModel.tsx): `src/components/AI/CNNModel.tsx`

### Cloud Services

- **Gemini Vision AI**
- **Open-Meteo**
- **Coast Guard Routing**
- [Express API](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/server.js): `server.js`
- [Account Routes](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/server.js): `server.js`
- [Scan Sync and History](https://github.com/sarathi377/aqualens-fishid-v2/blob/main/server.js): `server.js`

### Persistence

- **MongoDB**

### Other components

- **Fisher or Operator**

## Connections

- Fisher or Operator → Web Entry: opens app (evidence: `README.md`)
- Web Entry → AquaLens App: renders (evidence: `src/main.tsx`)
- AquaLens App → Landing and Login: shows when logged out (evidence: `src/App.tsx`)
- Landing and Login → Authentication UI: renders (evidence: `src/components/About.tsx`)
- AquaLens App → Fish Analysis Results: uses (evidence: `src/App.tsx`)
- AquaLens App → Gemini Vision AI: sends images online (evidence: `README.md`)
- AquaLens App → Open-Meteo: requests weather (evidence: `README.md`)
- AquaLens App → Coast Guard Routing: routes distress (evidence: `README.md`)
- AquaLens App → Express API: uses API (evidence: `README.md`)
- Express API → Account Routes: routes requests (evidence: `server.js`)
- Express API → Scan Sync and History: routes requests (evidence: `server.js`)
- Express API → MongoDB: persists records (evidence: `server.js`)
- AquaLens App → Fish Wiki: provides (evidence: `README.md`)
- AquaLens App → Marine Chat: provides (evidence: `README.md`)
- AquaLens App → Weather and SOS: provides (evidence: `README.md`)
- Landing and Login → CNN Overview: presents feature (evidence: `src/components/About.tsx`)
- Landing and Login → Team Section: renders (evidence: `src/components/About.tsx`)
