Imported from kamontat/moneywiz-visualization (
AGENTS.md). Install upstream withnpx skills add kamontat/moneywiz-visualization. Copyright stays with the author.
PROJECT KNOWLEDGE BASE
Updated: 2026-03-15 Commit: 50eefd0 Branch: main
OVERVIEW
SvelteKit 2 + Svelte 5 static site for MoneyWiz SQLite visualization. SQLite ingestion is worker-only. Snapshot data is persisted in IndexedDB.
STRUCTURE
src/
routes/ # +layout.svelte, +page.svelte (dashboard), storage/
components/ # Atomic Design: atoms → molecules → organisms
lib/
apis/ # bank APIs, pipelines, record APIs, SQLite client
app/ # controllers, dashboard, filters, sessions
charts/ # chart adapters, config, themes
components/ # component class helpers, models
currency/ # conversion, rates, models, store
formatters/ # amount, category, date, transaction-type
loggers/ # logger models, constants
notifications/ # notification models and store
providers/ # storage providers (IndexedDB, OPFS)
session/ # session models and persistence
source/sqlite/ # worker protocol/runtime/backends/extractors/writers
themes/ # theme constants, models, state, store
transactions/ # classifier, importer, repository, models
types/ # core shared types
ui/ # UI exports (charts, notifications, themes)
utils/ # utility aggregators
utils/
db/ # IndexedDB abstractions
apis/ # API helpers
states/ # state management primitives
stores/ # store schema and constants
types/ # shared TS utility types
HARD RULES
- SQLite parsing/extraction must run in worker thread only.
src/componentsandsrc/routesmust never importsrc/utilsdirectly.src/utilscan be imported only bysrc/liborsrc/utils.- Non-test source files in
src/libandsrc/utilsmust stay<= 300LOC. - Prefer split folders with
index.tsaggregators for multi-operation modules.
ANTI-PATTERNS
- Type suppression:
as any,@ts-ignore,@ts-expect-error - Empty catch blocks:
catch(e) {} - Deleting failing tests to pass CI
- Importing
$utilsfrom$componentsor routes
REQUIRED REFERENCE DOCS
docs/ARCHITECTURE.md— module boundaries, dependency rules, storage modeldocs/schema/README.md— SQLite schema, data parser rules, SQL queries
COMMANDS
bun run dev # Start dev server (port 5173)
bun run fix # Auto-fix format + lint
bun run check # All quality gates
bun run build # Static build
bun run test:unit # Vitest unit tests
bun run test:e2e # Playwright e2e tests
QUALITY GATES
bun run check must pass:
- format check (prettier)
- lint check (eslint)
- import boundary check
- LOC check (≤300 lines)
- svelte-check
CONVENTIONS
- Tabs, no semicolons, single quotes (prettier)
- DaisyUI classes prefixed
d- - Underscore prefix ignores unused vars (
_unused) - COOP/COEP headers enabled in dev (for WASM/workers)
NOTES
data/is local-only and gitignored.- Do not depend on
static/dataorstatic/databasein runtime/tests. - Use generated fixtures for tests.
- IndexedDB
moneywiz-v3stores imported transaction data (manifest, meta, transactions). - App settings (theme, filter options, FX rate cache, DB metadata) use
LocalStorageProviderin$lib/providers/localstorage.