|
| 1 | +# App catalog |
| 2 | + |
| 3 | +Each mini app lives under `apps/<name>/` with inline styles, a focused script, and any supporting datasets it needs. The landing page links directly to every `index.html`, and many collections ship an additional `all-*.html` archive that renders the full dataset in a searchable table. This catalog summarises the responsibilities, data dependencies, and regression coverage for each tool. |
| 4 | + |
| 5 | +## Dad Jokes (`apps/jokes`) |
| 6 | + |
| 7 | +- **Purpose.** Shuffle a curated deck of developer-friendly jokes, reveal punchlines on demand, and explore the full archive when you need deeper context. |
| 8 | +- **Key files.** |
| 9 | + - `index.html` – Deck UI with shuffle/prev/next controls, keyboard shortcuts, and a punchline toggle. |
| 10 | + - `app.js` – Guards missing DOM nodes, shuffles the dataset, renders the current joke, and wires keyboard shortcuts (`ArrowLeft`, `ArrowRight`, `Space`). |
| 11 | + - `jokes.js` – Dataset that assigns an array of `{ joke, punchline }` objects to `window.jokes`. |
| 12 | + - `all-jokes.html` & `render-all.js` – Table view with search/filter controls and a badge that reflects the dataset count via `data-count`. |
| 13 | +- **Data maintenance.** Update jokes with `tools/update-content-metadata.js`, regenerate embeddings with `tools/review-content-similarity.js`, and use the commands in `apps/jokes/AGENTS.md` to validate syntax and spot duplicates. |
| 14 | +- **Regression coverage.** `tests/jokes.spec.js` covers deck navigation; `tests/jokes-dataset.spec.js` verifies dataset invariants; `tests/home-navigation.spec.js` confirms the Home shortcut. |
| 15 | + |
| 16 | +## Quotes (`apps/quotes`) |
| 17 | + |
| 18 | +- **Purpose.** Surface themed quote decks with shuffle controls, reveal the full backlog, and maintain deterministic metadata for dedupe analysis. |
| 19 | +- **Key files.** |
| 20 | + - `index.html` – Shuffle UI mirroring the jokes experience. |
| 21 | + - `app.js` – Maintains the active deck, handles keyboard shortcuts, and toggles the quote attribution display. |
| 22 | + - `quotes-data.js` – Dataset assigned to `window.quotesData` with `{ text, author, tags }` entries. |
| 23 | + - `all-quotes.html` & `render-all.js` – Archive table with search and filter affordances plus the dataset count badge. |
| 24 | +- **Data maintenance.** Refresh the dataset metadata with `tools/update-content-metadata.js --dataset=quotes`, rerun embeddings for duplicate detection, and keep `data/quotes-embeddings*.json` in sync. Similarity overrides live in `data/similarity-overrides.json`. |
| 25 | +- **Regression coverage.** `tests/quotes.spec.js` exercises the deck UI, `tests/quotes-all.spec.js` covers the archive table, and `tests/quotes-data.spec.js` checks dataset integrity. |
| 26 | + |
| 27 | +## Slang (`apps/slang`) |
| 28 | + |
| 29 | +- **Purpose.** Educate visitors on trending internet slang with reveal-on-demand definitions and a searchable archive. |
| 30 | +- **Key files.** |
| 31 | + - `index.html` and `app.js` – Shuffle UI, reveal toggle, and keyboard shortcuts identical to the jokes/quotes decks but targeting `window.slangEntries`. |
| 32 | + - `slang.js` – Dataset assigned to `window.slangEntries`. |
| 33 | + - `all-slang.html` & `render-all.js` – Archive listing with search, filters, and the dataset count badge. |
| 34 | +- **Data maintenance.** Follow `apps/slang/AGENTS.md`: run the syntax checks, regenerate metadata (`tools/update-content-metadata.js --dataset=slang`), and refresh embeddings via `tools/review-content-similarity.js` for the synthetic, Hugging Face, and 128-dimension stores. |
| 35 | +- **Regression coverage.** `tests/slang-app.spec.js`, `tests/slang-all.spec.js`, and `tests/slang-dataset.spec.js` validate the UI, archive view, and dataset respectively. |
| 36 | + |
| 37 | +## Cosine Similarity Lab (`apps/similarity-report`) |
| 38 | + |
| 39 | +- **Purpose.** Visualise cosine-similar joke/quote/slang pairs, toggle datasets and providers, and inspect per-entry vector statistics. |
| 40 | +- **Key files.** |
| 41 | + - `index.html` – Standalone HTML+JS document that fetches the similarity reports under `data/`, renders dataset toggles, and presents side-by-side comparisons. |
| 42 | + - Consumes `data/similarity-report-*.json` plus overrides declared in `data/similarity-overrides.json`. |
| 43 | +- **Data maintenance.** Regenerate similarity reports with `tools/review-content-similarity.js` whenever embeddings change. The tool reads cross-deck reports (`data/similarity-report-cross-deck*.json`) alongside per-dataset outputs. |
| 44 | +- **Regression coverage.** `tests/similarity-report.spec.js` exercises dataset filtering, score thresholds, and keyboard shortcuts. |
| 45 | + |
| 46 | +## Asset Observatory (`apps/asset-observatory`) |
| 47 | + |
| 48 | +- **Purpose.** Provide a high-level dashboard for dataset counts, embedding stores, similarity reports, and upstream sources powering the toolbox. |
| 49 | +- **Key files.** |
| 50 | + - `index.html` – Layout and visualisations for the dataset cards, provider summaries, cross-deck rollups, and ledger table. |
| 51 | + - `app.js` – Loads `asset-data.js`, renders the dashboard, and wires filtering controls. |
| 52 | + - `asset-data.js` – Machine-generated snapshot produced by `tools/generate-asset-report.js`. |
| 53 | +- **Data maintenance.** Run `node tools/generate-asset-report.js` whenever datasets, embeddings, or similarity reports change. The `apps/asset-observatory/AGENTS.md` file captures the workflow and regression command. |
| 54 | +- **Regression coverage.** `tests/asset-observatory.spec.js` ensures cards, charts, and counts stay aligned with the snapshot. |
| 55 | + |
| 56 | +## Embedding Explorer (`apps/embedding-explorer`) |
| 57 | + |
| 58 | +- **Purpose.** Inspect embedding vectors, compare dataset records, and visualise high-impact dimensions. |
| 59 | +- **Key files.** |
| 60 | + - `index.html` – Dashboard layout with dataset selector, record filter, neighbor list, and dual canvas plots. |
| 61 | + - `app.js` – Parses sample embeddings, decodes base64 vectors, computes statistics, renders histograms, and highlights the strongest positive/negative dimensions. |
| 62 | + - `sample-embeddings.js` – Bundled dataset and metadata sources exposed as `window.embeddingExplorerSamples` and `window.embeddingSources`. |
| 63 | +- **Data maintenance.** Update `sample-embeddings.js` when adding new demo vectors. The explorer reads live datasets by decoding the base64 payloads from the embeddings stores in `data/` when available. |
| 64 | +- **Regression coverage.** `tests/embedding-explorer.spec.js` verifies dataset switching, record filtering, neighbor insights, and chart rendering. |
| 65 | + |
| 66 | +## Value Formatter (`apps/value-formatter`) |
| 67 | + |
| 68 | +- **Purpose.** Transform newline-separated values into templated output for quick copy/paste workflows. |
| 69 | +- **Key files.** |
| 70 | + - `index.html` – Single-page interface with preset transforms, custom transform inputs, and textareas for input/output. Stores the latest input in `localStorage` so the session persists. |
| 71 | + - All logic lives inline inside `<script>` tags; the app does not depend on external datasets. |
| 72 | +- **Data maintenance.** None required beyond keeping the presets up to date. The tool stores user input locally and has no background data dependencies. |
| 73 | +- **Regression coverage.** `tests/value-formatter.spec.js` validates presets, persistence, and manual transformations. |
| 74 | + |
| 75 | +## Landing page integration |
| 76 | + |
| 77 | +- Every app exposes a “Home” navigation link that returns to `../../`, satisfying `tests/home-navigation.spec.js` and `tests/home.spec.js`. |
| 78 | +- The landing page’s `tests/index.spec.js` ensures new tools register their cards and developer shortcuts. |
| 79 | +- When adding an app, update `index.html` with the new card and extend the offline manifest so the service worker caches the new assets. |
0 commit comments