first commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# 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`, tabele `categories`/`operations`.
|
||||
- Pulpit finansów: `Dashboard::finances` → `app/Views/dashboard/finances.php`, trasa `/finances`.
|
||||
|
||||
### Inwestycje (Plan 2)
|
||||
- Instrumenty: `InstrumentModel` (`withStats`, `portfolioTimeline`, `hasChildren`), `Instruments.php`, widoki `instruments/`, tabela `inv_instruments`.
|
||||
- Operacje: `InvOperationModel`, `InvOperations.php`, widoki `inv_operations/`, tabela `inv_operations` (FK RESTRICT → inv_instruments).
|
||||
- Wyceny: `ValuationModel`, `Valuations.php`, widoki `valuations/`, tabela `inv_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` — grupa `auth`: `/`, `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`) w `Database.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`.
|
||||
Reference in New Issue
Block a user