Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions .assetsignore

This file was deleted.

25 changes: 0 additions & 25 deletions .cfignore

This file was deleted.

41 changes: 7 additions & 34 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,17 @@
## Project Overview

A progressive web app for browsing Marcus Jastrow's Dictionary of the
Targumim, Talmud Babli, Yerushalmi and Midrashic Literature.
Vanilla JavaScript, no framework, no bundler. Deployed as a static
site on Cloudflare Pages at jastrow.app.
Targumim, Talmud Babli, Yerushalmi and Midrashic Literature. Deployed as a static site on Cloudflare at jastrow.app.

## Rules

Before writing or modifying code that uses Web Awesome components, read
the relevant component docs at `~/.claude/skills/webawesome/references/components/<component-name>.md`.

## Tech Stack

- **Runtime:** Browser (vanilla JS, no build step)
- **Components:** Web Awesome (loaded via CDN kit)
- **Icons:** Font Awesome Pro (CDN kit)
- **Fonts:** Lexend (headings), Atkinson Hyperlegible Next (body)
- **Data:** JSONL dictionary files loaded into IndexedDB
- **Hosting:** Cloudflare Pages (static, no server)
- **Runtime:** Browser
- **Components:**
- **Icons:** Font Awesome Pro
- **Fonts:** Lexend (headings), Atkinson Hyperlegible Next (body), ??? (Hebrew)
- **Data:**
- **Hosting:** Cloudflare
Comment on lines 9 to +16

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fill in placeholder Tech Stack bullets.

"Components:" and "Data:" are left blank, and Hebrew font is a literal "???" placeholder. Since this file guides Claude/AI assistants working in the repo, incomplete entries reduce its usefulness until filled in for the v2 stack.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/CLAUDE.md around lines 9 - 16, The Tech Stack section still has
placeholder entries for Components, Data, and the Hebrew font, which makes the
repo guidance incomplete. Update the CLAUDE.md tech stack bullets with the
actual component library, data layer, and Hebrew font used by the v2 stack, and
remove the literal placeholder text so the values are specific and actionable.
Use the existing Tech Stack list items as the place to fill in the missing
symbols.

- **Lint:** Biome

## Quality Gate
Expand All @@ -37,24 +31,3 @@ Feature branches off `main`. Never commit directly to `main`.
**Commit format:** `<emoji> <type>([scope]): <description>` — 50 char
max, imperative, lowercase. Types: `new` 🦄 / `improve` 🌈 / `fix` 🦠
/ `chore` 🧺 / `release` 🚀 / `doc` 📖 / `ci` 🚦

## Key Architecture

- `index.html` — Single-page app shell
- `sw.js` — Service worker (cache-first for assets, network-first for
app files, IDB for data)
- `assets/scripts/app.js` — Main app logic, routing, UI
- `assets/scripts/data-loader.js` — JSONL parsing, IndexedDB storage
- `assets/scripts/scroll-manager.js` — Bidirectional infinite scroll
with offscreen staging
- `assets/scripts/sages*.js` — Talmudic sages graph/sidebar
- `data/admin/` — Local-only Bun annotation server (not deployed)

## Conventions

- No `var` — use `const`/`let`
- DOMPurify for all user-content rendering (loaded via CDN with SRI)
- Hash-based routing (`#headword`, `#rid:ID`, `#sages`, etc.)
- Service worker bypasses data files — IndexedDB handles persistence
- Web Awesome components render async — use offscreen staging pattern
for scroll prepends (see `scroll-manager.js`)
5 changes: 0 additions & 5 deletions .gitattributes

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ runs:
# lifecycle scripts by default, so Playwright's browser download is
# skipped (only registry.npmjs.org is needed — see harden-runner egress).
shell: bash
run: bun install --frozen-lockfile
run: bun ci
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
biome = "2.4.16"
biome = "2.5.2"
bun = "1.3.14"
39 changes: 0 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,6 @@ Thank you for your interest in contributing!

## Getting Started

