Daeseon Yoo
Back to project
·Tech retro·2 min

Admin project CRUD: full editor, featured toggle, GitHub-or-FS storage

Added /admin/projects with list, create, edit, delete, and inline featured toggle, backed by a new lib/project-storage.ts that mirrors the post storage split (GitHub commit in prod, local FS in dev).

What was done

Built the admin surface for managing /content/projects/{en,ko}/*.mdx files end-to-end, without leaving the browser:

The featured cap is shown in the header as n/3 but not enforced server-side — the home page's getFeaturedProjects already slices the top-3 by date, so over-selection in the admin is cosmetic.

Why it was needed

Original rationale not in commit; reconstructed from diff. Until this commit, projects were authorable only by hand-editing mdx files in the repo. Posts already had lib/storage.ts + an admin editor, so projects were the last content type lagging behind. The new helper mirrors the post path exactly, which preserves the dev-vs-prod write split documented in docs/architecture.md (never fs.writeFile in production — see the EROFS entry in troubleshooting).

Files / functions changed

Net: +855 lines across 9 files, all new (no existing files modified beyond AdminNav.tsx).

Result / verification

Commit landed in main. No verification artifacts attached to this commit (no follow-up test entry, no screenshots). The storage helper is a near-copy of lib/storage.ts, which is exercised by the post admin flow, so the prod-vs-dev branching is the same shape that already works.

Open / what didn't get done

Commit — 9d1972a