2.3 KiB
2.3 KiB
Impact Map
Aktualizacja: 2026-07-06 (post-apply Plan 2 — degraded)
Kontekst
CodeIgniter 4.7.3 + MySQL (.env). Radar degraded — brak indeksu codebase-memory-mcp; weryfikacja runtime.
Moduły
Finanse bieżące (Plan 1)
- Kategorie/operacje:
app/Models/{Category,Operation}Model.php,app/Controllers/{Categories,Operations}.php, tabelecategories/operations. - Pulpit finansów:
Dashboard::finances→app/Views/dashboard/finances.php, trasa/finances.
Inwestycje (Plan 2)
- Instrumenty:
InstrumentModel(withStats,portfolioTimeline,hasChildren),Instruments.php, widokiinstruments/, tabelainv_instruments. - Operacje:
InvOperationModel,InvOperations.php, widokiinv_operations/, tabelainv_operations(FK RESTRICT → inv_instruments). - Wyceny:
ValuationModel,Valuations.php, widokivaluations/, tabelainv_valuations(FK RESTRICT → inv_instruments). - Pulpit inwestycji:
Investments::index→investments/index.php, trasa/investments.
Pulpit globalny
Dashboard::index→app/Views/dashboard/index.php, trasy/i/dashboard. Majątek = saldo bieżące (OperationModel::totals) + wartość inwestycji (InstrumentModel::withStats).
Routing / nawigacja
app/Config/Routes.php— grupaauth:/,dashboard,finances,operations/*,categories/*,investments,instruments/*,investments/operations/*,investments/valuations/*.app/Views/layout/main.php— top-level „Pulpit" + dropdowny „Finanse bieżące" / „Inwestycje".
Dane / config
- MySQL z
.env(dev →db_host_remote, prod →db_host) wDatabase.php. - Tabele inwestycji:
inv_instruments(name unique),inv_operations(instrument_id, date, amount, type enum deposit/withdraw),inv_valuations(instrument_id, date, value).
Ukryte sprzężenia
- Zarobek netto liczony wyłącznie w
InstrumentModel::withStats— kontrolery/widoki konsumują (jedno źródło prawdy). - FK RESTRICT: instrument z operacjami/wycenami nieusuwalny (spójne z blokadą w
Instruments::delete). - Pulpit globalny zależny od obu domen (finanse + inwestycje).
Weryfikacja manualna
- Migracje
inv_*; CRUD 3 encji; filtry; blokada usunięcia; wzór zarobku; pulpity/dashboard,/finances,/investments.