# jentsenpineda/aquaguide-ai architecture

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

- Interactive diagram: https://gitdiagram.com/jentsenpineda/aquaguide-ai
- Repository: https://github.com/jentsenpineda/aquaguide-ai

## Overview

AquaGuide AI is an aquarium-care mobile app. Users browse fish and care guidance, check compatibility or other specialist guides, and can scan a fish for AI-assisted care results; signed-in users can manage acclimation programs, logs, reminders, and profiles. The graph preserves these distinct product areas and shared authentication, data, and presentation layers. Evidence is limited to the README and the supplied source index/excerpts; unsampled feature relationships are not asserted.

Main entry points: [`config/firebase.ts`](https://github.com/jentsenpineda/aquaguide-ai/blob/main/config/firebase.ts) (Firebase services), [`app/scan.tsx`](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/scan.tsx) (Fish scan), [`components/screens/HomeScreen.tsx`](https://github.com/jentsenpineda/aquaguide-ai/blob/main/components/screens/HomeScreen.tsx) (Home screen), [`services/reminderService.ts`](https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/reminderService.ts) (Reminder scheduling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_care["Care tools"]
  node_scan["Fish scan<br/>[scan.tsx]"]
  node_scanui["Scan interface<br/>[ScanCamera.tsx]"]
  node_scanresult["Scan results<br/>[ScanResult.tsx]"]
  node_aiservice["AI analysis<br/>[aiService.ts]"]
  node_scanservice["Scan records<br/>[scanService.ts]"]
  node_newfish["New-fish program<br/>[index.tsx]"]
  node_newfishservice["Program tracking"]
  node_fishcare["Fish-care guidance<br/>[fish-care.tsx]"]
  node_compatibility["Compatibility checker"]
  node_breeding["Breeding guide<br/>[breeding-guide.tsx]"]
  node_plantcare["Plant guide<br/>[aqua-plant.tsx]"]
end

subgraph group_reference["Aquarium reference"]
  node_library["Fish library<br/>[library.tsx]"]
  node_fishdetails["Fish profiles<br/>[&#91;id&#93;.tsx]"]
  node_disease["Disease guide<br/>[disease-guide.tsx]"]
  node_equipment["Equipment guides"]
end

subgraph group_account["Account and tracking"]
  node_logbook["Care logbook<br/>[index.tsx]"]
  node_logservice["Log storage<br/>[logbookService.ts]"]
  node_reminders["Reminders<br/>[index.tsx]"]
  node_reminderservice["Reminder scheduling<br/>[reminderService.ts]"]
  node_notifications["Local notifications"]
  node_profile["User profile<br/>[index.tsx]"]
end

subgraph group_shared["Shared app services"]
  node_auth["Authentication<br/>[authService.ts]"]
  node_authcontext["Auth state<br/>[AuthContext.tsx]"]
  node_firebase[("Firebase services<br/>[firebase.ts]")]
  node_home["Home screen<br/>[HomeScreen.tsx]"]
  node_themes["Theme state<br/>[ThemeContext.tsx]"]
end

node_aquarist(("Aquarist"))

node_aquarist -->|"starts scan"| node_scan
node_scan -->|"requests analysis"| node_aiservice
node_scan -->|"manages scans"| node_scanservice
node_scan -.->|"shows results"| node_scanresult
node_scan -.->|"uses camera"| node_scanui
node_aquarist -.->|"browses fish"| node_library
node_library -.->|"opens profile"| node_fishdetails
node_aquarist -.->|"views guidance"| node_fishcare
node_aquarist -.->|"checks compatibility"| node_compatibility
node_aquarist -.->|"reads guide"| node_breeding
node_aquarist -.->|"views plant care"| node_plantcare
node_aquarist -.->|"reads guide"| node_disease
node_aquarist -.->|"views equipment"| node_equipment
node_aquarist -.->|"tracks new fish"| node_newfish
node_newfish -->|"manages program"| node_newfishservice
node_aquarist -.->|"records care"| node_logbook
node_logbook -->|"deletes logs"| node_logservice
node_aquarist -.->|"sets reminders"| node_reminders
node_reminders -->|"deletes reminders"| node_reminderservice
node_reminderservice -->|"schedules alerts"| node_notifications
node_aquarist -.->|"manages account"| node_profile
node_profile -->|"manages account"| node_auth
node_auth -->|"uses auth and data"| node_firebase
node_authcontext -->|"observes auth"| node_firebase
node_logservice -->|"reads and writes"| node_firebase
node_newfishservice -->|"reads and writes"| node_firebase
node_reminderservice -->|"reads and writes"| node_firebase
node_scanservice -->|"uses storage"| node_firebase
node_home -->|"loads log data"| node_logservice
node_home -->|"loads programs"| node_newfishservice
node_home -->|"loads reminders"| node_reminderservice
node_home -->|"loads scan data"| node_scanservice
node_library -.->|"uses fish data"| node_firebase
node_themes -.->|"persists preference"| node_firebase

click node_scan "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/scan.tsx"
click node_scanui "https://github.com/jentsenpineda/aquaguide-ai/blob/main/components/scan/ScanCamera.tsx"
click node_scanresult "https://github.com/jentsenpineda/aquaguide-ai/blob/main/components/scan/ScanResult.tsx"
click node_aiservice "https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/aiService.ts"
click node_scanservice "https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/scanService.ts"
click node_newfish "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/new-fish-care/index.tsx"
click node_newfishservice "https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/newFishCareService.ts"
click node_fishcare "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/(tabs)/fish-care.tsx"
click node_compatibility "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/compatibility-checker.tsx"
click node_breeding "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/breeding-guide.tsx"
click node_plantcare "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/aqua-plant.tsx"
click node_library "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/(tabs)/library.tsx"
click node_fishdetails "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/fish/%5Bid%5D.tsx"
click node_disease "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/disease-guide.tsx"
click node_equipment "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/equipment/equipment-guide.tsx"
click node_logbook "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/logbook/index.tsx"
click node_logservice "https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/logbookService.ts"
click node_reminders "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/reminder/index.tsx"
click node_reminderservice "https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/reminderService.ts"
click node_notifications "https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/notificationService.ts"
click node_profile "https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/profile/index.tsx"
click node_auth "https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/authService.ts"
click node_authcontext "https://github.com/jentsenpineda/aquaguide-ai/blob/main/contexts/AuthContext.tsx"
click node_firebase "https://github.com/jentsenpineda/aquaguide-ai/blob/main/config/firebase.ts"
click node_home "https://github.com/jentsenpineda/aquaguide-ai/blob/main/components/screens/HomeScreen.tsx"
click node_themes "https://github.com/jentsenpineda/aquaguide-ai/blob/main/contexts/ThemeContext.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_scan,node_scanui,node_scanresult,node_aiservice,node_scanservice,node_newfish,node_newfishservice,node_fishcare,node_compatibility,node_breeding,node_plantcare toneBlue
class node_library,node_fishdetails,node_disease,node_equipment toneAmber
class node_logbook,node_logservice,node_reminders,node_reminderservice,node_notifications,node_profile toneMint
class node_auth,node_authcontext,node_firebase,node_home,node_themes toneRose
class node_aquarist toneIndigo
```

## Components

### Care tools

- [Fish scan](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/scan.tsx): `app/scan.tsx`
- [Scan interface](https://github.com/jentsenpineda/aquaguide-ai/blob/main/components/scan/ScanCamera.tsx): `components/scan/ScanCamera.tsx`
- [Scan results](https://github.com/jentsenpineda/aquaguide-ai/blob/main/components/scan/ScanResult.tsx): `components/scan/ScanResult.tsx`
- [AI analysis](https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/aiService.ts): `services/aiService.ts`
- [Scan records](https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/scanService.ts): `services/scanService.ts`
- [New-fish program](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/new-fish-care/index.tsx): `app/new-fish-care/index.tsx`
- [Program tracking](https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/newFishCareService.ts): `services/newFishCareService.ts`
- [Fish-care guidance](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/(tabs)/fish-care.tsx): `app/(tabs)/fish-care.tsx`
- [Compatibility checker](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/compatibility-checker.tsx): `app/compatibility-checker.tsx`
- [Breeding guide](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/breeding-guide.tsx): `app/breeding-guide.tsx`
- [Plant guide](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/aqua-plant.tsx): `app/aqua-plant.tsx`

### Aquarium reference

- [Fish library](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/(tabs)/library.tsx): `app/(tabs)/library.tsx`
- [Fish profiles](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/fish/%5Bid%5D.tsx): `app/fish/[id].tsx`
- [Disease guide](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/disease-guide.tsx): `app/disease-guide.tsx`
- [Equipment guides](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/equipment/equipment-guide.tsx): `app/equipment/equipment-guide.tsx`

### Account and tracking

- [Care logbook](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/logbook/index.tsx): `app/logbook/index.tsx`
- [Log storage](https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/logbookService.ts): `services/logbookService.ts`
- [Reminders](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/reminder/index.tsx): `app/reminder/index.tsx`
- [Reminder scheduling](https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/reminderService.ts): `services/reminderService.ts`
- [Local notifications](https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/notificationService.ts): `services/notificationService.ts`
- [User profile](https://github.com/jentsenpineda/aquaguide-ai/blob/main/app/profile/index.tsx): `app/profile/index.tsx`

### Shared app services

- [Authentication](https://github.com/jentsenpineda/aquaguide-ai/blob/main/services/authService.ts): `services/authService.ts`
- [Auth state](https://github.com/jentsenpineda/aquaguide-ai/blob/main/contexts/AuthContext.tsx): `contexts/AuthContext.tsx`
- [Firebase services](https://github.com/jentsenpineda/aquaguide-ai/blob/main/config/firebase.ts): `config/firebase.ts`
- [Home screen](https://github.com/jentsenpineda/aquaguide-ai/blob/main/components/screens/HomeScreen.tsx): `components/screens/HomeScreen.tsx`
- [Theme state](https://github.com/jentsenpineda/aquaguide-ai/blob/main/contexts/ThemeContext.tsx): `contexts/ThemeContext.tsx`

### Other components

- **Aquarist**

## Connections

- Aquarist → Fish scan: starts scan
- Fish scan → AI analysis: requests analysis (evidence: `app/scan.tsx`)
- Fish scan → Scan records: manages scans (evidence: `app/scan.tsx`)
- Fish scan → Scan results: shows results
- Fish scan → Scan interface: uses camera
- Aquarist → Fish library: browses fish
- Fish library → Fish profiles: opens profile
- Aquarist → Fish-care guidance: views guidance
- Aquarist → Compatibility checker: checks compatibility
- Aquarist → Breeding guide: reads guide
- Aquarist → Plant guide: views plant care
- Aquarist → Disease guide: reads guide
- Aquarist → Equipment guides: views equipment
- Aquarist → New-fish program: tracks new fish
- New-fish program → Program tracking: manages program (evidence: `app/new-fish-care/index.tsx`)
- Aquarist → Care logbook: records care
- Care logbook → Log storage: deletes logs (evidence: `app/logbook/index.tsx`)
- Aquarist → Reminders: sets reminders
- Reminders → Reminder scheduling: deletes reminders (evidence: `app/reminder/index.tsx`)
- Reminder scheduling → Local notifications: schedules alerts (evidence: `services/reminderService.ts`)
- Aquarist → User profile: manages account
- User profile → Authentication: manages account (evidence: `app/profile/index.tsx`)
- Authentication → Firebase services: uses auth and data (evidence: `services/authService.ts`)
- Auth state → Firebase services: observes auth (evidence: `contexts/AuthContext.tsx`)
- Log storage → Firebase services: reads and writes (evidence: `services/logbookService.ts`)
- Program tracking → Firebase services: reads and writes (evidence: `services/newFishCareService.ts`)
- Reminder scheduling → Firebase services: reads and writes (evidence: `services/reminderService.ts`)
- Scan records → Firebase services: uses storage (evidence: `services/scanService.ts`)
- Home screen → Log storage: loads log data (evidence: `components/screens/HomeScreen.tsx`)
- Home screen → Program tracking: loads programs (evidence: `components/screens/HomeScreen.tsx`)
- Home screen → Reminder scheduling: loads reminders (evidence: `components/screens/HomeScreen.tsx`)
- Home screen → Scan records: loads scan data (evidence: `components/screens/HomeScreen.tsx`)
- Fish library → Firebase services: uses fish data
- Theme state → Firebase services: persists preference
