# gilbert-dev17/dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/gilbert-dev17/dashboard
- Repository: https://github.com/gilbert-dev17/dashboard

## Overview

Personal Dashboard is a Next.js app for daily planning and journaling, personal finance, and account settings. Users enter through the dashboard or module routes; the planner presents calendar, agenda, and notes, while finance routes cover accounts, transaction entry, categories, and history. Supabase provides authentication, persistence, and documented Realtime synchronization; weather is an optional external service. The excerpts show the weather API, OAuth callback, task-toggle persistence, and sync hook directly. Other module internals are represented from the README and tree, so uncertain action-to-storage links are omitted.

Main entry points: [`src/lib/supabase/server.ts`](https://github.com/gilbert-dev17/dashboard/blob/main/src/lib/supabase/server.ts) (Server client), [`src/hooks/useRealTimeSync.ts`](https://github.com/gilbert-dev17/dashboard/blob/main/src/hooks/useRealTimeSync.ts) (Realtime sync hook), [`src/app/(main)/schedule`](https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/schedule) (Planner routes), [`src/app/(auth)/callback/route.ts`](https://github.com/gilbert-dev17/dashboard/blob/main/src/app/(auth)/callback/route.ts) (OAuth callback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App and access"]
  node_profile["Profile settings"]
  node_login["Login and callback"]
  node_auth_callback["OAuth callback<br/>[route.ts]"]
end

subgraph group_planning["Planner and home"]
  node_home["Daily dashboard"]
  node_schedule["Planner routes"]
  node_planner_ui["Calendar, agenda, notes"]
  node_task_actions["Task actions"]
end

subgraph group_finance["Personal finance"]
  node_finance_routes["Finance routes"]
  node_finance_ui["Finance interface"]
  node_transaction_actions["Transaction actions"]
  node_finance_calcs["Financial calculations"]
end

subgraph group_services["Data and integrations"]
  node_weather_api["Weather endpoint<br/>[route.ts]"]
  node_weather_service["Weather and geocoding"]
  node_supabase_server["Server client<br/>[server.ts]"]
  node_supabase[("Supabase")]
  node_realtime_sync["Realtime sync hook<br/>[useRealTimeSync.ts]"]
  node_sync_status["Sync status"]
end

node_user(("Dashboard user"))

node_user -->|"opens dashboard"| node_home
node_user -->|"opens planner"| node_schedule
node_user -->|"opens finance"| node_finance_routes
node_user -->|"opens settings"| node_profile
node_user -->|"signs in"| node_login
node_schedule -->|"renders planner"| node_planner_ui
node_task_actions -->|"creates client"| node_supabase_server
node_supabase_server -->|"accesses data"| node_supabase
node_auth_callback -->|"creates client"| node_supabase_server
node_realtime_sync -->|"subscribes to changes"| node_supabase
node_realtime_sync -->|"updates status"| node_sync_status
node_weather_api -->|"fetches conditions"| node_weather_service

click node_home "https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/home"
click node_schedule "https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/schedule"
click node_planner_ui "https://github.com/gilbert-dev17/dashboard/tree/main/src/components/Shared"
click node_task_actions "https://github.com/gilbert-dev17/dashboard/tree/main/src/lib/actions"
click node_weather_api "https://github.com/gilbert-dev17/dashboard/blob/main/src/app/api/weather/route.ts"
click node_finance_routes "https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/finance"
click node_finance_ui "https://github.com/gilbert-dev17/dashboard/tree/main/src/components/Expenses"
click node_transaction_actions "https://github.com/gilbert-dev17/dashboard/tree/main/src/lib/actions/transactions"
click node_finance_calcs "https://github.com/gilbert-dev17/dashboard/tree/main/src/lib/finance"
click node_profile "https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/profile"
click node_login "https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(auth)"
click node_auth_callback "https://github.com/gilbert-dev17/dashboard/blob/main/src/app/(auth)/callback/route.ts"
click node_supabase_server "https://github.com/gilbert-dev17/dashboard/blob/main/src/lib/supabase/server.ts"
click node_realtime_sync "https://github.com/gilbert-dev17/dashboard/blob/main/src/hooks/useRealTimeSync.ts"
click node_sync_status "https://github.com/gilbert-dev17/dashboard/blob/main/src/contexts/SyncStatusContext.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_profile,node_login,node_auth_callback,node_user toneBlue
class node_home,node_schedule,node_planner_ui,node_task_actions toneAmber
class node_finance_routes,node_finance_ui,node_transaction_actions,node_finance_calcs toneMint
class node_weather_api,node_weather_service,node_supabase_server,node_supabase,node_realtime_sync,node_sync_status toneRose
```

## Components

### App and access

- [Profile settings](https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/profile): `src/app/(main)/profile`
- [Login and callback](https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(auth)): `src/app/(auth)`
- [OAuth callback](https://github.com/gilbert-dev17/dashboard/blob/main/src/app/(auth)/callback/route.ts): `src/app/(auth)/callback/route.ts`

### Planner and home

- [Daily dashboard](https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/home): `src/app/(main)/home`
- [Planner routes](https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/schedule): `src/app/(main)/schedule`
- [Calendar, agenda, notes](https://github.com/gilbert-dev17/dashboard/tree/main/src/components/Shared): `src/components/Shared`
- [Task actions](https://github.com/gilbert-dev17/dashboard/tree/main/src/lib/actions): `src/lib/actions`

### Personal finance

- [Finance routes](https://github.com/gilbert-dev17/dashboard/tree/main/src/app/(main)/finance): `src/app/(main)/finance`
- [Finance interface](https://github.com/gilbert-dev17/dashboard/tree/main/src/components/Expenses): `src/components/Expenses`
- [Transaction actions](https://github.com/gilbert-dev17/dashboard/tree/main/src/lib/actions/transactions): `src/lib/actions/transactions`
- [Financial calculations](https://github.com/gilbert-dev17/dashboard/tree/main/src/lib/finance): `src/lib/finance`

### Data and integrations

- [Weather endpoint](https://github.com/gilbert-dev17/dashboard/blob/main/src/app/api/weather/route.ts): `src/app/api/weather/route.ts`
- **Weather and geocoding**
- [Server client](https://github.com/gilbert-dev17/dashboard/blob/main/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- **Supabase**
- [Realtime sync hook](https://github.com/gilbert-dev17/dashboard/blob/main/src/hooks/useRealTimeSync.ts): `src/hooks/useRealTimeSync.ts`
- [Sync status](https://github.com/gilbert-dev17/dashboard/blob/main/src/contexts/SyncStatusContext.tsx): `src/contexts/SyncStatusContext.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Daily dashboard: opens dashboard
- Dashboard user → Planner routes: opens planner
- Dashboard user → Finance routes: opens finance
- Dashboard user → Profile settings: opens settings
- Dashboard user → Login and callback: signs in
- Planner routes → Calendar, agenda, notes: renders planner
- Task actions → Server client: creates client
- Server client → Supabase: accesses data
- OAuth callback → Server client: creates client
- Realtime sync hook → Supabase: subscribes to changes
- Realtime sync hook → Sync status: updates status
- Weather endpoint → Weather and geocoding: fetches conditions
