feat(ADM-018): completed feature

This commit is contained in:
chattie
2026-08-17 22:23:10 +02:00
parent cf1c69fc8b
commit d595b4871f
871 changed files with 47411 additions and 281 deletions

View File

@@ -0,0 +1,23 @@
# Implementer — F-026 CMS module
## Summary
Implemented simple CMS module with slug-based public pages and draft/publish states. Slug uniqueness enforced at DB level. Admin operations require admin role.
## Files changed
- `project/migrations/020_cms.js`
- `project/src/modules/cms/**`
- `project/src/app/build-app.ts`
## Acceptance evidence
- AC1 published page: `cms-service.test.ts` returns page for published status.
- AC2 draft page: same test rejects with `PageNotPublishedError`.
- AC3 duplicate slug: schema enforces UNIQUE (slug); repository uses ON CONFLICT DO NOTHING and service throws DuplicateSlugError.
## Commands run
- `cd project && npm run lint/typecheck/build/test` passed
- `cd project && TEST_DATABASE_URL='postgres://mdv:mdv_dev_only@localhost:5432/mdv_test' npm run test:integration -- migrations.itest` passed; 14 files, 53 tests
- `./scripts/verify.sh` passed
## Notes
- Slugs restricted to kebab-case via zod regex.
- Public store front consumption is out of scope for this slice; service exposes `getPublicPageBySlug` which throws when status is not 'published'.