annotate .claude/skills/zenbu-personal-site/SKILL.md @ 256:30c2196d03d4

[site] Integrate Zenbu themes and components Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Tue, 04 Aug 2026 16:49:01 -0700
parents b8b6e726964a
children 60a876c4587a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
248
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
1 ---
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
2 name: zenbu-personal-site
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
3 description: Use this skill when updating the mrjunejune personal website, blog, resume, tools, notes/editor APIs, uploads, PWA assets, or deployment bundle.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
4 ---
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
5
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
6 # Mrjunejune Personal Site
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
7
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
8 Use this skill for `mrjunejune/`, the personal website served by a C backend.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
9
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
10 ## Structure
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
11
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
12 - `mrjunejune/main.c`: C web server, routes, APIs, S3 upload URL generation, editor persistence, media conversion, WebSocket chat.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
13 - `mrjunejune/src/`: static site source files and HTML templates.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
14 - `mrjunejune/src/parts/`: shared HTML includes used by `{{...}}` template placeholders.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
15 - `mrjunejune/src/public/`: public assets, PWA files, media, generated JS, icons, resume PDF.
256
30c2196d03d4 [site] Integrate Zenbu themes and components
MrJuneJune <me@mrjunejune.com>
parents: 248
diff changeset
16 - Zenbu UI assets are copied from `//design_system:components` and
30c2196d03d4 [site] Integrate Zenbu themes and components
MrJuneJune <me@mrjunejune.com>
parents: 248
diff changeset
17 `//design_system:styles` into `src/public/design-system/` by Bazel. Do not
30c2196d03d4 [site] Integrate Zenbu themes and components
MrJuneJune <me@mrjunejune.com>
parents: 248
diff changeset
18 hand-copy or fork shared component files.
248
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
19 - `mrjunejune/test/`: integration tests and snapshots.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
20 - `mrjunejune/BUILD`: Bazel build, bundle, asset movement, and test-visible filegroups.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
21 - `mrjunejune/.config` and `.config.development`: server configuration. Do not commit secrets.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
22
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
23 ## How rendering works
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
24
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
25 Handlers allocate a response body from `Dowa_Arena`, render an HTML file with `Seobeo_Render_Html_FilePath`, and return a response map:
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
26
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
27 ```c
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
28 Seobeo_Request_Entry *resp = NULL;
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
29 char *final_body = Dowa_Arena_Allocate(arena, 50 * 1024);
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
30 Seobeo_Render_Html_FilePath(final_body, "/tools/index.html", arena);
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
31 Dowa_HashMap_Push_Arena(resp, "body", final_body, arena);
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
32 return resp;
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
33 ```
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
34
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
35 The simple template renderer replaces `{{...}}` tokens with file contents loaded through `Seobeo_Web_LoadFile`.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
36
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
37 ## Routes and features
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
38
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
39 Existing route areas include:
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
40
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
41 - Home, resume, tools, markdown-to-HTML, file converter, blog, talk/chat, notes, and editor pages.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
42 - Redirect helpers built with `CREATE_REDIRECT_HANDLER`.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
43 - File/media conversion APIs using `ffmpeg` and temporary files under `/tmp`.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
44 - S3 presigned upload URL API using `Authorization: Bearer <token>`.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
45 - Editor save/load APIs backed by `deita` SQLite.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
46 - WebSocket chat broadcasting through seobeo WebSocket server APIs.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
47
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
48 When adding pages, add the HTML/CSS/JS under `src/`, register a route in `main.c`, and update tests/snapshots if the route should be covered.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
49
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
50 ## Build and test
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
51
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
52 ```bash
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
53 bazel build //mrjunejune:mrjunejune_server
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
54 bazel build //mrjunejune:mrjunejune_server_bundle
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
55 bazel test //mrjunejune/test:integration_test
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
56 ```
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
57
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
58 Use the debug server when investigating routing or networking:
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
59
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
60 ```bash
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
61 bazel build //mrjunejune:mrjunejune_server_debug -c dbg
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
62 ```
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
63
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
64 ## Production-minded checklist
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
65
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
66 - Use Dowa's fixed-width aliases and `boolean`/`TRUE`/`FALSE` in first-party C
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
67 instead of introducing `<stdint.h>` `_t` types or `<stdbool.h>` `bool`.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
68 - Keep auth-protected APIs strict: missing auth should be `401`, invalid token `403`, malformed JSON/input `400`, unavailable DB/S3/ffmpeg `500`.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
69 - Never hardcode secrets. Read configuration from `.config` or environment wiring already used by the Bazel target.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
70 - For uploads and downloads, validate filenames and content lengths before touching `/tmp`.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
71 - For binary responses, set `content-length` and avoid string-only operations on body bytes.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
72 - If a route is part of the public website, add or update snapshot coverage in `mrjunejune/test`.
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
73 - Keep PWA changes consistent across `manifest.json`, `sw.js`, icons, and `PWA_SETUP.md`.
256
30c2196d03d4 [site] Integrate Zenbu themes and components
MrJuneJune <me@mrjunejune.com>
parents: 248
diff changeset
74 - Site themes use `data-zen-theme` with Auto, Paper, Ink, and Playful states.
30c2196d03d4 [site] Integrate Zenbu themes and components
MrJuneJune <me@mrjunejune.com>
parents: 248
diff changeset
75 Preserve the More Sugar font aliases and keep theme-specific values in shared
30c2196d03d4 [site] Integrate Zenbu themes and components
MrJuneJune <me@mrjunejune.com>
parents: 248
diff changeset
76 design-system tokens rather than branching inside components.
248
b8b6e726964a [style] Use Dowa type aliases in C
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
77 - Reuse `seobeo`, `dowa`, `deita`, `s3`, and `markdown_converter` instead of adding parallel implementations.