Files

2.2 KiB

phase, plan, subsystem, tags, dependency_graph, tech_stack, key_files, decisions, metrics
phase plan subsystem tags dependency_graph tech_stack key_files decisions metrics
06-preset-data-first-run-detection-and-db-safety 02 data
presets
i18n
static-data
requires provides affects
PresetItem
PRESETS
src/data/presets.ts
src/i18n/en.json
src/i18n/de.json
added patterns
static-data-module
i18n-dot-path
created modified
src/data/presets.ts
src/i18n/en.json
src/i18n/de.json
item_tier restricted to fixed|variable only (no one_off) to match DB check constraint on template_items
presets.{type}.{slug} i18n key structure matches type+slug fields in PRESETS array
duration completed tasks_completed files_changed
~5 minutes 2026-04-20 2 3

Phase 06 Plan 02: Preset Data Library Summary

Static 19-item preset budget library with English and German translations, structured as presets.{type}.{slug} i18n keys matching the PRESETS array shape.

Tasks Completed

Task Name Commit Files
1 Create src/data/presets.ts 3bc7782 src/data/presets.ts (created)
2 Add preset translations to en.json and de.json d235080 src/i18n/en.json, src/i18n/de.json

What Was Built

src/data/presets.ts exports PresetItem interface and PRESETS array with exactly 19 items:

  • 4 income, 4 bill, 5 variable_expense, 2 debt, 2 saving, 2 investment
  • All item_tier values are "fixed" or "variable" (no "one_off")
  • Pure static module — no Supabase or React imports

Both i18n files now have a top-level "presets" key with nested {type}.{slug} structure covering all 19 slugs in English and German.

Deviations from Plan

None - plan executed exactly as written.

Threat Surface Scan

No new network endpoints, auth paths, or trust boundaries introduced. T-06-05 (JSON malformed) mitigated — both files verified valid via node -e "JSON.parse(...)" before commit.

Self-Check: PASSED

  • src/data/presets.ts: FOUND
  • src/i18n/en.json "presets" key: FOUND
  • src/i18n/de.json "presets" key: FOUND
  • 19 PRESETS items confirmed (grep '{ slug:' returns 19)
  • no one_off in presets.ts confirmed
  • tsc --noEmit: PASSED
  • Commits 3bc7782 and d235080: confirmed in git log