Commit Graph
7 Commits
Author SHA1 Message Date
dong.nguyen a3662a9521 refactor(ids): generate content id unions from the structure documents
scripts/generate-content-types.ts writes the gitignored src/types/content-ids.ts (id unions + project category values) from the four structure documents; wired as generate:ids / predev / prebuild / prepare. src/types/index.ts re-exports them type-only and keeps only the code-owned unions.

Edit mode now writes JSON only: the v4 union leg is deleted (saveIdUnions, diffIdsWithUnions, applyUnionChanges, readUnionBlock, the EditBar union card, edit.union.* labels). Validator rule 7 requires a label for every category a project uses, in both ui/projects.json documents.

Tests: smoke-draft.ts 11/11 (rename re-sluging + category-label rule replace checks 9-12); new scripts/smoke-generated-ids.ts 7/7. Verified: pnpm build (chunk names unchanged, no runtime reference to the generated module), lint with no new warnings, validate:content, resume HTML byte-identical before/after with identical documents.

Docs: spec-v5-generated-content-ids.md added; spec-v4-live-edit.md §3.1 marked superseded + §12 row 23; AGENTS.md and README.md updated.
2026-10-24 13:16:18 +07:00
dong.nguyen cf216e5962 fix(infra): working container entrypoint; add local-only ports override
- compose.yaml: set -a before sourcing (sourced assignments were shell-only, envsubst saw nothing) + inline nginx command (a compose entrypoint override drops the image CMD; empty $@ exit-0 restart-looped locally and on the VPS)
- compose.override.yaml: local-only auto-merged override publishing 127.0.0.1:8081 (8080 taken on the dev machine); never shipped by the pipeline
- verified locally end-to-end: stack Up, probe 200, rendered default.conf carries real values, nginx -t OK; built site + 401-protected /api/content/ served through the published port
- docs: spec D13/§4.1 entrypoint corrected, §6 port-exposure open question + docker inspect check, rows 4/9; README local-stack section; AGENTS.md inventory
2026-10-24 00:44:20 +07:00
dong.nguyen 85f9e3429c docs(readme): local setup + production deploy via Gitea CI; refresh live-edit spec status
README replaces the Vite starter template: requirements, .env variables (SITE_URL/SITE_NAME build identity, GITEA_* edit path), all scripts with validation gate and PDF-lock gotcha, optional local nginx stack, deploy.yml/deploy-infra.yml pipeline table, one-time Gitea setup (Actions variables SITE_URL/SITE_NAME per deploy-infra rev.7, DEPLOY_* SSH secrets with the Windows key procedure, stack secrets/site_config, htpasswd edit login). spec-v4-live-edit.md: status line refreshed (content docs on master, nginx step automated repo-side, remaining owner-side items), date typo 2022->2026, section 6.3 marked superseded by deploy-infra.
2026-10-23 22:58:16 +07:00
dong.nguyen 8edc53c969 docs(readme): replace VPS host and SSH port with placeholders 2026-10-21 13:29:36 +07:00
dong.nguyen 459781d251 updated docu 2026-10-10 14:14:05 +07:00
dong.nguyen ef3977f4be updated docu 2026-10-10 14:02:47 +07:00
dong.nguyen 519d48ddae init code 2026-10-04 09:34:55 +07:00