FireTracker / PLAN.md
smlflg's picture
Initial public upload from Projekte/FireTracker
f91bd05 verified
|
Raw History Blame Contribute Delete
4.33 kB
# FireTracker β€” FIRE Dashboard mit ADHS-Twist
## Vision
Modularer FIRE-Tracker: 4 Zahlen eingeben, sofort sehen wann du frei bist.
Assets (Depots, Immobilien, Cash) als Module β€” beliebig viele, easy add/remove.
## Tech Stack
- **Backend:** Python 3.12 + FastAPI + SQLite (wie StudyAgent β€” bekannter Stack)
- **Frontend:** htmx + Jinja2 + Tailwind CSS (kein JS-Framework)
- **Charts:** Chart.js (CDN, lightweight)
- **Auth:** Keine (single-user, self-hosted). Optional spΓ€ter.
## Datenmodell
### User Profile
- `monthly_income` (netto)
- `monthly_expenses`
- `birth_year`
- `target_retirement_age` (optional, fΓΌr Coast FIRE)
- `swr` (Safe Withdrawal Rate, default 4%)
- `expected_return` (default 7% nominal)
- `inflation` (default 2%)
### Asset (modulare Bausteine)
- `id`, `name`, `type` (depot | immobilie | cash | crypto | pension | other)
- `current_value`
- `monthly_contribution`
- `expected_return_override` (optional, pro Asset)
- `notes`
- `created_at`, `updated_at`
### Snapshot (monatlicher Verlauf)
- `id`, `asset_id`, `date`, `value`
- Ermoeglicht historische Charts pro Asset und gesamt
### Expense Category (optional, V2)
- `id`, `name`, `monthly_amount`, `is_fire_expense` (bool β€” manche Ausgaben fallen bei FIRE weg)
## FIRE Metrics (berechnet, nicht gespeichert)
- **FI Number:** `(monthly_expenses * 12) / swr`
- **Total Portfolio:** sum of all asset values
- **FI Percentage:** `portfolio / fi_number * 100`
- **Savings Rate:** `(income - expenses) / income * 100`
- **Time to FI:** compound growth projection
- **Coast FIRE Number:** `fi_number / (1 + real_return)^years_to_retirement`
- **Lean FIRE:** FI Number mit 80% der Ausgaben
- **Fat FIRE:** FI Number mit 120% der Ausgaben
## Screens (V1)
### 1. Dashboard (Hauptseite)
- Grosser FI-Percentage Fortschrittsbalken (visuell, farbig)
- FI-Datum prominent ("Frei ab: MΓ€rz 2041")
- Savings Rate Gauge
- Net Worth Trend (Chart.js Line Chart)
- Asset-Uebersicht als Karten (Depot1: 45k, Immo1: 180k, ...)
### 2. Assets verwalten
- Liste aller Assets mit Type-Icons
- "+" Button zum Hinzufuegen
- Inline-Edit (htmx) fuer Werte aktualisieren
- Monatlichen Snapshot eintragen (oder auto aus letztem Wert)
### 3. Einstellungen
- Profil-Daten (Einkommen, Ausgaben, Alter)
- FIRE-Parameter (SWR, Return, Inflation)
- Import/Export (JSON)
### 4. Szenarien (V1.5)
- Schieberegler: "Was wenn ich X mehr spare?"
- Vergleich: aktueller Plan vs. Szenario
## ADHS-UX Prinzipien
- **4 Inputs β†’ Ergebnis:** Sofort FI-Datum nach Ersteinrichtung
- **Progressive Disclosure:** Setup-Wizard (3 Steps), Details spΓ€ter
- **Micro-Rewards:** Fortschrittsbalken-Animation, Meilenstein-Messages
- **Smart Defaults:** 4% SWR, 7% Return, 2% Inflation vorausgefuellt
- **One Action per View:** Klare Hierarchie, kein Dashboard-Overload
- **Farben statt Zahlen:** Gruen = on track, Gelb = langsamer, Rot = Rueckschritt
## Projektstruktur
```
FireTracker/
β”œβ”€β”€ main.py # FastAPI app + routes
β”œβ”€β”€ models.py # SQLAlchemy/SQLite models
β”œβ”€β”€ schemas.py # Pydantic schemas
β”œβ”€β”€ fire_math.py # FIRE calculations (pure functions)
β”œβ”€β”€ database.py # DB setup + session
β”œβ”€β”€ templates/
β”‚ β”œβ”€β”€ base.html # Layout + Tailwind + htmx
β”‚ β”œβ”€β”€ dashboard.html # Hauptseite
β”‚ β”œβ”€β”€ assets.html # Asset-Verwaltung
β”‚ β”œβ”€β”€ setup.html # Ersteinrichtung (Wizard)
β”‚ └── settings.html # Einstellungen
β”œβ”€β”€ static/
β”‚ └── style.css # Custom styles (minimal)
β”œβ”€β”€ seed.py # Demo-Daten fuer Entwicklung
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ PLAN.md
└── FOR_SMLFLG.md
```
## Implementation Order
1. **fire_math.py** β€” Pure FIRE-Berechnungen, testbar ohne DB
2. **models.py + database.py** β€” Datenmodell
3. **main.py** β€” FastAPI routes + CRUD
4. **templates/setup.html** β€” Ersteinrichtung Wizard
5. **templates/dashboard.html** β€” Hauptseite mit Charts
6. **templates/assets.html** β€” Asset CRUD
7. **seed.py** β€” Demo-Daten (Samuels Szenario)
8. **Polish** β€” Farben, Animationen, Responsive
## V2 Ideas (NICHT jetzt)
- Bank CSV Import
- Automatische Snapshots (Cron)
- Expense Categories mit "faellt bei FIRE weg" Flag
- Monte Carlo Simulation
- Multi-User + Auth
- Mobile PWA