diff --git a/docs/spec/BTB-001-tool-json-formatter/BTB-001-architecture.md b/docs/spec/BTB-001-tool-json-formatter/BTB-001-architecture.md new file mode 100644 index 0000000..9317bc8 --- /dev/null +++ b/docs/spec/BTB-001-tool-json-formatter/BTB-001-architecture.md @@ -0,0 +1,55 @@ +--- +specId: BTB-001 +title: tool-json-formatter — Architecture +owner: Vincent +status: implemented +--- + +# BTB-001-architecture.md + +## 1) Architecture design (OOP / module-level) + +### 1.1 Components and responsibilities + +- `src/tools/json-formatter/JsonFormatterTool.tsx` + - Tool page orchestration: buttons (Prettify/Minify/Validate), options (indent, sort keys), output + error/status. + +- `src/tools/json-formatter/JsonCodeEditor.tsx` + - CodeMirror 6 wrapper + - Provides: + - JSON syntax highlighting (`@codemirror/lang-json`) + - line numbers / basic setup + - lint diagnostics (inline range underline) based on JSON.parse + +- `src/lib/json.ts` + - `sortJsonKeysDeep` for recursive key sorting. + +### 1.2 Data model / types + +- Editor value: string +- Validation status: { ok: boolean, message?: string, line?: number, column?: number } + +### 1.3 Key flows + +- Prettify/Minify: + 1) read editor value + 2) `JSON.parse` + 3) optional `sortJsonKeysDeep` + 4) `JSON.stringify` with indent (prettify) or none (minify) + 5) set output + +- Validate: + 1) run JSON.parse + 2) if error has position, compute line/column + 3) set CodeMirror diagnostic at that position + +### 1.4 Dependencies / constraints + +- CodeMirror 6 packages: + - `@codemirror/view`, `@codemirror/state`, `@codemirror/language`, `@codemirror/lang-json`, `@codemirror/lint` +- Constraint: no server. + +### 1.5 Compatibility notes + +- Keep route `/tools/json-formatter` stable. +- Existing output semantics preserved. diff --git a/docs/spec/BTB-001-tool-json-formatter/BTB-001-requirements.md b/docs/spec/BTB-001-tool-json-formatter/BTB-001-requirements.md new file mode 100644 index 0000000..70558fa --- /dev/null +++ b/docs/spec/BTB-001-tool-json-formatter/BTB-001-requirements.md @@ -0,0 +1,80 @@ +--- +specId: BTB-001 +title: tool-json-formatter — JSON prettify/minify/sort/validate with CodeMirror editor +owner: Vincent +status: implemented +--- + +# BTB-001-requirements.md + +## 0) Context + +- Problem: + - Users need to format/validate JSON quickly, with helpful inline error location. +- Users/persona: + - Beginners + developers pasting JSON from APIs/logs. +- Non-goals: + - No backend. + - No guarantee of accepting non-JSON variants (JSON5, comments) in v1. +- Constraints: + - Runs 100% in-browser. + - Must handle large inputs reasonably without freezing. + +--- + +## 1) Requirements + +### 1.1 Functional (expected) + +- [ ] BTB-001-REQ-001 (Functional / Expected): Provide an editor input for JSON with **line numbers**. +- [ ] BTB-001-REQ-002 (Functional / Expected): Provide **Prettify** (indent) operation. +- [ ] BTB-001-REQ-003 (Functional / Expected): Provide **Minify** operation. +- [ ] BTB-001-REQ-004 (Functional / Expected): Provide **Sort keys (recursive)** option. +- [ ] BTB-001-REQ-005 (Functional / Expected): Provide **Validate** operation. +- [ ] BTB-001-REQ-006 (Functional / Expected): On invalid JSON, show an error message including **line/column**. +- [ ] BTB-001-REQ-007 (Functional / Expected): On invalid JSON, show **inline error highlighting** in the editor. +- [ ] BTB-001-REQ-008 (Functional / Expected): Editor should provide JSON syntax highlighting. +- [ ] BTB-001-REQ-009 (Functional / Expected): Output panel supports copy and does not lose last successful output unnecessarily. + +### 1.2 Functional (forbidden) + +- [ ] BTB-001-REQ-010 (Functional / Forbidden): Must not send JSON content to any server. +- [ ] BTB-001-REQ-011 (Functional / Forbidden): Must not embed unbounded JSON input into URL. + +### 1.3 Non-functional + +- [ ] BTB-001-REQ-012 (Non-functional): Must be usable on mobile widths (~420px). +- [ ] BTB-001-REQ-013 (Non-functional): All repo quality gates must pass (test/lint/build/e2e). + +--- + +## 2) Acceptance criteria + +- [ ] BTB-001-AC-001 (maps to BTB-001-REQ-001): Editor shows line numbers and accepts multi-line input. +- [ ] BTB-001-AC-002 (maps to BTB-001-REQ-002): Prettify formats compact JSON into indented output. +- [ ] BTB-001-AC-003 (maps to BTB-001-REQ-005/006/007): Validate on invalid JSON shows error message with line/col and an inline error marker. +- [ ] BTB-001-AC-004 (maps to BTB-001-REQ-004): When sort keys is enabled, output JSON has recursively sorted object keys. + +--- + +## 3) Test plan + +- Unit: + - `sortJsonKeysDeep` behavior. +- E2E: + - `e2e/json-formatter.spec.ts` covers prettify + validate success/failure + inline marker. + +--- + +## 4) Rollout / rollback + +- Rollout: Static deploy. +- Rollback: revert commits affecting editor integration. +- Risks: + - CodeMirror chunk size increase. + +--- + +## 5) Open questions + +- Q1: Should we support JSON5 (comments/trailing commas) later? diff --git a/docs/spec/BTB-002-ui-global-search/BTB-002-architecture.md b/docs/spec/BTB-002-ui-global-search/BTB-002-architecture.md new file mode 100644 index 0000000..7fef635 --- /dev/null +++ b/docs/spec/BTB-002-ui-global-search/BTB-002-architecture.md @@ -0,0 +1,44 @@ +--- +specId: BTB-002 +title: ui-global-search — Architecture +owner: Vincent +status: implemented +--- + +# BTB-002-architecture.md + +## 1) Architecture design (OOP / module-level) + +### 1.1 Components and responsibilities + +- `src/App.tsx` (Header + pages) + - Holds search query state. + - Syncs with short URL param `q`. + - When query changes off Home, navigates to Home. + +- Home page + - Filters `TOOLS` by query. + - Renders result count. + +### 1.2 Data model / types + +- Query: string (bounded for URL) + +### 1.3 Key flows + +- User types in header search: + - update state + - if not on Home, navigate to Home + - filter tool list + +- Enter key: + - if exactly one match → navigate `/tools/` + +### 1.4 Dependencies / constraints + +- No dependencies. +- Constraint: keep URL param short. + +### 1.5 Compatibility notes + +- Routes unchanged. diff --git a/docs/spec/BTB-002-ui-global-search/BTB-002-requirements.md b/docs/spec/BTB-002-ui-global-search/BTB-002-requirements.md new file mode 100644 index 0000000..84ea979 --- /dev/null +++ b/docs/spec/BTB-002-ui-global-search/BTB-002-requirements.md @@ -0,0 +1,71 @@ +--- +specId: BTB-002 +title: ui-global-search — Header search across all tools +owner: Vincent +status: implemented +--- + +# BTB-002-requirements.md + +## 0) Context + +- Problem: + - As tool count grows, users need fast discovery without scrolling. +- Users/persona: + - Users who remember partial tool names (e.g., “json”, “diff”). +- Non-goals: + - No backend search. + - No fuzzy ranking beyond simple contains match in v1. +- Constraints: + - Must work from any page. + - Search query should be bounded if stored in URL. + +--- + +## 1) Requirements + +### 1.1 Functional (expected) + +- [ ] BTB-002-REQ-001 (Functional / Expected): Provide a search input in the header (desktop) and accessible on mobile. +- [ ] BTB-002-REQ-002 (Functional / Expected): Search is global across all tools (name + description + id). +- [ ] BTB-002-REQ-003 (Functional / Expected): Typing from any page navigates to Home and filters tool cards. +- [ ] BTB-002-REQ-004 (Functional / Expected): Escape clears query. +- [ ] BTB-002-REQ-005 (Functional / Expected): Enter with exactly one result navigates directly to that tool. +- [ ] BTB-002-REQ-006 (Functional / Expected): Show result count when filtering. +- [ ] BTB-002-REQ-007 (Functional / Expected): Support shareable short URL param `q` (bounded length). + +### 1.2 Functional (forbidden) + +- [ ] BTB-002-REQ-008 (Functional / Forbidden): Must not store unbounded queries in URL. +- [ ] BTB-002-REQ-009 (Functional / Forbidden): Must not require backend. + +### 1.3 Non-functional + +- [ ] BTB-002-REQ-010 (Non-functional): Does not significantly degrade performance on Home. + +--- + +## 2) Acceptance criteria + +- [ ] BTB-002-AC-001 (maps to BTB-002-REQ-003): From `/music`, typing in search returns to Home and filters results. +- [ ] BTB-002-AC-002 (maps to BTB-002-REQ-005): With one match, Enter navigates to tool page. +- [ ] BTB-002-AC-003 (maps to BTB-002-REQ-007): Loading `/#/?q=json` filters the Home tool list. + +--- + +## 3) Test plan + +- E2E: `e2e/search.spec.ts` covers navigation, Enter, Esc, URL param. + +--- + +## 4) Rollout / rollback + +- Rollout: static. +- Rollback: revert UI/search commit. + +--- + +## 5) Open questions + +- Q1: Add fuzzy matching / ranking? diff --git a/docs/spec/BTB-003-ui-theme-system/BTB-003-architecture.md b/docs/spec/BTB-003-ui-theme-system/BTB-003-architecture.md new file mode 100644 index 0000000..2c4017a --- /dev/null +++ b/docs/spec/BTB-003-ui-theme-system/BTB-003-architecture.md @@ -0,0 +1,28 @@ +--- +specId: BTB-003 +title: ui-theme-system — Architecture +owner: Vincent +status: implemented +--- + +# BTB-003-architecture.md + +## 1) Architecture design (module-level) + +### 1.1 Components and responsibilities + +- `src/lib/theme.ts` + - Reads/writes `btb:theme`. + - Computes effective theme (`system` → light/dark). + - Applies `.dark` class on `` and sets `color-scheme`. + - Sync: listens to media query changes when pref is `system`. + +- `src/styles/design-system.css` + `src/styles/theme.css` + - CSS variables for colors. + - `.dark { ... }` overrides. + +- `src/tools/settings/SettingsPage.tsx` + - Radio toggle for theme preference. + +- `src/App.tsx` + - Calls `initThemeSync()` on mount. diff --git a/docs/spec/BTB-003-ui-theme-system/BTB-003-requirements.md b/docs/spec/BTB-003-ui-theme-system/BTB-003-requirements.md new file mode 100644 index 0000000..73c6660 --- /dev/null +++ b/docs/spec/BTB-003-ui-theme-system/BTB-003-requirements.md @@ -0,0 +1,46 @@ +--- +specId: BTB-003 +title: ui-theme-system — Light/Dark/System theme with Settings toggle +owner: Vincent +status: implemented +--- + +# BTB-003-requirements.md + +## 0) Context + +- Problem: Users need light/dark modes, ideally following system, with manual override. +- Non-goals: No theming per-tool; no design overhaul. +- Constraints: In-browser only; no backend. + +## 1) Requirements + +### 1.1 Functional (expected) + +- [ ] BTB-003-REQ-001: Provide theme preference values: `system | light | dark`. +- [ ] BTB-003-REQ-002: Persist preference locally (localStorage key `btb:theme`). +- [ ] BTB-003-REQ-003: Apply effective theme without full page reload. +- [ ] BTB-003-REQ-004: `system` follows `prefers-color-scheme` changes. + +### 1.2 Functional (forbidden) + +- [ ] BTB-003-REQ-005: Must not store theme preference on a server. + +### 1.3 Non-functional + +- [ ] BTB-003-REQ-006: Theme must keep text/background contrast readable. + +## 2) Acceptance criteria + +- [ ] BTB-003-AC-001: Settings offers System/Light/Dark and switching updates UI immediately. +- [ ] BTB-003-AC-002: With System selected, OS theme change updates the app. + +## 3) Test plan + +- Integration/manual: verify theme switch + system follow. +- Optional e2e: could be added later. + +## 4) Rollout / rollback + +- Rollout: static. +- Rollback: revert theme commits. diff --git a/docs/spec/BTB-004-ui-settings-storage-reset/BTB-004-architecture.md b/docs/spec/BTB-004-ui-settings-storage-reset/BTB-004-architecture.md new file mode 100644 index 0000000..b4f4d43 --- /dev/null +++ b/docs/spec/BTB-004-ui-settings-storage-reset/BTB-004-architecture.md @@ -0,0 +1,20 @@ +--- +specId: BTB-004 +title: ui-settings-storage-reset — Architecture +owner: Vincent +status: implemented +--- + +# BTB-004-architecture.md + +## 1) Architecture design + +- `src/lib/localStorageAdmin.ts` + - Central mapping: toolId → key prefixes/keys. + - Implements `clearTool(toolId)` and `clearAll()`. + +- `src/tools/settings/SettingsPage.tsx` + - Renders clear-all and per-tool clear UI with confirm. + +- `src/components/ToolPage.tsx` + - Conditionally shows "Reset this tool" button for tools with storage mapping. diff --git a/docs/spec/BTB-004-ui-settings-storage-reset/BTB-004-requirements.md b/docs/spec/BTB-004-ui-settings-storage-reset/BTB-004-requirements.md new file mode 100644 index 0000000..5136fea --- /dev/null +++ b/docs/spec/BTB-004-ui-settings-storage-reset/BTB-004-requirements.md @@ -0,0 +1,36 @@ +--- +specId: BTB-004 +title: ui-settings-storage-reset — Clear per-tool and all-app saved data +owner: Vincent +status: implemented +--- + +# BTB-004-requirements.md + +## 0) Context + +- Problem: Tool inputs/options are stored locally; user needs a safe way to clear them. +- Constraints: Must not delete unrelated site/app keys. + +## 1) Requirements + +### 1.1 Functional (expected) + +- [ ] BTB-004-REQ-001: Provide Settings page for clearing data. +- [ ] BTB-004-REQ-002: Provide "Clear all saved data" for this app only. +- [ ] BTB-004-REQ-003: Provide per-tool clear buttons. +- [ ] BTB-004-REQ-004: Provide per-tool "Reset this tool" on tool pages (where applicable). +- [ ] BTB-004-REQ-005: Confirm before destructive clear. + +### 1.2 Functional (forbidden) + +- [ ] BTB-004-REQ-006: Must not wipe unrelated localStorage keys. + +## 2) Acceptance criteria + +- [ ] BTB-004-AC-001: Settings clear-all removes only mapped keys. +- [ ] BTB-004-AC-002: Per-tool clear removes only that tool’s keys. + +## 3) Test plan + +- E2E: confirm dialogs + key removal checks. diff --git a/docs/spec/BTB-005-ui-mobile-hamburger-nav/BTB-005-architecture.md b/docs/spec/BTB-005-ui-mobile-hamburger-nav/BTB-005-architecture.md new file mode 100644 index 0000000..e1bb347 --- /dev/null +++ b/docs/spec/BTB-005-ui-mobile-hamburger-nav/BTB-005-architecture.md @@ -0,0 +1,17 @@ +--- +specId: BTB-005 +title: ui-mobile-hamburger-nav — Architecture +owner: Vincent +status: implemented +--- + +# BTB-005-architecture.md + +## 1) Architecture design + +- `src/App.tsx` Header + - `menuOpen` state + - event listeners for Esc and pointerdown outside + +- `src/App.css` + - media query <=640px to toggle visibility of desktop nav vs hamburger. diff --git a/docs/spec/BTB-005-ui-mobile-hamburger-nav/BTB-005-requirements.md b/docs/spec/BTB-005-ui-mobile-hamburger-nav/BTB-005-requirements.md new file mode 100644 index 0000000..c2c7334 --- /dev/null +++ b/docs/spec/BTB-005-ui-mobile-hamburger-nav/BTB-005-requirements.md @@ -0,0 +1,29 @@ +--- +specId: BTB-005 +title: ui-mobile-hamburger-nav — Mobile dropdown navigation +owner: Vincent +status: implemented +--- + +# BTB-005-requirements.md + +## 0) Context + +- Problem: Top nav has many links; mobile needs a compact navigation. +- Constraints: Must be accessible and work with touch. + +## 1) Requirements + +- [ ] BTB-005-REQ-001: At <=640px, hide horizontal nav links. +- [ ] BTB-005-REQ-002: Show hamburger button. +- [ ] BTB-005-REQ-003: Clicking hamburger opens a top dropdown listing all nav destinations. +- [ ] BTB-005-REQ-004: Menu closes on outside click, Esc, or selecting an item. +- [ ] BTB-005-REQ-005: Provide basic aria attributes (`aria-label`, `aria-expanded`). + +## 2) Acceptance criteria + +- [ ] BTB-005-AC-001: Mobile e2e opens hamburger, navigates, and menu closes. + +## 3) Test plan + +- E2E: `e2e/mobile.spec.ts` hamburger test. diff --git a/docs/spec/BTB-006-ui-category-landing-pages/BTB-006-architecture.md b/docs/spec/BTB-006-ui-category-landing-pages/BTB-006-architecture.md new file mode 100644 index 0000000..e852ccb --- /dev/null +++ b/docs/spec/BTB-006-ui-category-landing-pages/BTB-006-architecture.md @@ -0,0 +1,17 @@ +--- +specId: BTB-006 +title: ui-category-landing-pages — Architecture +owner: Vincent +status: implemented +--- + +# BTB-006-architecture.md + +## 1) Architecture design + +- `src/App.tsx` + - Adds routes for category pages. + - Uses simple hardcoded toolId lists per category. + +- `src/components/ToolCard.tsx` + - Shared rendering of cards. diff --git a/docs/spec/BTB-006-ui-category-landing-pages/BTB-006-requirements.md b/docs/spec/BTB-006-ui-category-landing-pages/BTB-006-requirements.md new file mode 100644 index 0000000..0313e01 --- /dev/null +++ b/docs/spec/BTB-006-ui-category-landing-pages/BTB-006-requirements.md @@ -0,0 +1,26 @@ +--- +specId: BTB-006 +title: ui-category-landing-pages — Category pages for tool discovery +owner: Vincent +status: implemented +--- + +# BTB-006-requirements.md + +## 0) Context + +- Problem: Users need easier discovery than scrolling the full Home list. + +## 1) Requirements + +- [ ] BTB-006-REQ-001: Provide category pages: Data Formats, Text, Encoding, Dev, Music. +- [ ] BTB-006-REQ-002: Each page lists selected tools via ToolCard. +- [ ] BTB-006-REQ-003: Home remains "All Tools". + +## 2) Acceptance criteria + +- [ ] BTB-006-AC-001: Category routes load and show expected cards. + +## 3) Test plan + +- E2E: smoke tests for category pages. diff --git a/docs/spec/BTB-007-perf-route-code-splitting/BTB-007-architecture.md b/docs/spec/BTB-007-perf-route-code-splitting/BTB-007-architecture.md new file mode 100644 index 0000000..76da072 --- /dev/null +++ b/docs/spec/BTB-007-perf-route-code-splitting/BTB-007-architecture.md @@ -0,0 +1,14 @@ +--- +specId: BTB-007 +title: perf-route-code-splitting — Architecture +owner: Vincent +status: implemented +--- + +# BTB-007-architecture.md + +## 1) Architecture design + +- `src/App.tsx` + - Uses `React.lazy(() => import(...))` for each tool. + - Wraps tool rendering in `Suspense` fallback. diff --git a/docs/spec/BTB-007-perf-route-code-splitting/BTB-007-requirements.md b/docs/spec/BTB-007-perf-route-code-splitting/BTB-007-requirements.md new file mode 100644 index 0000000..4f4d6a6 --- /dev/null +++ b/docs/spec/BTB-007-perf-route-code-splitting/BTB-007-requirements.md @@ -0,0 +1,26 @@ +--- +specId: BTB-007 +title: perf-route-code-splitting — Lazy-load tool routes +owner: Vincent +status: implemented +--- + +# BTB-007-requirements.md + +## 0) Context + +- Problem: Loading every tool upfront increases initial bundle size. + +## 1) Requirements + +- [ ] BTB-007-REQ-001: Tool components should be lazy-loaded per route. +- [ ] BTB-007-REQ-002: Tool page shell should render with a loading fallback. +- [ ] BTB-007-REQ-003: Production build emits multiple JS chunks. + +## 2) Acceptance criteria + +- [ ] BTB-007-AC-001: `dist/assets` contains >1 JS chunk. + +## 3) Test plan + +- Build inspection. diff --git a/docs/spec/BTB-008-tool-data-converter/BTB-008-architecture.md b/docs/spec/BTB-008-tool-data-converter/BTB-008-architecture.md new file mode 100644 index 0000000..1d81fe7 --- /dev/null +++ b/docs/spec/BTB-008-tool-data-converter/BTB-008-architecture.md @@ -0,0 +1,21 @@ +--- +specId: BTB-008 +title: tool-data-converter — Architecture +owner: Vincent +status: implemented +--- + +# BTB-008-architecture.md + +## 1) Architecture design + +- `src/tools/data-converter/DataConverterTool.tsx` + - UI: input/output + format selectors + options. + +- `src/lib/dataConverter.ts` + - Pure conversion functions. + +- Dependencies: + - `yaml` + - `papaparse` + - `@iarna/toml` diff --git a/docs/spec/BTB-008-tool-data-converter/BTB-008-requirements.md b/docs/spec/BTB-008-tool-data-converter/BTB-008-requirements.md new file mode 100644 index 0000000..68a4502 --- /dev/null +++ b/docs/spec/BTB-008-tool-data-converter/BTB-008-requirements.md @@ -0,0 +1,31 @@ +--- +specId: BTB-008 +title: tool-data-converter — Convert JSON↔YAML/CSV/TOML +owner: Vincent +status: implemented +--- + +# BTB-008-requirements.md + +## 0) Context + +- Problem: Users need quick conversions between common data formats. +- Constraints: In-browser only; conversion is not lossless for all formats. + +## 1) Requirements + +- [ ] BTB-008-REQ-001: Support JSON↔YAML. +- [ ] BTB-008-REQ-002: Support JSON↔CSV. +- [ ] BTB-008-REQ-003: Support JSON↔TOML. +- [ ] BTB-008-REQ-004: Provide minimal options (indent, delimiter). +- [ ] BTB-008-REQ-005: Show clear errors on invalid input. +- [ ] BTB-008-REQ-006: JSON→CSV rejects nested structures in v1 (clear message). + +## 2) Acceptance criteria + +- [ ] BTB-008-AC-001: Tool loads at `/tools/data-converter` and converts at least one example per format. + +## 3) Test plan + +- Unit: conversion helpers. +- E2E: smoke route load. diff --git a/docs/spec/BTB-009-tool-json-diff/BTB-009-architecture.md b/docs/spec/BTB-009-tool-json-diff/BTB-009-architecture.md new file mode 100644 index 0000000..6b76469 --- /dev/null +++ b/docs/spec/BTB-009-tool-json-diff/BTB-009-architecture.md @@ -0,0 +1,18 @@ +--- +specId: BTB-009 +title: tool-json-diff — Architecture +owner: Vincent +status: implemented +--- + +# BTB-009-architecture.md + +## 1) Architecture design + +- `src/tools/json-diff/JsonDiffTool.tsx` + - UI and calling diff. + +- `src/lib/jsonDiff.ts` + - Computes path-based diffs. + +- Uses JSON.parse and optional key-sort. diff --git a/docs/spec/BTB-009-tool-json-diff/BTB-009-requirements.md b/docs/spec/BTB-009-tool-json-diff/BTB-009-requirements.md new file mode 100644 index 0000000..eb0ca8c --- /dev/null +++ b/docs/spec/BTB-009-tool-json-diff/BTB-009-requirements.md @@ -0,0 +1,28 @@ +--- +specId: BTB-009 +title: tool-json-diff — Compare two JSON inputs and show changed paths +owner: Vincent +status: implemented +--- + +# BTB-009-requirements.md + +## 0) Context + +- Problem: Users need quick JSON comparison. + +## 1) Requirements + +- [ ] BTB-009-REQ-001: Two JSON inputs (left/right). +- [ ] BTB-009-REQ-002: Show added/removed/changed paths. +- [ ] BTB-009-REQ-003: Option to sort keys before diff. +- [ ] BTB-009-REQ-004: Clear errors on invalid JSON. + +## 2) Acceptance criteria + +- [ ] BTB-009-AC-001: Diff shows changed path for simple change. + +## 3) Test plan + +- Unit: diff logic. +- E2E: smoke assertions. diff --git a/docs/spec/BTB-010-tool-jsonpath-query/BTB-010-architecture.md b/docs/spec/BTB-010-tool-jsonpath-query/BTB-010-architecture.md new file mode 100644 index 0000000..cd212e2 --- /dev/null +++ b/docs/spec/BTB-010-tool-jsonpath-query/BTB-010-architecture.md @@ -0,0 +1,16 @@ +--- +specId: BTB-010 +title: tool-jsonpath-query — Architecture +owner: Vincent +status: implemented +--- + +# BTB-010-architecture.md + +## 1) Architecture design + +- `src/tools/jsonpath/JsonPathTool.tsx` — UI. +- `src/lib/jsonpath.ts` — wrapper around JSONPath evaluation. +- Dependency: `jsonpath-plus`. + +Constraints: do not put JSON input in URL. diff --git a/docs/spec/BTB-010-tool-jsonpath-query/BTB-010-requirements.md b/docs/spec/BTB-010-tool-jsonpath-query/BTB-010-requirements.md new file mode 100644 index 0000000..6bb3c5b --- /dev/null +++ b/docs/spec/BTB-010-tool-jsonpath-query/BTB-010-requirements.md @@ -0,0 +1,29 @@ +--- +specId: BTB-010 +title: tool-jsonpath-query — Query JSON with JSONPath expressions +owner: Vincent +status: implemented +--- + +# BTB-010-requirements.md + +## 0) Context + +- Problem: Extract values from JSON quickly using JSONPath. + +## 1) Requirements + +- [ ] BTB-010-REQ-001: JSON input textarea. +- [ ] BTB-010-REQ-002: Expression input. +- [ ] BTB-010-REQ-003: Output list of matches. +- [ ] BTB-010-REQ-004: Clear errors for invalid JSON/expression. +- [ ] BTB-010-REQ-005: Optional short URL param for expr only. + +## 2) Acceptance criteria + +- [ ] BTB-010-AC-001: Query `$.a.b` returns `42` for input `{ "a": {"b":42}}`. + +## 3) Test plan + +- Unit: jsonpath wrapper. +- E2E: tool smoke + run query. diff --git a/docs/spec/BTB-011-tool-metronome/BTB-011-architecture.md b/docs/spec/BTB-011-tool-metronome/BTB-011-architecture.md new file mode 100644 index 0000000..f26a221 --- /dev/null +++ b/docs/spec/BTB-011-tool-metronome/BTB-011-architecture.md @@ -0,0 +1,17 @@ +--- +specId: BTB-011 +title: tool-metronome — Architecture +owner: Vincent +status: implemented +--- + +# BTB-011-architecture.md + +## 1) Architecture design + +- `src/tools/metronome/MetronomeTool.tsx` + - Uses Web Audio API scheduling. + - Handles lifecycle (visibility/page show). + - Parses/clamps URL params. + +- No backend. diff --git a/docs/spec/BTB-011-tool-metronome/BTB-011-requirements.md b/docs/spec/BTB-011-tool-metronome/BTB-011-requirements.md new file mode 100644 index 0000000..ce8ef04 --- /dev/null +++ b/docs/spec/BTB-011-tool-metronome/BTB-011-requirements.md @@ -0,0 +1,32 @@ +--- +specId: BTB-011 +title: tool-metronome — WebAudio metronome with countdown and URL params +owner: Vincent +status: implemented +--- + +# BTB-011-requirements.md + +## 0) Context + +- Problem: Provide a simple metronome in-browser. +- Constraints: Background playback across iOS is not guaranteed. + +## 1) Requirements + +- [ ] BTB-011-REQ-001: BPM control (bounded). +- [ ] BTB-011-REQ-002: Start/Stop. +- [ ] BTB-011-REQ-003: Beat count + accent option. +- [ ] BTB-011-REQ-004: Volume control. +- [ ] BTB-011-REQ-005: Countdown before start (0/3/5/10). +- [ ] BTB-011-REQ-006: iOS lifecycle handling: on return from background attempt resume; prompt "Tap to resume audio" if needed. +- [ ] BTB-011-REQ-007: Short URL params for bpm/beats/accent/vol/countdown with clamping. + +## 2) Acceptance criteria + +- [ ] BTB-011-AC-001: `/tools/metronome?bpm=140` pre-fills BPM. +- [ ] BTB-011-AC-002: Visibility change triggers resume hint UI. + +## 3) Test plan + +- E2E: smoke tests for URL params + resume hint. diff --git a/docs/spec/BTB-012-tool-tuner/BTB-012-architecture.md b/docs/spec/BTB-012-tool-tuner/BTB-012-architecture.md new file mode 100644 index 0000000..7633829 --- /dev/null +++ b/docs/spec/BTB-012-tool-tuner/BTB-012-architecture.md @@ -0,0 +1,20 @@ +--- +specId: BTB-012 +title: tool-tuner — Architecture +owner: Vincent +status: implemented +--- + +# BTB-012-architecture.md + +## 1) Architecture design + +- `src/lib/pitch.ts` + - YIN pitch detection + smoothing helpers. + +- `src/tools/tuner/TunerTool.tsx` + - WebAudio capture via getUserMedia + AudioContext + Analyser. + - Uses pitch detector to compute frequency. + - Maps frequency → note + cents. + +- Tool settings persisted via localStorage (e.g. A4). diff --git a/docs/spec/BTB-012-tool-tuner/BTB-012-requirements.md b/docs/spec/BTB-012-tool-tuner/BTB-012-requirements.md new file mode 100644 index 0000000..cb2d78a --- /dev/null +++ b/docs/spec/BTB-012-tool-tuner/BTB-012-requirements.md @@ -0,0 +1,31 @@ +--- +specId: BTB-012 +title: tool-tuner — Guitar-style tuner using microphone pitch detection +owner: Vincent +status: implemented +--- + +# BTB-012-requirements.md + +## 0) Context + +- Problem: Tune instruments by detecting pitch from microphone. +- Constraints: Requires mic permission; works best for monophonic signals. + +## 1) Requirements + +- [ ] BTB-012-REQ-001: Start/Stop microphone capture. +- [ ] BTB-012-REQ-002: Display note name + octave. +- [ ] BTB-012-REQ-003: Display frequency in Hz. +- [ ] BTB-012-REQ-004: Display cents deviation indicator (-50..+50). +- [ ] BTB-012-REQ-005: A4 calibration control (e.g., 430–450, default 440). +- [ ] BTB-012-REQ-006: Handle error states (permission denied, insecure context). + +## 2) Acceptance criteria + +- [ ] BTB-012-AC-001: Tool loads at `/tools/tuner` and shows controls. + +## 3) Test plan + +- Unit: `src/lib/pitch.ts` tests on generated sine waves. +- E2E: smoke loads tuner page. diff --git a/docs/spec/BTB-013-tool-music-box-designer/BTB-013-architecture.md b/docs/spec/BTB-013-tool-music-box-designer/BTB-013-architecture.md new file mode 100644 index 0000000..e5c646b --- /dev/null +++ b/docs/spec/BTB-013-tool-music-box-designer/BTB-013-architecture.md @@ -0,0 +1,18 @@ +--- +specId: BTB-013 +title: tool-music-box-designer — Architecture +owner: Vincent +status: implemented +--- + +# BTB-013-architecture.md + +## 1) Architecture design + +- `src/tools/music-box-designer/MusicBoxDesignerTool.tsx` + - UI grid and playback. + +- `src/lib/musicBox.ts` + - Pattern data model + serialize/deserialize. + +- Uses WebAudio for sound generation. diff --git a/docs/spec/BTB-013-tool-music-box-designer/BTB-013-requirements.md b/docs/spec/BTB-013-tool-music-box-designer/BTB-013-requirements.md new file mode 100644 index 0000000..19b76b6 --- /dev/null +++ b/docs/spec/BTB-013-tool-music-box-designer/BTB-013-requirements.md @@ -0,0 +1,29 @@ +--- +specId: BTB-013 +title: tool-music-box-designer — Step-grid sequencer with export/import +owner: Vincent +status: implemented +--- + +# BTB-013-requirements.md + +## 0) Context + +- Problem: Simple grid-based pattern editor with playback. +- Constraints: In-browser only. + +## 1) Requirements + +- [ ] BTB-013-REQ-001: Step grid (time × pitch) with toggle notes. +- [ ] BTB-013-REQ-002: Playback using WebAudio. +- [ ] BTB-013-REQ-003: Export/import pattern as JSON (local). +- [ ] BTB-013-REQ-004: Mobile-friendly UI. + +## 2) Acceptance criteria + +- [ ] BTB-013-AC-001: Tool renders grid and can toggle steps. + +## 3) Test plan + +- Unit: pattern serialization helpers. +- E2E: smoke grid visible. diff --git a/docs/spec/BTB-014-tool-base64/BTB-014-architecture.md b/docs/spec/BTB-014-tool-base64/BTB-014-architecture.md new file mode 100644 index 0000000..52fe085 --- /dev/null +++ b/docs/spec/BTB-014-tool-base64/BTB-014-architecture.md @@ -0,0 +1,16 @@ +--- +specId: BTB-014 +title: tool-base64 — Architecture +owner: Vincent +status: implemented +--- + +# BTB-014-architecture.md + +## 1) Architecture design + +- `src/tools/base64/Base64Tool.tsx` + - UI for encode/decode. + +- `src/lib/base64.ts` + - Pure encode/decode helpers. diff --git a/docs/spec/BTB-014-tool-base64/BTB-014-requirements.md b/docs/spec/BTB-014-tool-base64/BTB-014-requirements.md new file mode 100644 index 0000000..0efbc0f --- /dev/null +++ b/docs/spec/BTB-014-tool-base64/BTB-014-requirements.md @@ -0,0 +1,34 @@ +--- +specId: BTB-014 +title: tool-base64 — Encode/decode Base64 +owner: Vincent +status: implemented +--- + +# BTB-014-requirements.md + +## 0) Context + +- Problem: Quick Base64 encode/decode in-browser. +- Constraints: No backend. + +## 1) Requirements + +### 1.1 Functional (expected) + +- [ ] BTB-014-REQ-001: Encode input text to Base64. +- [ ] BTB-014-REQ-002: Decode Base64 to text. +- [ ] BTB-014-REQ-003: Show clear error for invalid Base64. + +### 1.2 Functional (forbidden) + +- [ ] BTB-014-REQ-004: Must not send user input to server. + +## 2) Acceptance criteria + +- [ ] BTB-014-AC-001: Invalid Base64 shows an error and does not crash. + +## 3) Test plan + +- Unit: `src/lib/__tests__/base64.test.ts`. +- E2E: smoke route load. diff --git a/docs/spec/BTB-015-tool-url-encoder/BTB-015-architecture.md b/docs/spec/BTB-015-tool-url-encoder/BTB-015-architecture.md new file mode 100644 index 0000000..c25532e --- /dev/null +++ b/docs/spec/BTB-015-tool-url-encoder/BTB-015-architecture.md @@ -0,0 +1,17 @@ +--- +specId: BTB-015 +title: tool-url-encoder — Architecture +owner: Vincent +status: implemented +--- + +# BTB-015-architecture.md + +## 1) Architecture design + +- `src/tools/url-encoder/UrlEncoderTool.tsx` + - UI + localStorage. + - Reads short URL params via `src/lib/urlParams.ts`. + +- `src/lib/urlParams.ts` + - `getShortSearchParam`, `getEnumSearchParam`. diff --git a/docs/spec/BTB-015-tool-url-encoder/BTB-015-requirements.md b/docs/spec/BTB-015-tool-url-encoder/BTB-015-requirements.md new file mode 100644 index 0000000..f22fdbb --- /dev/null +++ b/docs/spec/BTB-015-tool-url-encoder/BTB-015-requirements.md @@ -0,0 +1,27 @@ +--- +specId: BTB-015 +title: tool-url-encoder — Encode/decode URL strings +owner: Vincent +status: implemented +--- + +# BTB-015-requirements.md + +## 0) Context + +- Problem: Encode/decode URL components and full URLs. + +## 1) Requirements + +- [ ] BTB-015-REQ-001: Encode/decode using component mode (encodeURIComponent/decodeURIComponent). +- [ ] BTB-015-REQ-002: Encode/decode using full URL mode (encodeURI/decodeURI). +- [ ] BTB-015-REQ-003: URL params support short input `text` and options `op`/`scope` (bounded). +- [ ] BTB-015-REQ-004: Show clear error on invalid decode. + +## 2) Acceptance criteria + +- [ ] BTB-015-AC-001: `/#/tools/url-encoder?text=hello%20world&op=encode&scope=component` pre-fills and outputs encoded value. + +## 3) Test plan + +- E2E: smoke + URL param test. diff --git a/docs/spec/BTB-016-tool-timestamp-converter/BTB-016-architecture.md b/docs/spec/BTB-016-tool-timestamp-converter/BTB-016-architecture.md new file mode 100644 index 0000000..7b757b9 --- /dev/null +++ b/docs/spec/BTB-016-tool-timestamp-converter/BTB-016-architecture.md @@ -0,0 +1,14 @@ +--- +specId: BTB-016 +title: tool-timestamp-converter — Architecture +owner: Vincent +status: implemented +--- + +# BTB-016-architecture.md + +## 1) Architecture design + +- `src/tools/timestamp-converter/TimestampConverterTool.tsx` + - Two conversion paths. + - URL param parsing via `urlParams`. diff --git a/docs/spec/BTB-016-tool-timestamp-converter/BTB-016-requirements.md b/docs/spec/BTB-016-tool-timestamp-converter/BTB-016-requirements.md new file mode 100644 index 0000000..e8e7e6c --- /dev/null +++ b/docs/spec/BTB-016-tool-timestamp-converter/BTB-016-requirements.md @@ -0,0 +1,27 @@ +--- +specId: BTB-016 +title: tool-timestamp-converter — Convert UNIX timestamps and dates +owner: Vincent +status: implemented +--- + +# BTB-016-requirements.md + +## 0) Context + +- Problem: Convert between timestamp seconds/ms and human-readable date. + +## 1) Requirements + +- [ ] BTB-016-REQ-001: Convert timestamp → UTC/local date strings. +- [ ] BTB-016-REQ-002: Convert date → timestamp. +- [ ] BTB-016-REQ-003: URL params support short `ts` plus `unit` (s/ms). +- [ ] BTB-016-REQ-004: Clear error messages for invalid input. + +## 2) Acceptance criteria + +- [ ] BTB-016-AC-001: `/#/tools/timestamp-converter?ts=1700000000&unit=s` pre-fills input. + +## 3) Test plan + +- E2E: URL param smoke. diff --git a/docs/spec/BTB-017-tool-color-converter/BTB-017-architecture.md b/docs/spec/BTB-017-tool-color-converter/BTB-017-architecture.md new file mode 100644 index 0000000..607d8af --- /dev/null +++ b/docs/spec/BTB-017-tool-color-converter/BTB-017-architecture.md @@ -0,0 +1,14 @@ +--- +specId: BTB-017 +title: tool-color-converter — Architecture +owner: Vincent +status: implemented +--- + +# BTB-017-architecture.md + +## 1) Architecture design + +- `src/tools/color-converter/ColorConverterTool.tsx` +- `src/lib/color.ts` (pure conversions) +- URL params via `urlParams`. diff --git a/docs/spec/BTB-017-tool-color-converter/BTB-017-requirements.md b/docs/spec/BTB-017-tool-color-converter/BTB-017-requirements.md new file mode 100644 index 0000000..27c6d69 --- /dev/null +++ b/docs/spec/BTB-017-tool-color-converter/BTB-017-requirements.md @@ -0,0 +1,20 @@ +--- +specId: BTB-017 +title: tool-color-converter — Convert between HEX/RGB/HSL and preview color +owner: Vincent +status: implemented +--- + +# BTB-017-requirements.md + +## 1) Requirements + +- [ ] BTB-017-REQ-001: Accept color input and show conversions. +- [ ] BTB-017-REQ-002: Show color preview swatch. +- [ ] BTB-017-REQ-003: Support short URL param `color` (and optional `format`). +- [ ] BTB-017-REQ-004: Show error for invalid color. + +## 2) Test plan + +- Unit: `src/lib/__tests__/color.test.ts`. +- E2E: URL param test. diff --git a/docs/spec/BTB-018-tool-regex-tester/BTB-018-architecture.md b/docs/spec/BTB-018-tool-regex-tester/BTB-018-architecture.md new file mode 100644 index 0000000..d10ac20 --- /dev/null +++ b/docs/spec/BTB-018-tool-regex-tester/BTB-018-architecture.md @@ -0,0 +1,13 @@ +--- +specId: BTB-018 +title: tool-regex-tester — Architecture +owner: Vincent +status: implemented +--- + +# BTB-018-architecture.md + +## 1) Architecture design + +- `src/tools/regex-tester/RegexTesterTool.tsx` + - Uses JS RegExp. diff --git a/docs/spec/BTB-018-tool-regex-tester/BTB-018-requirements.md b/docs/spec/BTB-018-tool-regex-tester/BTB-018-requirements.md new file mode 100644 index 0000000..522a2d7 --- /dev/null +++ b/docs/spec/BTB-018-tool-regex-tester/BTB-018-requirements.md @@ -0,0 +1,19 @@ +--- +specId: BTB-018 +title: tool-regex-tester — Test regex patterns against text +owner: Vincent +status: implemented +--- + +# BTB-018-requirements.md + +## 1) Requirements + +- [ ] BTB-018-REQ-001: Input regex pattern and flags. +- [ ] BTB-018-REQ-002: Input test text. +- [ ] BTB-018-REQ-003: Show matches or errors. +- [ ] BTB-018-REQ-004: No backend. + +## 3) Test plan + +- E2E: smoke route load. diff --git a/docs/spec/BTB-019-tool-markdown-preview/BTB-019-architecture.md b/docs/spec/BTB-019-tool-markdown-preview/BTB-019-architecture.md new file mode 100644 index 0000000..66bcb7b --- /dev/null +++ b/docs/spec/BTB-019-tool-markdown-preview/BTB-019-architecture.md @@ -0,0 +1,13 @@ +--- +specId: BTB-019 +title: tool-markdown-preview — Architecture +owner: Vincent +status: implemented +--- + +# BTB-019-architecture.md + +## 1) Architecture design + +- `src/tools/markdown-preview/MarkdownPreviewTool.tsx` + - Uses a markdown renderer (in-browser). diff --git a/docs/spec/BTB-019-tool-markdown-preview/BTB-019-requirements.md b/docs/spec/BTB-019-tool-markdown-preview/BTB-019-requirements.md new file mode 100644 index 0000000..c8feeb8 --- /dev/null +++ b/docs/spec/BTB-019-tool-markdown-preview/BTB-019-requirements.md @@ -0,0 +1,18 @@ +--- +specId: BTB-019 +title: tool-markdown-preview — Preview markdown as HTML +owner: Vincent +status: implemented +--- + +# BTB-019-requirements.md + +## 1) Requirements + +- [ ] BTB-019-REQ-001: Input markdown text. +- [ ] BTB-019-REQ-002: Render preview output. +- [ ] BTB-019-REQ-003: No backend. + +## 3) Test plan + +- E2E: smoke route load. diff --git a/docs/spec/BTB-020-tool-hash-generator/BTB-020-architecture.md b/docs/spec/BTB-020-tool-hash-generator/BTB-020-architecture.md new file mode 100644 index 0000000..2e86016 --- /dev/null +++ b/docs/spec/BTB-020-tool-hash-generator/BTB-020-architecture.md @@ -0,0 +1,14 @@ +--- +specId: BTB-020 +title: tool-hash-generator — Architecture +owner: Vincent +status: implemented +--- + +# BTB-020-architecture.md + +## 1) Architecture design + +- `src/tools/hash-generator/HashGeneratorTool.tsx` + - Uses Web Crypto. + - Reads `alg` URL param (bounded enum). diff --git a/docs/spec/BTB-020-tool-hash-generator/BTB-020-requirements.md b/docs/spec/BTB-020-tool-hash-generator/BTB-020-requirements.md new file mode 100644 index 0000000..9356aa2 --- /dev/null +++ b/docs/spec/BTB-020-tool-hash-generator/BTB-020-requirements.md @@ -0,0 +1,18 @@ +--- +specId: BTB-020 +title: tool-hash-generator — Hash text with selectable algorithm +owner: Vincent +status: implemented +--- + +# BTB-020-requirements.md + +## 1) Requirements + +- [ ] BTB-020-REQ-001: Hash input text with SHA-* algorithms. +- [ ] BTB-020-REQ-002: URL param can set `alg` (enum); must not set input via URL. +- [ ] BTB-020-REQ-003: No backend. + +## 3) Test plan + +- E2E: URL param sets active algorithm. diff --git a/docs/spec/BTB-021-tool-uuid-generator/BTB-021-architecture.md b/docs/spec/BTB-021-tool-uuid-generator/BTB-021-architecture.md new file mode 100644 index 0000000..32fc85e --- /dev/null +++ b/docs/spec/BTB-021-tool-uuid-generator/BTB-021-architecture.md @@ -0,0 +1,14 @@ +--- +specId: BTB-021 +title: tool-uuid-generator — Architecture +owner: Vincent +status: implemented +--- + +# BTB-021-architecture.md + +## 1) Architecture design + +- `src/tools/uuid-generator/UuidGeneratorTool.tsx` + - Generates values (uuid/ulid). + - Reads URL params; clamps count. diff --git a/docs/spec/BTB-021-tool-uuid-generator/BTB-021-requirements.md b/docs/spec/BTB-021-tool-uuid-generator/BTB-021-requirements.md new file mode 100644 index 0000000..ab16449 --- /dev/null +++ b/docs/spec/BTB-021-tool-uuid-generator/BTB-021-requirements.md @@ -0,0 +1,18 @@ +--- +specId: BTB-021 +title: tool-uuid-generator — Generate UUID/ULID with URL params +owner: Vincent +status: implemented +--- + +# BTB-021-requirements.md + +## 1) Requirements + +- [ ] BTB-021-REQ-001: Generate UUIDs. +- [ ] BTB-021-REQ-002: Generate ULIDs. +- [ ] BTB-021-REQ-003: URL params set `type` and `count` (capped). + +## 3) Test plan + +- E2E: URL params generation tests. diff --git a/docs/spec/BTB-022-ui-data-formats-landing/BTB-022-architecture.md b/docs/spec/BTB-022-ui-data-formats-landing/BTB-022-architecture.md new file mode 100644 index 0000000..1d7a090 --- /dev/null +++ b/docs/spec/BTB-022-ui-data-formats-landing/BTB-022-architecture.md @@ -0,0 +1,12 @@ +--- +specId: BTB-022 +title: ui-data-formats-landing — Architecture +owner: Vincent +status: implemented +--- + +# BTB-022-architecture.md + +## 1) Architecture design + +- `src/App.tsx` provides route and filters tool cards shown. diff --git a/docs/spec/BTB-022-ui-data-formats-landing/BTB-022-requirements.md b/docs/spec/BTB-022-ui-data-formats-landing/BTB-022-requirements.md new file mode 100644 index 0000000..064202c --- /dev/null +++ b/docs/spec/BTB-022-ui-data-formats-landing/BTB-022-requirements.md @@ -0,0 +1,16 @@ +--- +specId: BTB-022 +title: ui-data-formats-landing — Data Formats landing page +owner: Vincent +status: implemented +--- + +# BTB-022-requirements.md + +## 1) Requirements + +- [ ] BTB-022-REQ-001: Provide `/data-formats` page listing data-format related tools. + +## 3) Test plan + +- E2E: smoke loads `/#/data-formats`. diff --git a/docs/spec/BTB-023-ui-music-landing/BTB-023-architecture.md b/docs/spec/BTB-023-ui-music-landing/BTB-023-architecture.md new file mode 100644 index 0000000..ee3367e --- /dev/null +++ b/docs/spec/BTB-023-ui-music-landing/BTB-023-architecture.md @@ -0,0 +1,12 @@ +--- +specId: BTB-023 +title: ui-music-landing — Architecture +owner: Vincent +status: implemented +--- + +# BTB-023-architecture.md + +## 1) Architecture design + +- `src/App.tsx` provides route and filters tool cards shown. diff --git a/docs/spec/BTB-023-ui-music-landing/BTB-023-requirements.md b/docs/spec/BTB-023-ui-music-landing/BTB-023-requirements.md new file mode 100644 index 0000000..f29a621 --- /dev/null +++ b/docs/spec/BTB-023-ui-music-landing/BTB-023-requirements.md @@ -0,0 +1,16 @@ +--- +specId: BTB-023 +title: ui-music-landing — Music landing page +owner: Vincent +status: implemented +--- + +# BTB-023-requirements.md + +## 1) Requirements + +- [ ] BTB-023-REQ-001: Provide `/music` page listing music-related tools. + +## 3) Test plan + +- E2E: smoke loads `/#/music`. diff --git a/docs/spec/BTB-024-ui-mobile-support/BTB-024-architecture.md b/docs/spec/BTB-024-ui-mobile-support/BTB-024-architecture.md new file mode 100644 index 0000000..023dc4d --- /dev/null +++ b/docs/spec/BTB-024-ui-mobile-support/BTB-024-architecture.md @@ -0,0 +1,13 @@ +--- +specId: BTB-024 +title: ui-mobile-support — Architecture +owner: Vincent +status: implemented +--- + +# BTB-024-architecture.md + +## 1) Architecture design + +- CSS media queries in shared styles. +- Playwright mobile viewport coverage. diff --git a/docs/spec/BTB-024-ui-mobile-support/BTB-024-requirements.md b/docs/spec/BTB-024-ui-mobile-support/BTB-024-requirements.md new file mode 100644 index 0000000..052f647 --- /dev/null +++ b/docs/spec/BTB-024-ui-mobile-support/BTB-024-requirements.md @@ -0,0 +1,17 @@ +--- +specId: BTB-024 +title: ui-mobile-support — Mobile layout baseline +owner: Vincent +status: implemented +--- + +# BTB-024-requirements.md + +## 1) Requirements + +- [ ] BTB-024-REQ-001: Pages usable at ~420px width. +- [ ] BTB-024-REQ-002: Tool layouts stack/fit on mobile. + +## 3) Test plan + +- E2E: mobile viewport tests. diff --git a/docs/spec/BTB-025-ui-url-input-policy/BTB-025-architecture.md b/docs/spec/BTB-025-ui-url-input-policy/BTB-025-architecture.md new file mode 100644 index 0000000..47026bc --- /dev/null +++ b/docs/spec/BTB-025-ui-url-input-policy/BTB-025-architecture.md @@ -0,0 +1,13 @@ +--- +specId: BTB-025 +title: ui-url-input-policy — Architecture +owner: Vincent +status: implemented +--- + +# BTB-025-architecture.md + +## 1) Architecture design + +- `src/lib/urlParams.ts` implements bounded param parsing. +- Individual tools opt into URL param support. diff --git a/docs/spec/BTB-025-ui-url-input-policy/BTB-025-requirements.md b/docs/spec/BTB-025-ui-url-input-policy/BTB-025-requirements.md new file mode 100644 index 0000000..29d3c61 --- /dev/null +++ b/docs/spec/BTB-025-ui-url-input-policy/BTB-025-requirements.md @@ -0,0 +1,26 @@ +--- +specId: BTB-025 +title: ui-url-input-policy — Only short bounded inputs/options in URL +owner: Vincent +status: implemented +--- + +# BTB-025-requirements.md + +## 0) Context + +- Problem: Large inputs in URL are unreliable and can leak sensitive data. + +## 1) Requirements + +- [ ] BTB-025-REQ-001: Only allow short bounded URL params. +- [ ] BTB-025-REQ-002: Enforce hard length limit for any text param (default 500 chars). +- [ ] BTB-025-REQ-003: Prefer URL for options; store large inputs locally. + +## 2) Acceptance criteria + +- [ ] BTB-025-AC-001: Long `text` params are ignored. + +## 3) Test plan + +- E2E: URL param tests cover behavior.