whiskers.git / web / worker / src / README.md
1# worker/src
2
3| File | What |
4| --- | --- |
5| `lib.rs` | The router and fetch handler: routes, origin, the cached stylesheet, security headers. |
6| `explain.rs` | The section on where Jev is used: the diagram, the topics and threshold, three real requests. Read from the code's own data; its tests hold it to that. |
7| `view.rs` | Pages as pure functions (maud): the page, and the fragments a mood, mascot or tour change replaces (the cat, caption, stages, the mood pills with the playing one's hourglass and countdown, and the Play tour / Pause tour button). Its tests are the page's contract. |
8| `pic.rs` | A pixel icon (`site::config::Pic`) and the icon, row-header, text table the page uses for lists of facts. |
9| `media.rs` | `/preview/loop.mp4` with byte ranges (header logic; which bytes is `site::range`). |
10| `headers.rs` | The Content-Security-Policy and the headers every response gets. |
11| `log.rs` | What is logged and at which level; built only from closed types so no visitor can be in it. |
12| `page.css` | The page's own styles, inlined after the shared sheet. |