Reviewed-on: #1
poli0981.dev
The personal site of Kokone (SkullMute) — dev portfolio, blog, short fiction and a hub for the SkullMute channel, in Vietnamese and English. Live at poli0981.dev.
Trang cá nhân của Kokone (SkullMute): dự án, blog, truyện ngắn và kênh SkullMute — song ngữ Việt/Anh. Tài liệu thiết kế đầy đủ (tiếng Việt) nằm trong
poli0981.dev-docs/.
Status
Maintenance mode since v2.3.0 (November 2026). The site is complete. It still gets
dependency updates, security fixes (High/Critical advisories, runtime vulnerabilities), major
runtime and framework upgrades, bug fixes (UI/UX and accessibility included) and language fixes,
but no new features; requests for one are closed. Details: CONTRIBUTING.md.
Where things live
Source: git.poli0981.dev/poli0981/poli0981-dev
(canonical, on the owner's Gitea since November 2026; the GitHub repository is gone). Mirror for
issues and merge requests: gitlab.com/poli0981/poli0981-dev.
Patches and questions: code@poli0981.dev. Security: security@poli0981.dev (see
SECURITY.md).
Trạng thái: chế độ bảo trì từ v2.3.0 — chỉ cập nhật dependency, vá bảo mật, nâng cấp runtime/framework, sửa lỗi (cả UI/UX, accessibility) và sửa lỗi ngôn ngữ; không thêm tính năng mới.
Stack
| Layer | Choice |
|---|---|
| Framework | Astro 7 (static-first) with Svelte 5 islands |
| Styling | Tailwind CSS 4, design tokens in src/styles/global.css ("Glacier Teal" palette) |
| Hosting | Cloudflare Workers + Static Assets; KV, R2, Images, Rate Limiting, Access, Turnstile |
| Content | Markdown/MDX in poli0981/content (git submodule src/content) |
| Search | Pagefind (built after astro build) |
| Tooling | Node 26 · TypeScript 7 (tsc) next to TypeScript 6 (astro check, typescript-eslint) · node:test · ESLint · Prettier · knip |
| Quality | Qodana · gitleaks · Opengrep · OSV-Scanner · Renovate (3-day wait) · axe-core gate · licence check |
| CI | Gitea Actions (.gitea/workflows); main deploys with Wrangler from CI |
How it fits together
visitor ─▶ Cloudflare edge ─▶ src/worker.ts (every request, pages included)
www → apex · IP denylist (KV) · admin host split · /media (R2) · /ext-img (KV)
Turnstile gate (48-hour pass) · static pages from ASSETS · the rest → Astro app
├─ /api/report, /api/gate, /api/widgets, /api/health
└─ admin.poli0981.dev (Cloudflare Access + JWT check)
workers/widgets (cron, every 45 min) ─▶ YouTube / Steam / Gitea ─▶ KV (data + mirrored images)
Almost every page is prerendered. The Worker entry runs first for every route so the bot gate,
the denylist and the security headers also cover static pages. Details:
02_ARCHITECTURE.md and 06_SECURITY.md.
Getting started
Requirements: Node 26 (.nvmrc) and npm 11. The content submodule is public, so a plain clone works.
git clone --recurse-submodules https://git.poli0981.dev/poli0981/poli0981-dev.git
cd poli0981-dev
npm ci --ignore-scripts && npm run check-install-scripts
npx lefthook install
npm run types && npm run types:widgets
npm run dev
npm run dev runs Astro on workerd with local bindings. The admin works locally with a stand-in
identity (dev@localhost); saving content needs a Gitea token as GITEA_BOT_TOKEN in .dev.vars.
Commands
| Command | What it does |
|---|---|
npm run dev |
Dev server (workerd, local KV/R2) |
npm run build |
astro build → OG images → Pagefind index → CSP hash check |
npm run preview |
Serve the build |
npm run check |
astro check (TypeScript 6 language service) |
npm run typecheck |
tsc from TypeScript 7 for the site and the widgets worker |
npm run lint · npm run format:check · npm run knip |
ESLint · Prettier · unused files/exports |
npm test · npm run test:coverage |
node:test suites; coverage writes coverage/lcov.info (80% line floor) |
npm run smoke |
Runs the built Worker with wrangler dev and probes pages, headers, the gate and the denylist |
npm run test:a11y |
axe-core, keyboard, reflow and forced-colours checks against npm run preview (Chrome) |
npm run probe:ratelimit -- [url] [requests] [parallel] |
Spams a live URL and counts 429s from the Worker's site-wide limit vs. the WAF rule |
npm run new:post |
Scaffold a post or story from docs/templates/ |
npm run check-exif · npm run strip-exif |
Refuse / remove GPS and camera metadata in images |
npm run gen-notices |
Regenerate THIRD-PARTY-NOTICES.md (CI checks it) |
Deploying
CI deploys main: after build passes on a push to main, the deploy job in
.gitea/workflows/ci.yml rebuilds with the production settings, runs
npx wrangler deploy and waits until https://poli0981.dev/api/health reports that commit. Pull
requests get no preview versions. The runner lives on the owner's PC, so a merge made while it is
off deploys when it comes back. (Cloudflare Workers Builds did this until it went with the GitHub
repository in November 2026.) The widgets worker deploys by hand:
npx wrangler deploy --config workers/widgets/wrangler.jsonc.
Setup from scratch: 07_CLOUDFLARE_SETUP.md;
pipeline: 08_CI_CD.md; changes per release: CHANGELOG.md.
Admin
admin.poli0981.dev is the owner's editor: write and edit posts (commits to the content repo),
upload images (transformed once into AVIF/WebP and stored in R2), manage gallery albums, set
content labels and age ratings, review an audit log and manage the IP denylist. Every save or
delete publishes itself: it starts a submodule-bump PR that CI must pass, which then merges and
deploys, and the admin follows it until the change is live (/api/health reports the content
commit too). It sits behind Cloudflare Access, and the Worker independently verifies the Access
JWT (≤ 24 hours old) and an email allowlist on every request.
Security
Please report vulnerabilities privately, by e-mail — see SECURITY.md. Bug
reports from the site's "Report a bug" button become confidential issues on the GitLab mirror,
visible only to the maintainer.
Accessibility
The site aims for WCAG 2.2 AA and checks it on every pull request (axe-core over every page, plus
keyboard, reflow and forced-colours tests). What is in place, what is known not to work and how to
report a barrier: ACCESSIBILITY.md; the statement for visitors is at
/legal/accessibility. Barriers can be reported to
accessibility@poli0981.dev.
License
- Code: GPL-3.0-only.
- Content (posts, stories, photographs — the
poli0981/contentsubmodule,src/assets/, uploaded media): all rights reserved, seeCONTENT-LICENSE.md. - Third-party packages and fonts:
THIRD-PARTY-NOTICES.md. - How AI was used to build the site:
/legal/ai-usage.