- api/src/git.ts: each published version is a commit in the divan-data checkout (queued, one at a
time): the moderator as author by public name with a placeholder email, the summary and version
in the message, Reviewed-by / Approved-by / Divan-Revision / Divan-Version trailers;
DIVAN_GIT_PUSH=1 pushes. The commit id is kept with the revision.
- Privacy fix: published files and commits carry public names (profile name, else 'موڈریٹر <id>'),
never email addresses (divan-data is public).
- Poem pages: 'دیوان کا ورژن …' with who edited, reviewed and published, the date, and a link to
the commit diff (DIVAN_DATA_COMMIT_URL).
- deploy/sync.sh: pull --rebase so publishing commits are kept.
- Admins are super moderators (documented).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- revisions (a work's Divan text, summary, status, author/reviewer/publisher, the text it started from)
and revision_events (who did what, with comments): the review thread and the moderation log.
- API (api/src/moderation.ts): what a moderator may do on a work, queue, drafts (one open draft per
person and work), save, submit, approve, return/reject (reason required), publish; history; log.
Rules come from the IAM grants: L2 drafts, an L1 covering the work reviews, an admin publishes; L1
drafts go to the admin, admin drafts publish directly. Publishing numbers the version, writes it
to divan-data (owned.ts) and updates the site; a draft based on an older version is refused (409).
- Line diff (api/src/diff.ts) against the text a draft started from.
- Site: ترمیم کریں / تاریخچہ on works, /mod (queue, activity log), /mod/rev/<id> (editor with the Urdu
keyboard and Roman typing, diff, preview, actions, timeline), /mod/work/<id> (versions).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- api/src/owned.ts: fromPoem (a work as Divan text, the start of an edit) and writeOwned (the .dtx
source and the generated .json into divan-data/divan/); a CLI for writing one by hand.
- Divan text: chapter headings and sub-headings with levels, as their own verse entries.
- All 11,087 works convert to Divan text and back unchanged (apart from repeated spaces, and raw
'== … ==' markers in prose becoming headings).
- docs/content-model.md: the content management model (what is identified, versions and who did
what (#51), tags and tag search (#52), storage).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>