# gabriel-codes-droid/personal-management-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/gabriel-codes-droid/personal-management-dashboard
- Repository: https://github.com/gabriel-codes-droid/personal-management-dashboard

## Overview

PMD is a browser-based personal management dashboard. Users sign in or create an account, then navigate protected sections to manage finances, meals, activities, notifications, and deleted records; admins also manage users. The React app routes these experiences through an API layer to Firebase, while authentication maintains user state. Meals additionally support barcode-based nutrition lookup. The README documents broader product features than the sampled excerpts; feature-to-API links reflect its stated API-layer architecture, while uncertain page-specific wiring is omitted.

Main entry points: [`src/App.tsx`](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/App.tsx) (App routing), [`src/api.ts`](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/api.ts) (Feature API layer), [`src/Meals.tsx`](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Meals.tsx) (Meal tracking), [`src/firebaseAuth.ts`](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/firebaseAuth.ts) (Firebase auth operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application UI"]
  node_app["App routing<br/>[App.tsx]"]
  node_home["Dashboard<br/>[Home.tsx]"]
  node_settings["Account settings<br/>[Settings.tsx]"]
end

subgraph group_identity["Identity"]
  node_authpages["Sign-in and signup<br/>[Login.tsx]"]
  node_authcontext["Auth context<br/>[auth.tsx]"]
  node_authops["Firebase auth operations<br/>[firebaseAuth.ts]"]
end

subgraph group_personal["Personal Management"]
  node_finance["Finance tracking<br/>[Finance.tsx]"]
  node_meals["Meal tracking<br/>[Meals.tsx]"]
  node_activity["Activity tracking<br/>[Activity.tsx]"]
  node_notifications["Notification center<br/>[Notifications.tsx]"]
  node_trash["Trash recovery<br/>[Trash.tsx]"]
  node_admin["Admin panel<br/>[Admin.tsx]"]
end

subgraph group_platform["Firebase Platform"]
  node_api["Feature API layer<br/>[api.ts]"]
  node_firebaseapi["Firebase API<br/>[firebaseApi.ts]"]
  node_firestoreops["Firestore operations<br/>[firebaseDb.ts]"]
  node_firestore[("Firestore data")]
  node_firebaseauth["Firebase Authentication"]
end

subgraph group_services["Supporting Services"]
  node_notifyservice["Notification service"]
  node_barcode["Barcode scanner<br/>[Meals.tsx]"]
  node_functions["Cloud Functions<br/>[index.js]"]
end

node_person(("Dashboard user"))
node_nutrition["Open Food Facts"]
node_email["Resend email"]

node_person -->|"uses"| node_app
node_app -->|"checks session"| node_authcontext
node_app -->|"routes"| node_home
node_app -->|"routes"| node_finance
node_app -->|"routes"| node_meals
node_app -->|"routes"| node_activity
node_app -->|"routes"| node_notifications
node_app -->|"routes"| node_trash
node_app -->|"routes"| node_admin
node_app -->|"routes"| node_settings
node_app -->|"routes"| node_authpages
node_authpages -->|"authenticates via"| node_authcontext
node_authcontext -->|"calls"| node_authops
node_authops -->|"authenticates"| node_firebaseauth
node_authops -->|"reads/writes profiles"| node_firestore
node_finance -->|"uses"| node_api
node_meals -->|"uses"| node_api
node_activity -->|"uses"| node_api
node_notifications -->|"uses"| node_api
node_trash -->|"uses"| node_api
node_admin -->|"uses"| node_api
node_settings -->|"uses"| node_api
node_home -->|"uses"| node_api
node_api -->|"delegates"| node_firebaseapi
node_firebaseapi -->|"calls"| node_firestoreops
node_firestoreops -->|"reads/writes"| node_firestore
node_meals -->|"scans products"| node_barcode
node_meals -->|"looks up nutrition"| node_nutrition
node_notifications -->|"manages alerts"| node_notifyservice
node_notifyservice -->|"persists notifications"| node_firestore
node_functions -->|"reads/writes"| node_firestore
node_functions -.->|"sends digest"| node_email

click node_app "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/App.tsx"
click node_home "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Home.tsx"
click node_finance "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Finance.tsx"
click node_meals "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Meals.tsx"
click node_activity "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Activity.tsx"
click node_notifications "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Notifications.tsx"
click node_trash "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Trash.tsx"
click node_admin "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Admin.tsx"
click node_settings "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Settings.tsx"
click node_authpages "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Login.tsx"
click node_authcontext "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/auth.tsx"
click node_authops "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/firebaseAuth.ts"
click node_api "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/api.ts"
click node_firebaseapi "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/firebaseApi.ts"
click node_firestoreops "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/firebaseDb.ts"
click node_notifyservice "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/notificationService.ts"
click node_barcode "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Meals.tsx"
click node_functions "https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/functions/index.js"

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_home,node_settings,node_person toneBlue
class node_authpages,node_authcontext,node_authops toneAmber
class node_finance,node_meals,node_activity,node_notifications,node_trash,node_admin toneMint
class node_api,node_firebaseapi,node_firestoreops,node_firestore,node_firebaseauth toneRose
class node_notifyservice,node_barcode,node_functions,node_nutrition,node_email toneIndigo
```

## Components

### Application UI

- [App routing](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/App.tsx): `src/App.tsx`
- [Dashboard](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Home.tsx): `src/Home.tsx`
- [Account settings](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Settings.tsx): `src/Settings.tsx`

### Identity

- [Sign-in and signup](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Login.tsx): `src/Login.tsx`
- [Auth context](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/auth.tsx): `src/auth.tsx`
- [Firebase auth operations](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/firebaseAuth.ts): `src/firebaseAuth.ts`

### Personal Management

- [Finance tracking](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Finance.tsx): `src/Finance.tsx`
- [Meal tracking](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Meals.tsx): `src/Meals.tsx`
- [Activity tracking](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Activity.tsx): `src/Activity.tsx`
- [Notification center](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Notifications.tsx): `src/Notifications.tsx`
- [Trash recovery](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Trash.tsx): `src/Trash.tsx`
- [Admin panel](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Admin.tsx): `src/Admin.tsx`

### Firebase Platform

- [Feature API layer](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/api.ts): `src/api.ts`
- [Firebase API](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/firebaseApi.ts): `src/firebaseApi.ts`
- [Firestore operations](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/firebaseDb.ts): `src/firebaseDb.ts`
- **Firestore data**
- **Firebase Authentication**

### Supporting Services

- [Notification service](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/notificationService.ts): `src/notificationService.ts`
- [Barcode scanner](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/src/Meals.tsx): `src/Meals.tsx`
- [Cloud Functions](https://github.com/gabriel-codes-droid/personal-management-dashboard/blob/main/functions/index.js): `functions/index.js`

### Other components

- **Dashboard user**
- **Open Food Facts**
- **Resend email**

## Connections

- Dashboard user → App routing: uses
- App routing → Auth context: checks session
- App routing → Dashboard: routes
- App routing → Finance tracking: routes
- App routing → Meal tracking: routes
- App routing → Activity tracking: routes
- App routing → Notification center: routes
- App routing → Trash recovery: routes
- App routing → Admin panel: routes
- App routing → Account settings: routes
- App routing → Sign-in and signup: routes
- Sign-in and signup → Auth context: authenticates via
- Auth context → Firebase auth operations: calls
- Firebase auth operations → Firebase Authentication: authenticates
- Firebase auth operations → Firestore data: reads/writes profiles
- Finance tracking → Feature API layer: uses
- Meal tracking → Feature API layer: uses
- Activity tracking → Feature API layer: uses
- Notification center → Feature API layer: uses
- Trash recovery → Feature API layer: uses
- Admin panel → Feature API layer: uses
- Account settings → Feature API layer: uses
- Dashboard → Feature API layer: uses
- Feature API layer → Firebase API: delegates
- Firebase API → Firestore operations: calls
- Firestore operations → Firestore data: reads/writes
- Meal tracking → Barcode scanner: scans products
- Meal tracking → Open Food Facts: looks up nutrition
- Notification center → Notification service: manages alerts
- Notification service → Firestore data: persists notifications
- Cloud Functions → Firestore data: reads/writes
- Cloud Functions → Resend email: sends digest
