# davidoloyede/money-quiz-new architecture

> Architecture diagram of the GitHub repository davidoloyede/money-quiz-new, 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/davidoloyede/money-quiz-new
- Repository: https://github.com/davidoloyede/money-quiz-new

## Overview

Manna Money is a personal-finance app with web and mobile clients. Its main workflow is importing bank transactions by local CSV or optional Plaid connection, categorizing and reviewing them, then exploring spending insights and a data-generated quiz. The web shell also exposes yearly views, faith-informed giving and scripture features, budgets, recurring charges, and account-backed sync. Source excerpts show the web entry point, shared store, storage behavior, API registration, and Plaid helper; several feature and route relationships below are documented in the README rather than verified in sampled implementation.

Main entry points: [`src/App.tsx`](https://github.com/davidoloyede/money-quiz-new/blob/main/src/App.tsx) (Web app shell), [`server/src/index.ts`](https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/index.ts) (Node API), [`src/components/Dashboard.tsx`](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/Dashboard.tsx) (Dashboard insights), [`packages/core/store.tsx`](https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/store.tsx) (Transaction state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["App clients"]
  node_webapp["Web app shell<br/>[App.tsx]"]
  node_mobileapp["Mobile app<br/>[dashboard.tsx]"]
end

subgraph group_transactions["Transaction workflow"]
  node_importui["Import experience<br/>[ImportView.tsx]"]
  node_csv["CSV parsing<br/>[importCsv.ts]"]
  node_plaidui["Bank connection UI<br/>[ConnectBank.tsx]"]
  node_categorize["Categorization<br/>[categorize.ts]"]
  node_transferreview["Transfer review<br/>[transferReview.ts]"]
end

subgraph group_insights["Financial insights"]
  node_dashboard["Dashboard insights<br/>[Dashboard.tsx]"]
  node_analysis["Spending analysis<br/>[analysis.ts]"]
  node_quiz["Personalized quiz<br/>[QuizView.tsx]"]
  node_year["Year sheet<br/>[YearSheetView.tsx]"]
  node_giving["Giving and debt<br/>[GivingCard.tsx]"]
  node_recurring["Recurring charges<br/>[RecurringCard.tsx]"]
end

subgraph group_shared["Shared core and state"]
  node_store["Transaction state<br/>[store.tsx]"]
  node_storage[("Local persistence<br/>[storage.ts]")]
end

subgraph group_services["Account and bank services"]
  node_auth["Sign-in<br/>[auth.tsx]"]
  node_sync["Cloud sync<br/>[SyncGate.tsx]"]
  node_api["Node API<br/>[index.ts]"]
  node_authverify["JWT verification<br/>[middleware.ts]"]
  node_plaidroutes["Plaid routes<br/>[plaid.ts]"]
  node_plaidclient["Plaid client<br/>[client.ts]"]
  node_db[("PostgreSQL store<br/>[client.ts]")]
  node_events["Activity tracking<br/>[track.ts]"]
end

node_person(("User"))

node_person -->|"uses"| node_webapp
node_person -.->|"uses"| node_mobileapp
node_webapp -->|"shows"| node_importui
node_webapp -->|"shows"| node_dashboard
node_webapp -->|"shows"| node_year
node_webapp -->|"shows"| node_quiz
node_person -->|"imports data"| node_importui
node_importui -->|"parses CSV"| node_csv
node_importui -->|"connects bank"| node_plaidui
node_plaidui -->|"requests connection"| node_api
node_csv -->|"categorizes rows"| node_categorize
node_store -->|"uses"| node_categorize
node_store -->|"persists state"| node_storage
node_store -->|"uses"| node_analysis
node_person -->|"reviews transfers"| node_transferreview
node_dashboard -->|"presents insights"| node_analysis
node_person -->|"takes quiz"| node_quiz
node_quiz -->|"uses personal data"| node_store
node_person -->|"views yearly totals"| node_year
node_dashboard -->|"includes"| node_giving
node_dashboard -->|"includes"| node_recurring
node_person -->|"signs in"| node_auth
node_auth -->|"enables account sync"| node_sync
node_sync -->|"syncs data"| node_api
node_api -->|"registers routes"| node_authverify
node_api -->|"registers routes"| node_plaidroutes
node_plaidroutes -->|"calls"| node_plaidclient
node_plaidroutes -->|"uses"| node_db
node_api -.->|"serves PostgreSQL features"| node_db
node_webapp -->|"records activity"| node_events
node_events -->|"posts events"| node_api

click node_webapp "https://github.com/davidoloyede/money-quiz-new/blob/main/src/App.tsx"
click node_mobileapp "https://github.com/davidoloyede/money-quiz-new/blob/main/apps/mobile/src/app/(tabs)/dashboard.tsx"
click node_importui "https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/ImportView.tsx"
click node_csv "https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/importCsv.ts"
click node_plaidui "https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/ConnectBank.tsx"
click node_categorize "https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/categorize.ts"
click node_transferreview "https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/transferReview.ts"
click node_store "https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/store.tsx"
click node_storage "https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/storage.ts"
click node_dashboard "https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/Dashboard.tsx"
click node_analysis "https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/analysis.ts"
click node_quiz "https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/QuizView.tsx"
click node_year "https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/YearSheetView.tsx"
click node_giving "https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/GivingCard.tsx"
click node_recurring "https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/RecurringCard.tsx"
click node_auth "https://github.com/davidoloyede/money-quiz-new/blob/main/src/auth.tsx"
click node_sync "https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/SyncGate.tsx"
click node_api "https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/index.ts"
click node_authverify "https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/auth/middleware.ts"
click node_plaidroutes "https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/routes/plaid.ts"
click node_plaidclient "https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/plaid/client.ts"
click node_db "https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/db/client.ts"
click node_events "https://github.com/davidoloyede/money-quiz-new/blob/main/src/lib/track.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_webapp,node_mobileapp,node_person toneBlue
class node_importui,node_csv,node_plaidui,node_categorize,node_transferreview toneAmber
class node_dashboard,node_analysis,node_quiz,node_year,node_giving,node_recurring toneMint
class node_store,node_storage toneRose
class node_auth,node_sync,node_api,node_authverify,node_plaidroutes,node_plaidclient,node_db,node_events toneIndigo
```

## Components

### App clients

- [Web app shell](https://github.com/davidoloyede/money-quiz-new/blob/main/src/App.tsx): `src/App.tsx`
- [Mobile app](https://github.com/davidoloyede/money-quiz-new/blob/main/apps/mobile/src/app/(tabs)/dashboard.tsx): `apps/mobile/src/app/(tabs)/dashboard.tsx`

### Transaction workflow

- [Import experience](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/ImportView.tsx): `src/components/ImportView.tsx`
- [CSV parsing](https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/importCsv.ts): `packages/core/lib/importCsv.ts`
- [Bank connection UI](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/ConnectBank.tsx): `src/components/ConnectBank.tsx`
- [Categorization](https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/categorize.ts): `packages/core/lib/categorize.ts`
- [Transfer review](https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/transferReview.ts): `packages/core/lib/transferReview.ts`

### Financial insights

- [Dashboard insights](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/Dashboard.tsx): `src/components/Dashboard.tsx`
- [Spending analysis](https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/analysis.ts): `packages/core/lib/analysis.ts`
- [Personalized quiz](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/QuizView.tsx): `src/components/QuizView.tsx`
- [Year sheet](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/YearSheetView.tsx): `src/components/YearSheetView.tsx`
- [Giving and debt](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/GivingCard.tsx): `src/components/GivingCard.tsx`
- [Recurring charges](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/RecurringCard.tsx): `src/components/RecurringCard.tsx`

### Shared core and state

- [Transaction state](https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/store.tsx): `packages/core/store.tsx`
- [Local persistence](https://github.com/davidoloyede/money-quiz-new/blob/main/packages/core/lib/storage.ts): `packages/core/lib/storage.ts`

### Account and bank services

- [Sign-in](https://github.com/davidoloyede/money-quiz-new/blob/main/src/auth.tsx): `src/auth.tsx`
- [Cloud sync](https://github.com/davidoloyede/money-quiz-new/blob/main/src/components/SyncGate.tsx): `src/components/SyncGate.tsx`
- [Node API](https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/index.ts): `server/src/index.ts`
- [JWT verification](https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/auth/middleware.ts): `server/src/auth/middleware.ts`
- [Plaid routes](https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/routes/plaid.ts): `server/src/routes/plaid.ts`
- [Plaid client](https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/plaid/client.ts): `server/src/plaid/client.ts`
- [PostgreSQL store](https://github.com/davidoloyede/money-quiz-new/blob/main/server/src/db/client.ts): `server/src/db/client.ts`
- [Activity tracking](https://github.com/davidoloyede/money-quiz-new/blob/main/src/lib/track.ts): `src/lib/track.ts`

### Other components

- **User**

## Connections

- User → Web app shell: uses (evidence: `README.md`)
- User → Mobile app: uses
- Web app shell → Import experience: shows (evidence: `src/App.tsx`)
- Web app shell → Dashboard insights: shows (evidence: `src/App.tsx`)
- Web app shell → Year sheet: shows (evidence: `src/App.tsx`)
- Web app shell → Personalized quiz: shows (evidence: `src/App.tsx`)
- User → Import experience: imports data (evidence: `README.md`)
- Import experience → CSV parsing: parses CSV (evidence: `README.md`)
- Import experience → Bank connection UI: connects bank (evidence: `README.md`)
- Bank connection UI → Node API: requests connection (evidence: `README.md`)
- CSV parsing → Categorization: categorizes rows (evidence: `README.md`)
- Transaction state → Categorization: uses (evidence: `packages/core/store.tsx`)
- Transaction state → Local persistence: persists state (evidence: `packages/core/lib/storage.ts`)
- Transaction state → Spending analysis: uses (evidence: `packages/core/store.tsx`)
- User → Transfer review: reviews transfers (evidence: `README.md`)
- Dashboard insights → Spending analysis: presents insights (evidence: `README.md`)
- User → Personalized quiz: takes quiz (evidence: `README.md`)
- Personalized quiz → Transaction state: uses personal data (evidence: `README.md`)
- User → Year sheet: views yearly totals (evidence: `README.md`)
- Dashboard insights → Giving and debt: includes (evidence: `README.md`)
- Dashboard insights → Recurring charges: includes (evidence: `README.md`)
- User → Sign-in: signs in (evidence: `README.md`)
- Sign-in → Cloud sync: enables account sync (evidence: `README.md`)
- Cloud sync → Node API: syncs data (evidence: `README.md`)
- Node API → JWT verification: registers routes (evidence: `server/src/index.ts`)
- Node API → Plaid routes: registers routes (evidence: `server/src/index.ts`)
- Plaid routes → Plaid client: calls (evidence: `server/src/routes/plaid.ts`)
- Plaid routes → PostgreSQL store: uses (evidence: `server/src/routes/plaid.ts`)
- Node API → PostgreSQL store: serves PostgreSQL features
- Web app shell → Activity tracking: records activity (evidence: `src/App.tsx`)
- Activity tracking → Node API: posts events (evidence: `src/lib/track.ts`)