1. Fork the repository
2. Install once at the repo root: `bun install` (light — no Chromium).
See the [README](README.md#local-development) for serving the site
and running the admin tool.
3. Create a feature branch (`git checkout -b my-feature`)
4. Make your changes
5. Run the quality gate: `biome check .` (and `bun run validate:data` if
you touched `data/**`)
6. Commit using the project's commit format (see below)
7. Push to your fork and open a pull request

New to the codebase? Start with the
[Architecture & Module Map](docs/architecture.md) — the app is vanilla
JS with no build step, wired together through `window` globals.

## Contributing Data

The dictionary text lives in two JSONL files
(`data/jastrow-part1.jsonl`, `data/jastrow-part2.jsonl`), **one entry per
line**.

**Edit data through the admin tool — do not hand-edit the JSONL.** The
admin tool writes a stable, compact serialization and bumps
`data/version.json` for you. Hand-editing risks reformatting the whole
file (a 16k-line diff from a one-word fix) and corrupting structure.

Workflow:

1. Start the admin server: `bun run admin`, then open
`http://localhost:3333` (see [README](README.md#admin-tooling)).
2. Find and edit the entry. The tool saves to the JSONL on disk.
3. Review the diff (`git diff data/`), commit, open a PR.

The entry shape and the allowed HTML are documented in the
[Entry Schema reference](docs/data-entry-schema.md). On save (and in CI)
entry HTML is checked against a fixed allow-list — disallowed markup
(e.g. `<script>`, `javascript:` hrefs) is **rejected**, nothing is
written.

### Size policy for data PRs

Each entry is one dense line of scholarship, so review is careful and
Expand Down
105 changes: 5 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
> **⚠️ v2 branch** — this is the v2 overhaul integration branch. The v1
> public app has been removed here (subtractive start); the live site
> is built from `main`. See
> `docs/specs/2026-07-03-v2-overhaul-design.md` for the plan.

# Jastrow Dictionary

A progressive web app for browsing and searching Marcus Jastrow's
Expand All @@ -15,106 +20,6 @@ Midrashic Literature* (1903).
- **Talmudic Sages explorer** — interactive graph of rabbis mentioned in the Talmud
- **Shareable URLs** — link directly to any entry, page, or search

## Tech Stack

- Vanilla JavaScript (no framework, no bundler)
- [Web Awesome](https://www.webawesome.com/) component library
- Cloudflare Pages (static hosting)
- IndexedDB for offline data persistence

## Local Development

Serve the root directory with any static HTTP server:

```bash
# Using Python
python3 -m http.server 8000

# Using Bun
bunx serve .

# Using npx
npx serve .
```

Then open `http://localhost:8000` in your browser.

### Admin Tooling

The `data/admin/` directory contains a Bun-based annotation server for
editing dictionary entries, abbreviations, sages, and annotations.
It also hosts the **Rabbinic Time PDF builder**. It is local-only and
never deployed.

**One-time setup** — a single install at the repo root pulls in every
dependency (admin server, Biome, validators):

```bash
bun install
```

This install stays light: it does **not** download Chromium. Only run
the PDF builder's extra setup if you intend to rebuild the Rabbinic Time
PDF (installs Playwright + Chromium and stages bundled assets):

```bash
bun run setup:pdf
```

**Start the server:**

```bash
bun run admin
```

Then open `http://localhost:3333`. Set `PORT=…` to override the port.

#### Building the Rabbinic Time PDF

The site's Rabbinic Time dialog links a downloadable PDF at
[`assets/pdfs/rabbinic-time.pdf`](assets/pdfs/rabbinic-time.pdf).
Rebuild it whenever you edit `assets/scripts/rabbinic-time.js` or
`assets/styles/rabbinic-time.css`:

- **Admin UI:** open the **Builds** tab and click **Build PDF**.
- **CLI (admin server running):**
`curl -X POST http://localhost:3333/api/builds/rabbinic-time-pdf`
- **CLI (no server):**
`bun data/admin/pdf-builds/render-rabbinic-time.ts`

All three paths write to `assets/pdfs/rabbinic-time.pdf`. The print
HTML at `data/admin/pdf-builds/rabbinic-time.html` loads the live
site's CSS/JS via relative path, so there is no copy step or drift.

Commit the regenerated `assets/pdfs/rabbinic-time.pdf` so the deploy
ships the updated download.

**Edit-entry shortcut on the public site:**

When the `jastrow:admin` localStorage flag is set, each entry renders
a small pencil icon next to its permalink that opens that entry in
the local admin tool (via `#rid:<RID>`). Toggle in the browser console:

```js
localStorage.setItem('jastrow:admin', '1'); // enable
localStorage.removeItem('jastrow:admin'); // disable
```

The flag is per-browser; the shortcut expects the admin server to be
running on `localhost:3333` — if it isn't, the link simply fails to
load.

## Data Attribution

The dictionary data is derived from
[Sefaria's](https://www.sefaria.org/) digitization of Marcus Jastrow's
dictionary. Sefaria's content is licensed under
[CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/). The raw
source data is preserved in `data/raw/` under its original license.

Abbreviation data includes contributions from Ezra Brand's abbreviation
dictionary.

## License

Code is licensed under [MIT](LICENSE).
Expand Down
53 changes: 0 additions & 53 deletions _headers

This file was deleted.

Binary file removed assets/images/favicon/apple-touch-icon.png
Binary file not shown.
Binary file removed assets/images/favicon/favicon-96x96.png
Binary file not shown.
Binary file removed assets/images/favicon/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion assets/images/favicon/favicon.svg

This file was deleted.

21 changes: 0 additions & 21 deletions assets/images/favicon/site.webmanifest

This file was deleted.

Binary file removed assets/images/favicon/web-app-manifest-192x192.png
Binary file not shown.
Binary file removed assets/images/favicon/web-app-manifest-512x512.png
Binary file not shown.
Loading
Loading