# zmeypp/lifeboard architecture

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

- Interactive diagram: https://gitdiagram.com/zmeypp/lifeboard
- Repository: https://github.com/zmeypp/lifeboard

## Overview

LifeBoard is a personal-finance and household dashboard with budgeting, transaction entry, goals, statistics, meal planning, weather, and device settings. A user enters the dashboard, then navigates to finance and lifestyle views; the dashboard composes summaries from those domains. Mobile-operation endpoints accept pending expenses and persist them in a local runtime file. The source index establishes many component dependencies, but several routes and page-entry files were not excerpted, so uncertain runtime links are omitted. The README is the generic Next.js starter README and does not document product capabilities.

Main entry points: [`components/layout/DashboardLayout.tsx`](https://github.com/zmeypp/lifeboard/blob/main/components/layout/DashboardLayout.tsx) (Dashboard layout), [`components/dashboard/DashboardGrid.tsx`](https://github.com/zmeypp/lifeboard/blob/main/components/dashboard/DashboardGrid.tsx) (Dashboard overview), [`components/settings/SettingsPage.tsx`](https://github.com/zmeypp/lifeboard/blob/main/components/settings/SettingsPage.tsx) (Settings), [`lib/netWorth.ts`](https://github.com/zmeypp/lifeboard/blob/main/lib/netWorth.ts) (Net worth calculations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Dashboard and navigation"]
  node_dashboard["Dashboard layout"]
  node_dashboard_grid["Dashboard overview<br/>[DashboardGrid.tsx]"]
  node_settings["Settings<br/>[SettingsPage.tsx]"]
end

subgraph group_finance["Personal finance"]
  node_budget_view["Budget management<br/>[BudgetPage.tsx]"]
  node_operations_view["Operations<br/>[OperationsPage.tsx]"]
  node_operation_form["Operation entry<br/>[OperationForm.tsx]"]
  node_budget_list["Budget summary<br/>[BudgetList.tsx]"]
  node_statistics["Financial statistics<br/>[StatisticsPage.tsx]"]
  node_net_worth_chart["Net worth chart<br/>[NetWorthChart.tsx]"]
end

subgraph group_lifestyle["Goals and lifestyle"]
  node_objectives["Objectives<br/>[ObjectivesPage.tsx]"]
  node_main_goal["Main goal card<br/>[MainGoal.tsx]"]
  node_meals_today["Today meal<br/>[TodayMealPage.tsx]"]
  node_meals_week["Weekly meals<br/>[WeekMealsPage.tsx]"]
  node_weather["Weather display<br/>[WeatherCard.tsx]"]
end

subgraph group_services["API and device services"]
  node_weather_api["Weather endpoint<br/>[route.ts]"]
  node_mobile_operations["Mobile operations API<br/>[route.ts]"]
  node_mobile_store[("Pending mobile operations")]
  node_meal_generate["Meal generation API<br/>[route.ts]"]
  node_meal_status["Meal status API<br/>[route.ts]"]
  node_meal_images["Meal image API<br/>[route.ts]"]
  node_system_controls["System reboot and update<br/>[route.ts]"]
  node_mobile_pairing["Mobile pairing<br/>[route.ts]"]
  node_mobile_config["Mobile configuration<br/>[route.ts]"]
end

subgraph group_domain["Domain data and calculations"]
  node_budgets_data["Budget definitions<br/>[budgets.ts]"]
  node_operations_data["Operation model<br/>[operations.ts]"]
  node_goals_data["Goal definitions<br/>[goals.ts]"]
  node_settings_data["Settings defaults<br/>[settings.ts]"]
  node_snapshots_data["Net worth snapshots"]
  node_networth_calc["Net worth calculations<br/>[netWorth.ts]"]
  node_budget_cycle["Budget cycle rules<br/>[budgetCycle.ts]"]
  node_weather_lib["Weather service logic<br/>[weather.ts]"]
end

node_user(("Dashboard user"))

node_user -.->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_dashboard_grid
node_dashboard -->|"renders"| node_operations_view
node_dashboard -->|"renders"| node_budget_view
node_dashboard -->|"renders"| node_objectives
node_dashboard -->|"renders"| node_statistics
node_dashboard -->|"renders"| node_settings
node_dashboard_grid -->|"renders"| node_budget_list
node_dashboard_grid -->|"renders"| node_operation_form
node_dashboard_grid -->|"renders"| node_net_worth_chart
node_dashboard_grid -->|"renders"| node_main_goal
node_dashboard_grid -->|"renders"| node_weather
node_dashboard_grid -->|"calculates with"| node_networth_calc
node_operation_form -->|"uses model"| node_operations_data
node_operation_form -->|"uses budgets"| node_budgets_data
node_operations_view -->|"uses model"| node_operations_data
node_budget_view -->|"uses budgets"| node_budgets_data
node_budget_list -->|"reads"| node_budgets_data
node_budget_list -->|"reads"| node_operations_data
node_budget_list -->|"applies cycle"| node_budget_cycle
node_statistics -->|"calculates with"| node_networth_calc
node_statistics -->|"filters by cycle"| node_budget_cycle
node_net_worth_chart -->|"builds chart data"| node_networth_calc
node_net_worth_chart -->|"reads"| node_snapshots_data
node_networth_calc -->|"uses"| node_budgets_data
node_networth_calc -->|"uses"| node_operations_data
node_networth_calc -->|"uses"| node_snapshots_data
node_objectives -->|"uses goals"| node_goals_data
node_main_goal -->|"uses goals"| node_goals_data
node_settings -->|"uses settings"| node_settings_data
node_settings -->|"checks cycle"| node_budget_cycle
node_weather_api -->|"delegates to"| node_weather_lib
node_weather -->|"uses weather logic"| node_weather_lib
node_mobile_operations -->|"reads and writes"| node_mobile_store
node_mobile_operations -->|"types against"| node_budgets_data
node_meals_week -.->|"requests generation"| node_meal_generate
node_meals_week -.->|"checks status"| node_meal_status
node_meals_week -.->|"loads images"| node_meal_images
node_settings -.->|"controls device"| node_system_controls
node_settings -.->|"pairs mobile"| node_mobile_pairing
node_settings -.->|"configures mobile"| node_mobile_config

click node_dashboard "https://github.com/zmeypp/lifeboard/blob/main/components/layout/DashboardLayout.tsx"
click node_dashboard_grid "https://github.com/zmeypp/lifeboard/blob/main/components/dashboard/DashboardGrid.tsx"
click node_budget_view "https://github.com/zmeypp/lifeboard/blob/main/components/budgets/BudgetPage.tsx"
click node_operations_view "https://github.com/zmeypp/lifeboard/blob/main/components/operations/OperationsPage.tsx"
click node_operation_form "https://github.com/zmeypp/lifeboard/blob/main/components/operations/OperationForm.tsx"
click node_budget_list "https://github.com/zmeypp/lifeboard/blob/main/components/budgets/BudgetList.tsx"
click node_statistics "https://github.com/zmeypp/lifeboard/blob/main/components/statistics/StatisticsPage.tsx"
click node_net_worth_chart "https://github.com/zmeypp/lifeboard/blob/main/components/charts/NetWorthChart.tsx"
click node_objectives "https://github.com/zmeypp/lifeboard/blob/main/components/objectives/ObjectivesPage.tsx"
click node_main_goal "https://github.com/zmeypp/lifeboard/blob/main/components/mustang/MainGoal.tsx"
click node_meals_today "https://github.com/zmeypp/lifeboard/blob/main/components/meals/TodayMealPage.tsx"
click node_meals_week "https://github.com/zmeypp/lifeboard/blob/main/components/meals/WeekMealsPage.tsx"
click node_weather "https://github.com/zmeypp/lifeboard/blob/main/components/weather/WeatherCard.tsx"
click node_settings "https://github.com/zmeypp/lifeboard/blob/main/components/settings/SettingsPage.tsx"
click node_budgets_data "https://github.com/zmeypp/lifeboard/blob/main/data/budgets.ts"
click node_operations_data "https://github.com/zmeypp/lifeboard/blob/main/data/operations.ts"
click node_goals_data "https://github.com/zmeypp/lifeboard/blob/main/data/goals.ts"
click node_settings_data "https://github.com/zmeypp/lifeboard/blob/main/data/settings.ts"
click node_snapshots_data "https://github.com/zmeypp/lifeboard/blob/main/data/netWorthSnapshots.ts"
click node_networth_calc "https://github.com/zmeypp/lifeboard/blob/main/lib/netWorth.ts"
click node_budget_cycle "https://github.com/zmeypp/lifeboard/blob/main/lib/budgetCycle.ts"
click node_weather_api "https://github.com/zmeypp/lifeboard/blob/main/app/api/weather/route.ts"
click node_weather_lib "https://github.com/zmeypp/lifeboard/blob/main/lib/weather.ts"
click node_mobile_operations "https://github.com/zmeypp/lifeboard/blob/main/app/api/mobile/operations/route.ts"
click node_meal_generate "https://github.com/zmeypp/lifeboard/blob/main/app/api/meals/generate/route.ts"
click node_meal_status "https://github.com/zmeypp/lifeboard/blob/main/app/api/meals/status/route.ts"
click node_meal_images "https://github.com/zmeypp/lifeboard/blob/main/app/api/meal-images/%5Bfilename%5D/route.ts"
click node_system_controls "https://github.com/zmeypp/lifeboard/blob/main/app/api/system/reboot/route.ts"
click node_mobile_pairing "https://github.com/zmeypp/lifeboard/blob/main/app/api/mobile/pairing/route.ts"
click node_mobile_config "https://github.com/zmeypp/lifeboard/blob/main/app/api/mobile/config/route.ts"

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_dashboard,node_dashboard_grid,node_settings,node_user toneBlue
class node_budget_view,node_operations_view,node_operation_form,node_budget_list,node_statistics,node_net_worth_chart toneAmber
class node_objectives,node_main_goal,node_meals_today,node_meals_week,node_weather toneMint
class node_weather_api,node_mobile_operations,node_mobile_store,node_meal_generate,node_meal_status,node_meal_images,node_system_controls,node_mobile_pairing,node_mobile_config toneRose
class node_budgets_data,node_operations_data,node_goals_data,node_settings_data,node_snapshots_data,node_networth_calc,node_budget_cycle,node_weather_lib toneIndigo
```

## Components

### Dashboard and navigation

- [Dashboard layout](https://github.com/zmeypp/lifeboard/blob/main/components/layout/DashboardLayout.tsx): `components/layout/DashboardLayout.tsx`
- [Dashboard overview](https://github.com/zmeypp/lifeboard/blob/main/components/dashboard/DashboardGrid.tsx): `components/dashboard/DashboardGrid.tsx`
- [Settings](https://github.com/zmeypp/lifeboard/blob/main/components/settings/SettingsPage.tsx): `components/settings/SettingsPage.tsx`

### Personal finance

- [Budget management](https://github.com/zmeypp/lifeboard/blob/main/components/budgets/BudgetPage.tsx): `components/budgets/BudgetPage.tsx`
- [Operations](https://github.com/zmeypp/lifeboard/blob/main/components/operations/OperationsPage.tsx): `components/operations/OperationsPage.tsx`
- [Operation entry](https://github.com/zmeypp/lifeboard/blob/main/components/operations/OperationForm.tsx): `components/operations/OperationForm.tsx`
- [Budget summary](https://github.com/zmeypp/lifeboard/blob/main/components/budgets/BudgetList.tsx): `components/budgets/BudgetList.tsx`
- [Financial statistics](https://github.com/zmeypp/lifeboard/blob/main/components/statistics/StatisticsPage.tsx): `components/statistics/StatisticsPage.tsx`
- [Net worth chart](https://github.com/zmeypp/lifeboard/blob/main/components/charts/NetWorthChart.tsx): `components/charts/NetWorthChart.tsx`

### Goals and lifestyle

- [Objectives](https://github.com/zmeypp/lifeboard/blob/main/components/objectives/ObjectivesPage.tsx): `components/objectives/ObjectivesPage.tsx`
- [Main goal card](https://github.com/zmeypp/lifeboard/blob/main/components/mustang/MainGoal.tsx): `components/mustang/MainGoal.tsx`
- [Today meal](https://github.com/zmeypp/lifeboard/blob/main/components/meals/TodayMealPage.tsx): `components/meals/TodayMealPage.tsx`
- [Weekly meals](https://github.com/zmeypp/lifeboard/blob/main/components/meals/WeekMealsPage.tsx): `components/meals/WeekMealsPage.tsx`
- [Weather display](https://github.com/zmeypp/lifeboard/blob/main/components/weather/WeatherCard.tsx): `components/weather/WeatherCard.tsx`

### API and device services

- [Weather endpoint](https://github.com/zmeypp/lifeboard/blob/main/app/api/weather/route.ts): `app/api/weather/route.ts`
- [Mobile operations API](https://github.com/zmeypp/lifeboard/blob/main/app/api/mobile/operations/route.ts): `app/api/mobile/operations/route.ts`
- **Pending mobile operations**
- [Meal generation API](https://github.com/zmeypp/lifeboard/blob/main/app/api/meals/generate/route.ts): `app/api/meals/generate/route.ts`
- [Meal status API](https://github.com/zmeypp/lifeboard/blob/main/app/api/meals/status/route.ts): `app/api/meals/status/route.ts`
- [Meal image API](https://github.com/zmeypp/lifeboard/blob/main/app/api/meal-images/%5Bfilename%5D/route.ts): `app/api/meal-images/[filename]/route.ts`
- [System reboot and update](https://github.com/zmeypp/lifeboard/blob/main/app/api/system/reboot/route.ts): `app/api/system/reboot/route.ts`
- [Mobile pairing](https://github.com/zmeypp/lifeboard/blob/main/app/api/mobile/pairing/route.ts): `app/api/mobile/pairing/route.ts`
- [Mobile configuration](https://github.com/zmeypp/lifeboard/blob/main/app/api/mobile/config/route.ts): `app/api/mobile/config/route.ts`

### Domain data and calculations

- [Budget definitions](https://github.com/zmeypp/lifeboard/blob/main/data/budgets.ts): `data/budgets.ts`
- [Operation model](https://github.com/zmeypp/lifeboard/blob/main/data/operations.ts): `data/operations.ts`
- [Goal definitions](https://github.com/zmeypp/lifeboard/blob/main/data/goals.ts): `data/goals.ts`
- [Settings defaults](https://github.com/zmeypp/lifeboard/blob/main/data/settings.ts): `data/settings.ts`
- [Net worth snapshots](https://github.com/zmeypp/lifeboard/blob/main/data/netWorthSnapshots.ts): `data/netWorthSnapshots.ts`
- [Net worth calculations](https://github.com/zmeypp/lifeboard/blob/main/lib/netWorth.ts): `lib/netWorth.ts`
- [Budget cycle rules](https://github.com/zmeypp/lifeboard/blob/main/lib/budgetCycle.ts): `lib/budgetCycle.ts`
- [Weather service logic](https://github.com/zmeypp/lifeboard/blob/main/lib/weather.ts): `lib/weather.ts`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Dashboard layout: uses
- Dashboard layout → Dashboard overview: renders (evidence: `components/layout/DashboardLayout.tsx`)
- Dashboard layout → Operations: renders (evidence: `components/layout/DashboardLayout.tsx`)
- Dashboard layout → Budget management: renders (evidence: `components/layout/DashboardLayout.tsx`)
- Dashboard layout → Objectives: renders (evidence: `components/layout/DashboardLayout.tsx`)
- Dashboard layout → Financial statistics: renders (evidence: `components/layout/DashboardLayout.tsx`)
- Dashboard layout → Settings: renders (evidence: `components/layout/DashboardLayout.tsx`)
- Dashboard overview → Budget summary: renders (evidence: `components/dashboard/DashboardGrid.tsx`)
- Dashboard overview → Operation entry: renders (evidence: `components/dashboard/DashboardGrid.tsx`)
- Dashboard overview → Net worth chart: renders (evidence: `components/dashboard/DashboardGrid.tsx`)
- Dashboard overview → Main goal card: renders (evidence: `components/dashboard/DashboardGrid.tsx`)
- Dashboard overview → Weather display: renders (evidence: `components/dashboard/DashboardGrid.tsx`)
- Dashboard overview → Net worth calculations: calculates with (evidence: `components/dashboard/DashboardGrid.tsx`)
- Operation entry → Operation model: uses model (evidence: `components/operations/OperationForm.tsx`)
- Operation entry → Budget definitions: uses budgets (evidence: `components/operations/OperationForm.tsx`)
- Operations → Operation model: uses model (evidence: `components/operations/OperationsPage.tsx`)
- Budget management → Budget definitions: uses budgets (evidence: `components/budgets/BudgetPage.tsx`)
- Budget summary → Budget definitions: reads (evidence: `components/budgets/BudgetList.tsx`)
- Budget summary → Operation model: reads (evidence: `components/budgets/BudgetList.tsx`)
- Budget summary → Budget cycle rules: applies cycle (evidence: `components/budgets/BudgetList.tsx`)
- Financial statistics → Net worth calculations: calculates with (evidence: `components/statistics/StatisticsPage.tsx`)
- Financial statistics → Budget cycle rules: filters by cycle (evidence: `components/statistics/StatisticsPage.tsx`)
- Net worth chart → Net worth calculations: builds chart data (evidence: `components/charts/NetWorthChart.tsx`)
- Net worth chart → Net worth snapshots: reads (evidence: `components/charts/NetWorthChart.tsx`)
- Net worth calculations → Budget definitions: uses (evidence: `lib/netWorth.ts`)
- Net worth calculations → Operation model: uses (evidence: `lib/netWorth.ts`)
- Net worth calculations → Net worth snapshots: uses (evidence: `lib/netWorth.ts`)
- Objectives → Goal definitions: uses goals (evidence: `components/objectives/ObjectivesPage.tsx`)
- Main goal card → Goal definitions: uses goals (evidence: `components/mustang/MainGoal.tsx`)
- Settings → Settings defaults: uses settings (evidence: `components/settings/SettingsPage.tsx`)
- Settings → Budget cycle rules: checks cycle (evidence: `components/settings/SettingsPage.tsx`)
- Weather endpoint → Weather service logic: delegates to (evidence: `app/api/weather/route.ts`)
- Weather display → Weather service logic: uses weather logic (evidence: `components/weather/WeatherCard.tsx`)
- Mobile operations API → Pending mobile operations: reads and writes (evidence: `app/api/mobile/operations/route.ts`)
- Mobile operations API → Budget definitions: types against (evidence: `app/api/mobile/operations/route.ts`)
- Weekly meals → Meal generation API: requests generation
- Weekly meals → Meal status API: checks status
- Weekly meals → Meal image API: loads images
- Settings → System reboot and update: controls device
- Settings → Mobile pairing: pairs mobile
- Settings → Mobile configuration: configures mobile
