34 lines
936 B
Markdown
34 lines
936 B
Markdown
# CRUD Baseline
|
|
|
|
## Scope
|
|
|
|
MVP0 now includes a shared CRUD foundation package: `@cms/crud`.
|
|
|
|
Current baseline:
|
|
|
|
- Shared service factory: `createCrudService`
|
|
- Shared validation error type: `CrudValidationError`
|
|
- Shared not-found error type: `CrudNotFoundError`
|
|
- Shared mutation audit hook contract: `CrudAuditHook`
|
|
- Shared mutation context contract (`actor`, `metadata`)
|
|
|
|
## First Integration
|
|
|
|
`@cms/db` `posts` now uses the shared CRUD foundation:
|
|
|
|
- `listPosts`
|
|
- `getPostById`
|
|
- `createPost`
|
|
- `updatePost`
|
|
- `deletePost`
|
|
- `registerPostCrudAuditHook`
|
|
|
|
Validation for create/update is enforced by `@cms/content` schemas.
|
|
|
|
The admin dashboard currently includes a temporary posts CRUD sandbox to validate this flow through a real app UI.
|
|
|
|
## Notes
|
|
|
|
- This is the base layer for future entities (pages, navigation, media, users, commissions).
|
|
- Audit hook persistence/transport is intentionally left for later implementation work.
|