# jaybee-v/money architecture

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

- Interactive diagram: https://gitdiagram.com/jaybee-v/money
- Repository: https://github.com/jaybee-v/money

## Overview

This is a household-finance web app for recording ordinary and recurring expenses, tracking recipe income, and viewing upcoming obligations and yearly summaries. The workflow routes authenticated users to dashboard or domain pages; page views load and submit data through server actions, which use Prisma for persistence. Authentication creates sessions and protects app pages. The source index supports the main page-to-action links and major domain branches, but several action/view implementations were not excerpted, so uncertain internal calls are omitted.

Main entry points: [`src/app/app`](https://github.com/jaybee-v/money/tree/main/src/app/app) (App routes), [`src/lib/prisma.ts`](https://github.com/jaybee-v/money/blob/main/src/lib/prisma.ts) (Application database), [`src/components/charts/ExpenseYearlyChart.tsx`](https://github.com/jaybee-v/money/blob/main/src/components/charts/ExpenseYearlyChart.tsx) (Yearly finance chart), [`src/app/app/page.tsx`](https://github.com/jaybee-v/money/blob/main/src/app/app/page.tsx) (Dashboard summary)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Identity &amp; sessions"]
  node_signup["Sign-up form<br/>[SignupForm.tsx]"]
  node_auth_actions["Auth actions<br/>[auth.action.ts]"]
  node_session["Session management<br/>[session.ts]"]
  node_auth_schema["Auth validation<br/>[auth.definition.ts]"]
end

subgraph group_experience["App experience"]
  node_app_routes["App routes"]
  node_dashboard["Dashboard summary<br/>[page.tsx]"]
  node_year_chart["Yearly finance chart"]
  node_upcoming["Upcoming obligations"]
end

subgraph group_finance["Finance tracking"]
  node_expense_view["Expense history view"]
  node_expense_form["Expense form<br/>[ExpenseForm.tsx]"]
  node_expense_actions["Expense actions<br/>[expense.action.ts]"]
  node_expense_schema["Expense validation"]
  node_obligatory_expense_view["Recurring expense view"]
  node_obligatory_expense_form["Recurring expense form"]
  node_obligatory_expense_actions["Recurring expense actions"]
  node_recipe_view["Recipe income view<br/>[RecipePageView.tsx]"]
  node_recipe_actions["Recipe actions<br/>[recipe.action.ts]"]
  node_obligatory_recipe_view["Recurring recipe view"]
  node_obligatory_recipe_actions["Recurring recipe actions"]
end

subgraph group_persistence["Persistence"]
  node_database[("Application database<br/>[prisma.ts]")]
end

node_user(("Household user"))

node_user -->|"submits details"| node_signup
node_signup -->|"calls signup"| node_auth_actions
node_signup -->|"validates with"| node_auth_schema
node_auth_actions -->|"creates user"| node_database
node_auth_actions -->|"creates session"| node_session
node_app_routes -->|"checks session"| node_session
node_app_routes -->|"renders"| node_expense_view
node_app_routes -->|"renders"| node_obligatory_expense_view
node_app_routes -->|"renders"| node_recipe_view
node_app_routes -->|"renders"| node_obligatory_recipe_view
node_app_routes -->|"renders"| node_dashboard
node_dashboard -->|"loads user"| node_session
node_dashboard -->|"renders"| node_year_chart
node_dashboard -->|"renders"| node_upcoming
node_year_chart -->|"requests yearly data"| node_expense_actions
node_year_chart -->|"requests obligations"| node_obligatory_expense_actions
node_year_chart -->|"requests recipe totals"| node_recipe_actions
node_year_chart -->|"requests recurring recipes"| node_obligatory_recipe_actions
node_upcoming -->|"loads obligations"| node_obligatory_expense_actions
node_upcoming -->|"loads recipes"| node_obligatory_recipe_actions
node_expense_view -->|"loads and creates"| node_expense_actions
node_expense_view -->|"renders"| node_expense_form
node_expense_form -->|"validates with"| node_expense_schema
node_expense_actions -->|"reads and writes"| node_database
node_obligatory_expense_view -->|"manages obligations"| node_obligatory_expense_actions
node_obligatory_expense_view -->|"renders"| node_obligatory_expense_form
node_obligatory_expense_actions -->|"reads and writes"| node_database
node_recipe_view -->|"manages recipes"| node_recipe_actions
node_recipe_actions -->|"reads and writes"| node_database
node_obligatory_recipe_view -->|"manages recurring recipes"| node_obligatory_recipe_actions
node_obligatory_recipe_actions -->|"reads and writes"| node_database
node_session -->|"looks up user"| node_database

click node_signup "https://github.com/jaybee-v/money/blob/main/src/components/forms/SignupForm.tsx"
click node_auth_actions "https://github.com/jaybee-v/money/blob/main/src/actions/auth.action.ts"
click node_session "https://github.com/jaybee-v/money/blob/main/src/lib/session.ts"
click node_auth_schema "https://github.com/jaybee-v/money/blob/main/src/lib/definitions/auth.definition.ts"
click node_app_routes "https://github.com/jaybee-v/money/tree/main/src/app/app"
click node_dashboard "https://github.com/jaybee-v/money/blob/main/src/app/app/page.tsx"
click node_year_chart "https://github.com/jaybee-v/money/blob/main/src/components/charts/ExpenseYearlyChart.tsx"
click node_upcoming "https://github.com/jaybee-v/money/blob/main/src/components/elements/UpcomingObligatoryExpenses.tsx"
click node_expense_view "https://github.com/jaybee-v/money/blob/main/src/components/pages/ExpensePageView.tsx"
click node_expense_form "https://github.com/jaybee-v/money/blob/main/src/components/forms/ExpenseForm.tsx"
click node_expense_actions "https://github.com/jaybee-v/money/blob/main/src/actions/expense.action.ts"
click node_expense_schema "https://github.com/jaybee-v/money/blob/main/src/lib/definitions/expense.definition.ts"
click node_obligatory_expense_view "https://github.com/jaybee-v/money/blob/main/src/components/pages/ObligatoryExpensePageView.tsx"
click node_obligatory_expense_form "https://github.com/jaybee-v/money/blob/main/src/components/forms/ObligatoryExpenseForm.tsx"
click node_obligatory_expense_actions "https://github.com/jaybee-v/money/blob/main/src/actions/obligatoryExpense.action.ts"
click node_recipe_view "https://github.com/jaybee-v/money/blob/main/src/components/pages/RecipePageView.tsx"
click node_recipe_actions "https://github.com/jaybee-v/money/blob/main/src/actions/recipe.action.ts"
click node_obligatory_recipe_view "https://github.com/jaybee-v/money/blob/main/src/components/pages/ObligatoryRecipesPageView.tsx"
click node_obligatory_recipe_actions "https://github.com/jaybee-v/money/blob/main/src/actions/obligatoryRecipe.action.ts"
click node_database "https://github.com/jaybee-v/money/blob/main/src/lib/prisma.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_signup,node_auth_actions,node_session,node_auth_schema,node_user toneBlue
class node_app_routes,node_dashboard,node_year_chart,node_upcoming toneAmber
class node_expense_view,node_expense_form,node_expense_actions,node_expense_schema,node_obligatory_expense_view,node_obligatory_expense_form,node_obligatory_expense_actions,node_recipe_view,node_recipe_actions,node_obligatory_recipe_view,node_obligatory_recipe_actions toneMint
class node_database toneRose
```

## Components

### Identity & sessions

- [Sign-up form](https://github.com/jaybee-v/money/blob/main/src/components/forms/SignupForm.tsx): `src/components/forms/SignupForm.tsx`
- [Auth actions](https://github.com/jaybee-v/money/blob/main/src/actions/auth.action.ts): `src/actions/auth.action.ts`
- [Session management](https://github.com/jaybee-v/money/blob/main/src/lib/session.ts): `src/lib/session.ts`
- [Auth validation](https://github.com/jaybee-v/money/blob/main/src/lib/definitions/auth.definition.ts): `src/lib/definitions/auth.definition.ts`

### App experience

- [App routes](https://github.com/jaybee-v/money/tree/main/src/app/app): `src/app/app`
- [Dashboard summary](https://github.com/jaybee-v/money/blob/main/src/app/app/page.tsx): `src/app/app/page.tsx`
- [Yearly finance chart](https://github.com/jaybee-v/money/blob/main/src/components/charts/ExpenseYearlyChart.tsx): `src/components/charts/ExpenseYearlyChart.tsx`
- [Upcoming obligations](https://github.com/jaybee-v/money/blob/main/src/components/elements/UpcomingObligatoryExpenses.tsx): `src/components/elements/UpcomingObligatoryExpenses.tsx`

### Finance tracking

- [Expense history view](https://github.com/jaybee-v/money/blob/main/src/components/pages/ExpensePageView.tsx): `src/components/pages/ExpensePageView.tsx`
- [Expense form](https://github.com/jaybee-v/money/blob/main/src/components/forms/ExpenseForm.tsx): `src/components/forms/ExpenseForm.tsx`
- [Expense actions](https://github.com/jaybee-v/money/blob/main/src/actions/expense.action.ts): `src/actions/expense.action.ts`
- [Expense validation](https://github.com/jaybee-v/money/blob/main/src/lib/definitions/expense.definition.ts): `src/lib/definitions/expense.definition.ts`
- [Recurring expense view](https://github.com/jaybee-v/money/blob/main/src/components/pages/ObligatoryExpensePageView.tsx): `src/components/pages/ObligatoryExpensePageView.tsx`
- [Recurring expense form](https://github.com/jaybee-v/money/blob/main/src/components/forms/ObligatoryExpenseForm.tsx): `src/components/forms/ObligatoryExpenseForm.tsx`
- [Recurring expense actions](https://github.com/jaybee-v/money/blob/main/src/actions/obligatoryExpense.action.ts): `src/actions/obligatoryExpense.action.ts`
- [Recipe income view](https://github.com/jaybee-v/money/blob/main/src/components/pages/RecipePageView.tsx): `src/components/pages/RecipePageView.tsx`
- [Recipe actions](https://github.com/jaybee-v/money/blob/main/src/actions/recipe.action.ts): `src/actions/recipe.action.ts`
- [Recurring recipe view](https://github.com/jaybee-v/money/blob/main/src/components/pages/ObligatoryRecipesPageView.tsx): `src/components/pages/ObligatoryRecipesPageView.tsx`
- [Recurring recipe actions](https://github.com/jaybee-v/money/blob/main/src/actions/obligatoryRecipe.action.ts): `src/actions/obligatoryRecipe.action.ts`

### Persistence

- [Application database](https://github.com/jaybee-v/money/blob/main/src/lib/prisma.ts): `src/lib/prisma.ts`

### Other components

- **Household user**

## Connections

- Household user → Sign-up form: submits details (evidence: `src/components/forms/SignupForm.tsx`)
- Sign-up form → Auth actions: calls signup (evidence: `src/components/forms/SignupForm.tsx`)
- Sign-up form → Auth validation: validates with (evidence: `src/components/forms/SignupForm.tsx`)
- Auth actions → Application database: creates user (evidence: `src/actions/auth.action.ts`)
- Auth actions → Session management: creates session (evidence: `src/actions/auth.action.ts`)
- App routes → Session management: checks session (evidence: `src/app/app/expenses/page.tsx`)
- App routes → Expense history view: renders (evidence: `src/app/app/expenses/page.tsx`)
- App routes → Recurring expense view: renders (evidence: `src/app/app/obligatory-expenses/page.tsx`)
- App routes → Recipe income view: renders (evidence: `src/app/app/recipes/page.tsx`)
- App routes → Recurring recipe view: renders (evidence: `src/app/app/obligatory-recipes/page.tsx`)
- App routes → Dashboard summary: renders (evidence: `src/app/app/page.tsx`)
- Dashboard summary → Session management: loads user (evidence: `src/app/app/page.tsx`)
- Dashboard summary → Yearly finance chart: renders (evidence: `src/app/app/page.tsx`)
- Dashboard summary → Upcoming obligations: renders (evidence: `src/app/app/page.tsx`)
- Yearly finance chart → Expense actions: requests yearly data (evidence: `src/components/charts/ExpenseYearlyChart.tsx`)
- Yearly finance chart → Recurring expense actions: requests obligations (evidence: `src/components/charts/ExpenseYearlyChart.tsx`)
- Yearly finance chart → Recipe actions: requests recipe totals (evidence: `src/components/charts/ExpenseYearlyChart.tsx`)
- Yearly finance chart → Recurring recipe actions: requests recurring recipes (evidence: `src/components/charts/ExpenseYearlyChart.tsx`)
- Upcoming obligations → Recurring expense actions: loads obligations (evidence: `src/components/elements/UpcomingObligatoryExpenses.tsx`)
- Upcoming obligations → Recurring recipe actions: loads recipes (evidence: `src/components/elements/UpcomingObligatoryExpenses.tsx`)
- Expense history view → Expense actions: loads and creates (evidence: `src/components/pages/ExpensePageView.tsx`)
- Expense history view → Expense form: renders (evidence: `src/components/pages/ExpensePageView.tsx`)
- Expense form → Expense validation: validates with (evidence: `src/components/forms/ExpenseForm.tsx`)
- Expense actions → Application database: reads and writes (evidence: `src/actions/expense.action.ts`)
- Recurring expense view → Recurring expense actions: manages obligations (evidence: `src/components/pages/ObligatoryExpensePageView.tsx`)
- Recurring expense view → Recurring expense form: renders (evidence: `src/components/pages/ObligatoryExpensePageView.tsx`)
- Recurring expense actions → Application database: reads and writes (evidence: `src/actions/obligatoryExpense.action.ts`)
- Recipe income view → Recipe actions: manages recipes (evidence: `src/components/pages/RecipePageView.tsx`)
- Recipe actions → Application database: reads and writes (evidence: `src/actions/recipe.action.ts`)
- Recurring recipe view → Recurring recipe actions: manages recurring recipes (evidence: `src/components/pages/ObligatoryRecipesPageView.tsx`)
- Recurring recipe actions → Application database: reads and writes (evidence: `src/actions/obligatoryRecipe.action.ts`)
- Session management → Application database: looks up user (evidence: `src/lib/session.ts`)
