# rprogs/pocket-planner architecture

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

- Interactive diagram: https://gitdiagram.com/rprogs/pocket-planner
- Repository: https://github.com/rprogs/pocket-planner

## Overview

Pocket Adviser is a local financial-planning MVP: users enter or review household financial information, explore forecasts and user-directed scenarios, and inspect findings, goals, and guidance. The sampled app excerpt shows route dispatch and findings display; core excerpts show projection and simulated-range calculations, while the README documents additional regulatory and advice-boundary features. Those features are represented at the app level, but their detailed wiring is not established by the excerpts.

Main entry points: [`src/app.mjs`](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs) (App shell), [`src/storage.mjs`](https://github.com/rprogs/pocket-planner/blob/main/src/storage.mjs) (State persistence), [`server.mjs`](https://github.com/rprogs/pocket-planner/blob/main/server.mjs) (Static file server), [`src/core.mjs`](https://github.com/rprogs/pocket-planner/blob/main/src/core.mjs) (Simulated range)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Planning experience"]
  node_app["App shell<br/>[app.mjs]"]
  node_financial_life["Financial Life<br/>[app.mjs]"]
  node_forecast["Plan &amp; Forecast<br/>[app.mjs]"]
  node_review["Review &amp; Report<br/>[app.mjs]"]
  node_decision["Decision Lab<br/>[app.mjs]"]
  node_goals["Goals &amp; Planning<br/>[app.mjs]"]
  node_assistant_guidance["Assistant &amp; Guidance<br/>[app.mjs]"]
  node_settings["Settings<br/>[app.mjs]"]
end

subgraph group_analysis["Financial analysis"]
  node_core["Planning calculations<br/>[core.mjs]"]
  node_projection["Financial projection<br/>[core.mjs]"]
  node_simulated_range["Simulated range<br/>[core.mjs]"]
end

subgraph group_persistence["Local data"]
  node_storage["State persistence<br/>[storage.mjs]"]
  node_browser_store[("Browser local storage")]
end

subgraph group_delivery["Local delivery"]
  node_server["Static file server<br/>[server.mjs]"]
end

node_user(("User"))
node_browser(("Browser"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_financial_life
node_app -->|"routes to"| node_forecast
node_app -->|"routes to"| node_review
node_app -->|"routes to"| node_decision
node_app -->|"routes to"| node_goals
node_app -->|"routes to"| node_assistant_guidance
node_app -->|"routes to"| node_settings
node_app -->|"requests findings"| node_core
node_app -->|"loads state"| node_storage
node_storage -->|"reads and writes"| node_browser_store
node_simulated_range -->|"runs projections"| node_projection
node_server -->|"serves app files"| node_browser
node_browser -->|"requests files"| node_server

click node_app "https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs"
click node_financial_life "https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs"
click node_forecast "https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs"
click node_review "https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs"
click node_decision "https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs"
click node_goals "https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs"
click node_assistant_guidance "https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs"
click node_settings "https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs"
click node_core "https://github.com/rprogs/pocket-planner/blob/main/src/core.mjs"
click node_projection "https://github.com/rprogs/pocket-planner/blob/main/src/core.mjs"
click node_simulated_range "https://github.com/rprogs/pocket-planner/blob/main/src/core.mjs"
click node_storage "https://github.com/rprogs/pocket-planner/blob/main/src/storage.mjs"
click node_server "https://github.com/rprogs/pocket-planner/blob/main/server.mjs"

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_financial_life,node_forecast,node_review,node_decision,node_goals,node_assistant_guidance,node_settings,node_user,node_browser toneBlue
class node_core,node_projection,node_simulated_range toneAmber
class node_storage,node_browser_store toneMint
class node_server toneRose
```

## Components

### Planning experience

- [App shell](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs): `src/app.mjs`
- [Financial Life](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs): `src/app.mjs`
- [Plan & Forecast](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs): `src/app.mjs`
- [Review & Report](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs): `src/app.mjs`
- [Decision Lab](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs): `src/app.mjs`
- [Goals & Planning](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs): `src/app.mjs`
- [Assistant & Guidance](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs): `src/app.mjs`
- [Settings](https://github.com/rprogs/pocket-planner/blob/main/src/app.mjs): `src/app.mjs`

### Financial analysis

- [Planning calculations](https://github.com/rprogs/pocket-planner/blob/main/src/core.mjs): `src/core.mjs`
- [Financial projection](https://github.com/rprogs/pocket-planner/blob/main/src/core.mjs): `src/core.mjs`
- [Simulated range](https://github.com/rprogs/pocket-planner/blob/main/src/core.mjs): `src/core.mjs`

### Local data

- [State persistence](https://github.com/rprogs/pocket-planner/blob/main/src/storage.mjs): `src/storage.mjs`
- **Browser local storage**

### Local delivery

- [Static file server](https://github.com/rprogs/pocket-planner/blob/main/server.mjs): `server.mjs`

### Other components

- **User**
- **Browser**

## Connections

- User → App shell: uses
- App shell → Financial Life: routes to
- App shell → Plan & Forecast: routes to
- App shell → Review & Report: routes to
- App shell → Decision Lab: routes to
- App shell → Goals & Planning: routes to
- App shell → Assistant & Guidance: routes to
- App shell → Settings: routes to
- App shell → Planning calculations: requests findings
- App shell → State persistence: loads state
- State persistence → Browser local storage: reads and writes
- Simulated range → Financial projection: runs projections
- Static file server → Browser: serves app files
- Browser → Static file server: requests files
