# CLAUDE.md ## Project Overview **Ka-Note** — a local-first meeting/topic management PWA with offline support and sync. Rebuilt from the RollingAgenda prototype. The HTML prototype (`rolling_agenda_proto.html`) remains the design reference. ## Tech Stack - **Frontend**: SvelteKit (SPA mode, adapter-static) + Tailwind CSS + Dexie.js (IndexedDB) - **Backend**: Hono (Node.js) + SQLite + Drizzle ORM - **Monorepo**: npm workspaces (`ka-note/shared`, `ka-note/client`, `ka-note/server`) ## Build & Run ```bash # Install dependencies (from ka-note/) npm install # Dev mode (client + server parallel) npm run dev # Client only (http://localhost:5173) npm run dev -w client # Server only (http://localhost:3001) npm run dev -w server # Build all npm run build # Docker docker-compose -f ka-note/docker-compose.yml up --build ``` ## Architecture ``` ka-note/ ├── shared/ — Domain types (SyncEntity, AgendaContext, Topic, HistoryEntry, Rating) ├── client/ — SvelteKit SPA (Tailwind, Dexie.js for local DB) │ └── src/lib/ │ ├── components/ — Svelte components │ ├── db/ — Dexie schema, repositories, seed data │ ├── stores/ — Svelte stores wrapping Dexie liveQuery │ ├── utils/ — Tree parser, extractors │ └── actions/ — Svelte actions (drag-drop) ├── server/ — Hono API (REST + WebSocket sync) └── docker-compose.yml ``` ## Key Concepts - **Soft-delete everywhere** — `deletedAt` field, never hard-delete - **`daily-log`** — hardcoded default context (always meeting mode) - **`processedInCurrentSession`** — session-only state (sessionStorage), not synced - **`isCollapsed`** — UI-only state (Svelte store), not persisted - **Inline tags**: `-> NAME` (assignment), `@P:PROJECT` (project ref), `@NAME` (person mention) ## Phased Feature Implementation When implementing a feature with multiple phases: - The plan file in `plans/` is the single source of truth - Each phase runs in a dedicated sub-agent with only phase context + relevant architecture info - After each phase: build validation via `npm run build` (from `ka-note/`) - Check off success criteria in the plan file after each successful phase - On context compaction: always preserve current phase status and plan file reference (`plans/*.md`) ## Other Files - `vorlagen/` — UpNote markdown templates (design reference) - `rolling_agenda_proto.html` — full HTML prototype (1135 lines, all features)