You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 11, 2026. It is now read-only.
AWCMS-Mini already provides the base platform capabilities: Bun runtime, Astro 7, PostgreSQL, modular monolith architecture, tenant-aware design, RBAC/ABAC, PostgreSQL RLS, audit logging, OpenAPI/AsyncAPI contracts, admin shell, and production-oriented deployment.
This Epic adds a new derived module named blog_content for blog and content management. EmDash is used only as UX and feature inspiration. Do not import EmDash, do not add its plugin system, and do not introduce Node/npm/pnpm/yarn workflows.
Objective
Build a tenant-scoped blog/content management module for AWCMS-Mini that supports:
Blog posts
Static pages
Draft, review, scheduled, published, and archived lifecycle
blog_content module exists under src/modules/blog-content.
Module descriptor key is blog_content.
Module version starts at 0.1.0.
Module status is experimental.
No duplicate auth, tenant, RBAC, ABAC, audit, sync, or admin shell system is introduced.
No EmDash dependency is added.
No npm, pnpm, yarn, or Node.js workflow is introduced.
Database and Security
All blog tables are created via numbered SQL migrations.
Tenant-scoped tables include tenant_id.
Tenant-scoped tables use ENABLE ROW LEVEL SECURITY.
Tenant-scoped tables use FORCE ROW LEVEL SECURITY.
Tenant isolation policies are implemented.
Least-privilege grants are applied to awcms_mini_app.
Slug uniqueness is enforced per tenant and locale where applicable.
Soft delete fields exist where deletion is supported.
High-risk mutations require idempotency.
High-risk actions write audit events.
Public content queries never leak draft, review, scheduled-future, archived, private, unlisted, or deleted content.
Rendering rejects or sanitizes unsafe content.
API and Events
Admin API uses existing session/auth pattern.
Tenant context is enforced.
RBAC/ABAC default-deny behavior is enforced.
OpenAPI is updated.
AsyncAPI is updated for meaningful blog events.
Error responses do not expose stack traces or secrets.
UI
Admin UI uses existing AWCMS-Mini admin shell.
Astro + vanilla JS pattern is preserved.
No new frontend framework is added.
Loading, empty, error, and ready states exist.
High-risk actions require explicit confirmation.
Double-submit is prevented.
UI follows accessibility-aware labels, focus states, contrast, and keyboard navigation.
Testing
Before closing this Epic, these commands must pass:
bun run db:migrate
bun run api:spec:check
bun run typecheck
bun run test
bun run build
bun run check
bun run production:preflight
Risks and Mitigations
Risk: Scope becomes too large
Mitigation: implement through child issues and review each PR independently.
Risk: Public routes leak non-public content
Mitigation: centralize public visibility predicate and cover it with tests.
Risk: XSS from rich content
Mitigation: store structured JSON as source of truth, validate content blocks, sanitize rendering, and reject script tags, inline JavaScript, unsafe iframe/embed content, and unsafe URLs.
Risk: RLS is incomplete
Mitigation: every migration must include ENABLE ROW LEVEL SECURITY, FORCE ROW LEVEL SECURITY, tenant isolation policy, and integration tests.
Context
AWCMS-Mini already provides the base platform capabilities: Bun runtime, Astro 7, PostgreSQL, modular monolith architecture, tenant-aware design, RBAC/ABAC, PostgreSQL RLS, audit logging, OpenAPI/AsyncAPI contracts, admin shell, and production-oriented deployment.
This Epic adds a new derived module named
blog_contentfor blog and content management. EmDash is used only as UX and feature inspiration. Do not import EmDash, do not add its plugin system, and do not introduce Node/npm/pnpm/yarn workflows.Objective
Build a tenant-scoped blog/content management module for AWCMS-Mini that supports:
Scope
In Scope
blog_contentmodule descriptorOut of Scope
Child Issues
Recommended Implementation Order
blog_contentModule and Core Database FoundationGlobal Acceptance Criteria
Architecture
blog_contentmodule exists undersrc/modules/blog-content.blog_content.0.1.0.experimental.Database and Security
tenant_id.ENABLE ROW LEVEL SECURITY.FORCE ROW LEVEL SECURITY.awcms_mini_app.API and Events
UI
Testing
Before closing this Epic, these commands must pass:
bun run db:migrate bun run api:spec:check bun run typecheck bun run test bun run build bun run check bun run production:preflightRisks and Mitigations
Risk: Scope becomes too large
Mitigation: implement through child issues and review each PR independently.
Risk: Public routes leak non-public content
Mitigation: centralize public visibility predicate and cover it with tests.
Risk: XSS from rich content
Mitigation: store structured JSON as source of truth, validate content blocks, sanitize rendering, and reject script tags, inline JavaScript, unsafe iframe/embed content, and unsafe URLs.
Risk: RLS is incomplete
Mitigation: every migration must include
ENABLE ROW LEVEL SECURITY,FORCE ROW LEVEL SECURITY, tenant isolation policy, and integration tests.Risk: Rebuilding base systems
Mitigation: reuse existing AWCMS-Mini identity, access, audit, idempotency, event, response, and admin shell patterns.