|
Download FOR_SMLFLG.md from smlflg/FireTracker: direct link, hf CLI and curl.
- Browser
- Download file 3.85 kB
-
https://huggingface.co/smlflg/FireTracker/resolve/main/FOR_SMLFLG.md
- Command line
-
hf download hf://smlflg/FireTracker/FOR_SMLFLG.md
-
curl -L -o FOR_SMLFLG.md https://huggingface.co/smlflg/FireTracker/resolve/main/FOR_SMLFLG.md
3.85 kB
| # FireTracker | |
| ## Was ist das? | |
| FIRE-Rechner mit ADHS-Twist: 3 Zahlen eingeben, sofort sehen wann du finanziell frei bist. | |
| Assets (Depots, Immobilien, Cash) als Module, Szenario-Slider, 30-Jahres-Projektion β alles lokal, kein Cloud-Account. | |
| ## Architektur & Tech-Stack | |
| ``` | |
| Browser (Tailwind + htmx + Chart.js) | |
| | | |
| FastAPI main.py | |
| | | |
| βββ fire_math.py β reine FIRE-Berechnungen (pure functions) | |
| βββ models.py β SQLAlchemy: UserProfile, Asset, Snapshot | |
| βββ schemas.py β Pydantic: AssetCreate, AssetUpdate, SnapshotCreate | |
| βββ database.py β SQLite init + Session | |
| | | |
| firetracker.db | |
| ``` | |
| | Schicht | Tech | | |
| |---------|------| | |
| | Backend | FastAPI + SQLAlchemy + SQLite | | |
| | Frontend | htmx + Jinja2 + Tailwind CSS | | |
| | Charts | Chart.js (CDN) | | |
| | FIRE-Logik | fire_math.py (pure Python, kein Framework) | | |
| **Asset-Typen:** depot, immobilie, cash, crypto, pension, other | |
| **FIRE-Metriken (berechnet, nicht gespeichert):** | |
| - FI Number, Lean/Fat/Coast FIRE, FI%, Savings Rate, Years to FI, FI Date | |
| - Monatliche Compound-Growth-Iteration (12 Schritte/Jahr) fuer Genauigkeit | |
| ## Starten / Nutzen | |
| ```bash | |
| cd ~/Projekte/FireTracker | |
| source .venv/bin/activate # oder: python3 -m venv .venv && pip install -r requirements.txt | |
| uvicorn main:app --reload --port 8050 | |
| # β http://localhost:8050 | |
| ``` | |
| Erststart leitet automatisch auf `/setup` weiter (3 Felder: Einkommen, Ausgaben, Geburtsjahr). | |
| ## Was funktioniert | |
| - **Setup-Wizard** (`/setup`) β 3 Felder, dann sofort Dashboard | |
| - **Dashboard** β FI-%, FI-Datum, Savings Rate, 30J-Projektion, Asset-Uebersicht nach Typ gruppiert | |
| - **Assets CRUD** β erstellen, bearbeiten (htmx inline), loeschen; Snapshot wird automatisch angelegt | |
| - **Snapshot-Historie** β Wertaenderungen werden als Verlauf gespeichert | |
| - **Szenario-API** (`/api/scenario`) β "Was wenn ich X mehr spare?" mit diff_years-Berechnung | |
| - **CSV-Import** (`/api/import/csv`) β deutsche Bankformate (Semikolon, Komma als Dezimaltrenner) | |
| - **JSON-Export** (`/api/export`) β Profil + Assets + Snapshots als Backup | |
| - **Settings-Seite** β alle FIRE-Parameter aenderbar (SWR, Return, Inflation, Rentenalter) | |
| ## Was fehlt | |
| - ~~seed.py~~ β erledigt (103 LOC), erstellt Demo-Profil + 5 Assets (251.7k gesamt), idempotent | |
| - ~~fi_date Edge-Case~~ β gefixt: Overflow via extra_years-Berechnung (fire_math.py:53-57), 4 Tests gruen | |
| - **Historische Charts** pro Asset β Snapshots sind in DB, UI-Chart noch nicht implementiert | |
| - **Expense Categories** β "faellt bei FIRE weg"-Flag fuer bestimmte Ausgaben (V2 geplant) | |
| - **Tests** β 17 Math-Tests passing (test_fire_math.py, 267 LOC) + 3 Playwright E2E-Tests (tests/test_e2e.py, setup/dashboard/asset flow). E2E braucht `playwright install chromium`. Keine Route/API-Tests. | |
| ## Entscheidungen & Lessons Learned | |
| - **fire_math.py als pure functions** β keine DB-Referenzen, direkt testbar, einfach zu verstehen | |
| - **Monatliche Iteration statt Formel** β Compound-Growth-Projektion Monat fuer Monat statt geschlossener Formel: leichter lesbar, minimal langsamer (irrelevant bei 100-Jahres-Cap) | |
| - **Single UserProfile** β kein Multi-User, kein Auth; `get_or_create_profile()` erstellt Samuel-Profil beim ersten Request | |
| - **Snapshot bei Wertaenderung** β nur wenn `current_value != old_value`, kein Snapshot-Spam | |
| - **htmx fuer Asset-CRUD** β kein SPA-Overhead, Server rendert Partial (`partials/asset_list.html`) und tauscht DOM-Block | |
| - **Gleicher Stack wie StudyAgent** (FastAPI+SQLite+htmx) β schnelle Entwicklung durch bekannte Patterns | |
| ## Next Steps (priorisiert) | |
| 1. ~~fi_date Edge-Case fixen~~ β erledigt | |
| 2. **Route/API-Tests** β httpx TestClient fuer POST/PUT/DELETE Endpunkte | |
| 3. **Historische Chart** pro Asset aus Snapshot-Tabelle | |
| 4. **Bank-API** (GoCardless/Nordigen PSD2) fuer automatischen Import | |