Richer comments, the SQL first
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
#177. Comments only, about 6,000 lines across 80 files, so a newcomer can follow the code without reverse-engineering it. - server/schema.sql: every table and its non-obvious columns, every index and the query it serves, every function (purpose, arguments, result, algorithm, locking, cost, with step comments in its body, including the generated versioned and lineage variants), and every idempotent upgrade. - SQL in the server (store, the versioned index and history, accounts, moderation, administration, collaboration, retention, the log receivers and the request router): each non-trivial query says what it reads or changes and why, with its locks, isolation, CTEs, ON CONFLICT and the indexes it relies on; every function has JSDoc. - SQLite in the desktop's native store, and the Tauri commands. - The editor modules and website components that had fewest comments. Comments found wrong or stale were corrected, and a few that sat above the wrong function were moved to theirs. The code is unchanged: compared token by token with comments removed, and every function, table and index the schema creates is identical to before apart from comments. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/4c2faaee586be232e024d7d903941a4bb9bb0089