Built with stubsTypeScriptdomainuiserver

Blog Posts

src/features/blog-posts

Manages and renders markdown-based articles with tags, reading time estimates, and syntax-highlighted code snippets.

Brick

  • __tests__/

  • domain/

  • host/

  • server/

  • testing/

  • ui/

Host adapter (not part of the brick)

domain/index.ts
1/**
2 * The pure entrypoint: types and logic with no React and no I/O. Importable
3 * from both server and client code.
4 */
5
6export type { BlogPost, BlogPostStatus, CreateBlogPostInput, UpdateBlogPostInput, ISODateTime } from './types';
7export { BlogPostsError, NotImplemented } from './errors';
8export type { BlogPostsErrorCode } from './errors';
9export { initialBlogPostStatus, canBlogPost, transitionBlogPost, availableBlogPostEvents } from './lifecycle';
10export type { BlogPostEvent } from './lifecycle';
11

Requirements

  • ✓

    REQ-1Create a new draft blog post with generated slug and reading time estimate.

    ✓ [REQ-1] Create a new draft blog post with generated slug and reading time estimate. #1

  • !

    REQ-2Update an existing blog post's mutable fields.

    … [REQ-2] Update an existing blog post's mutable fields. #1 (not implemented: slot updateBlogPost) · … [REQ-2] Update an existing blog post's mutable fields. #2 (not implemented: slot updateBlogPost) · … [REQ-2] Update an existing blog post's mutable fields. #3 (not implemented: slot updateBlogPost)

  • ✓

    GATE-PORTABLESelf-contained: relative imports only, nothing escapes the brick (R1–R6)

    brick-lint + builder harness

  • ✓

    GATE-CONTRACTVendored host contract is byte-identical (R8)

    sha-256 comparison

  • ✓

    GATE-TYPESTypechecks under the strictest-superset tsconfig

    in-process tsc

  • ✓

    GATE-TESTSShips its own tests and they pass (R12)

    9 passing

  • ✓

    GATE-LIFECYCLE-BLOGPOSTBlogPost.status only changes through declared transitions

    8 generated lifecycle tests

Built 28/10/2026, 14:52:46 by Ada Lovelace · 9 tests passing · operations by mistral