a6fc874f11
feat(blog): add retention metadata to articles collection
...
Monthly purge schedule with 90-day post-deletion hard-delete window.
Part of compliance backfill (Story 05).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-18 19:08:04 +00:00
17ae157365
refactor: strip Phase/Plan/R-number references from source comments
2026-05-13 09:51:45 +02:00
2506c2676b
chore(blog): add // <gen:*> anchor comments for event/job generators
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-08 12:46:31 +02:00
86070b236a
refactor(blog): unify use-case I/O schemas + presenter + feature error map
...
Per Plan 9 (spec R1-R28):
- Use cases: input + output schemas (getArticles, createArticle,
getArticleBySlug). Output validated via outputSchema.parse before
return. status field uses articleStatusSchema (was loose `string`).
- Controllers: receive `unknown`; safeParse with use-case schema;
identity presenter (R11) on every controller.
- New integrations/api/procedures.ts with blogProcedure
([InputParseError → BAD_REQUEST], [ArticleNotFoundError → NOT_FOUND]).
- Router uses blogProcedure + .input(xInputSchema) for all 3 procedures.
- src/index.ts: remove articleBySlugQuery/listArticlesQuery re-exports;
export schemas + types + IUseCase/IController aliases.
- src/ui/index.ts (NEW): query builders moved here; package.json adds
./ui subpath.
- New tests: R25 output-validation per use case; R26 router error-
mapping (NOT_FOUND on missing slug, BAD_REQUEST on schema fail).
Refactor log: §1, §2, §3.1, §3.2, §3.3, §5.1, §5.2, §6.1, §6.2
Spec: R1–R6, R8–R15, R18–R20, R22–R26
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 15:04:53 +02:00
700d311052
refactor(blog): factory-style use cases + per-use-case controllers + getArticleBySlug
...
- Use cases (create-article, get-articles, get-article-by-slug NEW) → factory functions
- Controllers split: articles.controller.ts → 3 single-responsibility files
- DI module wires factories with .toDynamicValue()
- tRPC router resolves controllers via container
Refactor log: §2, §3, §4.1, §4.2, §5.1
Spec: §6.2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 00:08:15 +02:00
aa325f91cc
refactor(features): rename mock/payload/interface files per Lazar pattern
...
Convention now: <name>.repository.{ts,mock.ts,interface.ts}.
Renames .mock prefix to .mock suffix; drops .payload prefix from real
impls (canonical name = real impl); dot-separates the .repository
qualifier in interface filenames. Class names follow suit:
PayloadXRepository → XRepository; Mock* unchanged.
Refactor log: §1, §3
Spec: §9.1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-05 23:50:01 +02:00
a74f217703
fix(features): address Task 3 code review feedback
...
- Add navItemFactory to navigation (spec §5.1 — was missing)
- Refactor blog/router.test.ts to use articleFactory (eliminate new Date())
- headerFactory uses sequence for logoId (deterministic buildList output)
- Align media/tsconfig.json with other features (jsx + tests/ include)
- Refactor auth/container.test.ts to use userFactory
Reviewer: superpowers:code-reviewer (Task 3 of Plan 7).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-05 15:18:35 +02:00
8667232c22
feat(blog): restore author relationship → users + featuredImage upload → media
2026-05-05 08:14:07 +02:00
1ae1702786
feat(core-api): compose @repo/blog/api into appRouter under 'blog' namespace
2026-05-04 22:34:43 +02:00
fde58f2d3d
feat(blog): add tRPC router with articleBySlug + listArticles + createArticle
2026-05-04 22:32:53 +02:00
1d59698ebe
feat(blog): add articles collection (simplified — no cross-feature refs)
2026-05-04 22:27:03 +02:00