Skip to content

Docy — the Notes Content Repo

Docy (EdikyLab/Docy) is the private repository holding all lecture notes rendered in the learning workspace — 747 markdown files across cn/ os/ dbms/ oop/ dsa/ sql/ stl/ lld/ hld/ sql-practice/ tools/. It has no build, no framework, no deploy: it's markdown in folders, and that's the point.

The runtime model: edit → live, no redeploy

Notes are fetched at runtime through two Pages Functions on the website — list-notes (chapter list for a subject) and get-notes (file body) — which proxy GitHub's Contents API with a server-side GITHUB_TOKEN:

diagram100%
rendering diagram…

drag to pan · ctrl / ⌘ + scroll to zoom

Two properties fall out of this design:

  1. Zero-redeploy content updates — push a fix to Docy and the live site serves it on the next fetch. Notes iterate daily; the website deploys when code changes. Contrast with the question bank, which is deliberately baked in at build time (Question Bank) — different change cadences, different pipelines.
  2. The repo stays private — the token lives only in the Pages Function environment. The client never sees it and never talks to GitHub.

Conventions

  • Numeric filenames (01.md, 02.md, …) per subject folder — list-notes ordering and the playlist↔chapter mapping in SubjectLayout rely on the numeric sort. Renaming breaks chapter order; insertions renumber.
  • Standard markdown + LaTeX (KaTeX) + code fences — same rendering pipeline as the question bank, so anything valid there is valid here.
  • Annotations anchor to this content from the user's side (Notes System); a Docy edit can drift anchors, which the fuzzy-text fallback re-locates.

The token incident

The original GITHUB_TOKEN was exposed and revoked — the useful part is what changed after: the replacement is a fine-grained token scoped to read-only, Docy-only, stored exclusively in the Pages env (rotatable without a deploy), and the functions fail with an explicit "token missing/expired" 500 rather than an empty notes pane, so an expiry is diagnosable in seconds. Secrets get the same treatment everywhere now: minimum scope, server-side only, loud failure.

Working in Docy

Clone, edit, push — that's the workflow (Development Setup). There's no lint gate here (prose, not structured questions), so the review discipline is human: check rendering in the workspace after pushing, especially KaTeX blocks, which fail more visibly than plain text.

Ediky Workflow — internal engineering documentation.