# esguerrajustin/cashmate architecture

> Architecture diagram of the GitHub repository esguerrajustin/cashmate, 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/esguerrajustin/cashmate
- Repository: https://github.com/esguerrajustin/cashmate

## Overview

CashMate is an Ionic/Angular budgeting app where users authenticate, manage period-based budgets and savings, and review summaries. Routing and an auth guard lead into the protected budget views; those views use shared budget calculations and a Firestore data service backed by Firebase. The README documents password reset, recurring expenses, rollover, goals, and category search/filter; some of those implementations were not sampled, so their detailed internal links are omitted.

Main entry points: [`src/app/app.routes.ts`](https://github.com/esguerrajustin/cashmate/blob/main/src/app/app.routes.ts) (Route configuration), [`src/app/services/firestore-data.service.ts`](https://github.com/esguerrajustin/cashmate/blob/main/src/app/services/firestore-data.service.ts) (Firestore data service), [`src/app/pages/dashboard/dashboard.page.ts`](https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/dashboard/dashboard.page.ts) (Budget dashboard), [`src/app/pages/auth/auth.page.ts`](https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/auth/auth.page.ts) (Account signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_bootstrap["App bootstrap<br/>[main.ts]"]
  node_routing["Route configuration<br/>[app.routes.ts]"]
  node_guard["Auth guard<br/>[auth.guard.ts]"]
end

subgraph group_identity["Account access"]
  node_welcome["Sign-in<br/>[welcome.page.ts]"]
  node_signup["Account signup<br/>[auth.page.ts]"]
  node_password_request["Password reset request"]
  node_password_landing["Reset landing"]
  node_firebase_auth["Firebase Auth"]
end

subgraph group_budget["Budget experience"]
  node_dashboard["Budget dashboard<br/>[dashboard.page.ts]"]
  node_overview["Dashboard overview"]
  node_budget_rules["Budget calculations<br/>[budget.model.ts]"]
end

subgraph group_data["Budget data"]
  node_data_service["Firestore data service"]
  node_firestore[("Cloud Firestore")]
  node_firebase_config["Firebase configuration<br/>[environment.ts]"]
end

node_user(("Budget user"))

node_user -->|"navigates"| node_routing
node_bootstrap -->|"registers routes"| node_routing
node_routing -->|"routes to"| node_welcome
node_routing -->|"routes to"| node_signup
node_routing -->|"routes to"| node_password_request
node_routing -->|"routes to"| node_password_landing
node_routing -->|"routes to"| node_dashboard
node_routing -->|"routes to"| node_overview
node_routing -->|"protects routes"| node_guard
node_guard -->|"checks session"| node_firebase_auth
node_signup -->|"creates account"| node_firebase_auth
node_signup -->|"saves settings"| node_data_service
node_welcome -.->|"authenticates"| node_firebase_auth
node_password_request -.->|"requests reset"| node_firebase_auth
node_firebase_auth -.->|"returns after reset"| node_password_landing
node_dashboard -->|"signs out"| node_firebase_auth
node_dashboard -->|"loads and saves"| node_data_service
node_dashboard -->|"calculates budgets"| node_budget_rules
node_overview -->|"watches data"| node_data_service
node_overview -->|"calculates summaries"| node_budget_rules
node_data_service -->|"reads and writes"| node_firestore
node_data_service -->|"tracks user"| node_firebase_auth
node_bootstrap -->|"initializes Firebase"| node_firebase_config

click node_bootstrap "https://github.com/esguerrajustin/cashmate/blob/main/src/main.ts"
click node_routing "https://github.com/esguerrajustin/cashmate/blob/main/src/app/app.routes.ts"
click node_guard "https://github.com/esguerrajustin/cashmate/blob/main/src/app/guards/auth.guard.ts"
click node_welcome "https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/welcome/welcome.page.ts"
click node_signup "https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/auth/auth.page.ts"
click node_password_request "https://github.com/esguerrajustin/cashmate/tree/main/src/app/pages/forgot-password"
click node_password_landing "https://github.com/esguerrajustin/cashmate/tree/main/src/app/pages/reset-password"
click node_dashboard "https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/dashboard/dashboard.page.ts"
click node_overview "https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/dashboard-overview/dashboard-overview.page.ts"
click node_budget_rules "https://github.com/esguerrajustin/cashmate/blob/main/src/app/models/budget.model.ts"
click node_data_service "https://github.com/esguerrajustin/cashmate/blob/main/src/app/services/firestore-data.service.ts"
click node_firebase_config "https://github.com/esguerrajustin/cashmate/blob/main/src/environments/environment.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_bootstrap,node_routing,node_guard,node_user toneBlue
class node_welcome,node_signup,node_password_request,node_password_landing,node_firebase_auth toneAmber
class node_dashboard,node_overview,node_budget_rules toneMint
class node_data_service,node_firestore,node_firebase_config toneRose
```

## Components

### App navigation

- [App bootstrap](https://github.com/esguerrajustin/cashmate/blob/main/src/main.ts): `src/main.ts`
- [Route configuration](https://github.com/esguerrajustin/cashmate/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Auth guard](https://github.com/esguerrajustin/cashmate/blob/main/src/app/guards/auth.guard.ts): `src/app/guards/auth.guard.ts`

### Account access

- [Sign-in](https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/welcome/welcome.page.ts): `src/app/pages/welcome/welcome.page.ts`
- [Account signup](https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/auth/auth.page.ts): `src/app/pages/auth/auth.page.ts`
- [Password reset request](https://github.com/esguerrajustin/cashmate/tree/main/src/app/pages/forgot-password): `src/app/pages/forgot-password`
- [Reset landing](https://github.com/esguerrajustin/cashmate/tree/main/src/app/pages/reset-password): `src/app/pages/reset-password`
- **Firebase Auth**

### Budget experience

- [Budget dashboard](https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/dashboard/dashboard.page.ts): `src/app/pages/dashboard/dashboard.page.ts`
- [Dashboard overview](https://github.com/esguerrajustin/cashmate/blob/main/src/app/pages/dashboard-overview/dashboard-overview.page.ts): `src/app/pages/dashboard-overview/dashboard-overview.page.ts`
- [Budget calculations](https://github.com/esguerrajustin/cashmate/blob/main/src/app/models/budget.model.ts): `src/app/models/budget.model.ts`

### Budget data

- [Firestore data service](https://github.com/esguerrajustin/cashmate/blob/main/src/app/services/firestore-data.service.ts): `src/app/services/firestore-data.service.ts`
- **Cloud Firestore**
- [Firebase configuration](https://github.com/esguerrajustin/cashmate/blob/main/src/environments/environment.ts): `src/environments/environment.ts`

### Other components

- **Budget user**

## Connections

- Budget user → Route configuration: navigates (evidence: `src/app/app.routes.ts`)
- App bootstrap → Route configuration: registers routes (evidence: `src/main.ts`)
- Route configuration → Sign-in: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Account signup: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Password reset request: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Reset landing: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Budget dashboard: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Dashboard overview: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Auth guard: protects routes (evidence: `src/app/app.routes.ts`)
- Auth guard → Firebase Auth: checks session (evidence: `src/app/guards/auth.guard.ts`)
- Account signup → Firebase Auth: creates account (evidence: `src/app/pages/auth/auth.page.ts`)
- Account signup → Firestore data service: saves settings (evidence: `src/app/pages/auth/auth.page.ts`)
- Sign-in → Firebase Auth: authenticates (evidence: `README.md`)
- Password reset request → Firebase Auth: requests reset (evidence: `README.md`)
- Firebase Auth → Reset landing: returns after reset (evidence: `README.md`)
- Budget dashboard → Firebase Auth: signs out (evidence: `src/app/pages/dashboard/dashboard.page.ts`)
- Budget dashboard → Firestore data service: loads and saves (evidence: `src/app/pages/dashboard/dashboard.page.ts`)
- Budget dashboard → Budget calculations: calculates budgets (evidence: `src/app/pages/dashboard/dashboard.page.ts`)
- Dashboard overview → Firestore data service: watches data (evidence: `src/app/pages/dashboard-overview/dashboard-overview.page.ts`)
- Dashboard overview → Budget calculations: calculates summaries (evidence: `src/app/pages/dashboard-overview/dashboard-overview.page.ts`)
- Firestore data service → Cloud Firestore: reads and writes (evidence: `src/app/services/firestore-data.service.ts`)
- Firestore data service → Firebase Auth: tracks user (evidence: `src/app/services/firestore-data.service.ts`)
- App bootstrap → Firebase configuration: initializes Firebase (evidence: `src/main.ts`)
