d09b3e2cdd
feat(core-shared): auth-gate mutating feature procedures
...
Adds a shared requireAuthenticated tRPC middleware (reads the server-
resolved ctx.user from createTrpcContext) and applies it to every
mutating feature procedure — blog.createArticle and media.deleteMedia
were anonymous-callable (audit finding B7). Read-only queries stay
public; features compose <x>ProtectedProcedure from their error-mapped
base procedure.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-10 18:25:46 +02:00
3b2d618cfc
feat(media): add retention metadata to media collection
...
Adds custom.retention (monthly purge, 90-day post-deletion hard-delete)
to the media Payload collection. No uploadedBy field exists in the
collection so no custom.pii annotation is needed.
2026-05-18 19:16:23 +00:00
17ae157365
refactor: strip Phase/Plan/R-number references from source comments
2026-05-13 09:51:45 +02:00
b672506c30
chore(media): add // <gen:*> anchor comments for event/job generators
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-08 12:47:04 +02:00
2b67964213
refactor(media): unify use-case I/O schemas + presenter + feature error map
...
Per Plan 9 (spec R1-R28):
- Use cases: input + output schemas (getMedia, listMedia); deleteMedia
has input schema only (void output, R12 — no presenter).
- Controllers: unknown input + identity presenter on getMedia/listMedia;
Promise<void> on deleteMedia.
- New integrations/api/procedures.ts with mediaProcedure
([InputParseError → BAD_REQUEST], [MediaNotFoundError → NOT_FOUND]).
- Router uses mediaProcedure + .input(xInputSchema).
- src/index.ts exports schemas + types; src/ui/index.ts placeholder
(media has no queries today); package.json adds ./ui subpath.
- R25 + R26 tests added.
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 Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-06 15:41:08 +02:00
8a36d803b3
feat(media): full Clean Architecture scaffold
...
Media is now a complete vertical-feature package mirroring auth/blog
structure: entities (models + errors), application (repositories +
use-cases), infrastructure (real Payload-backed + mock siblings),
interface-adapters (per-use-case controllers), DI (symbols + module +
container + bind-production), integrations/api (mediaRouter), factory,
contract suite, and feature integration tests.
Wired into:
- packages/core-api/src/root.ts (added `media: mediaRouter`)
- apps/web-next/src/server/bind-production.ts (calls bindProductionMedia)
- tsconfig.base.json (added @repo/media/api and ./di/bind-production aliases)
56 new tests in @repo/media (13 test files); core-api router test updated
to assert media. procedures. All 26 turbo tasks green.
Refactor log: §2, §4.1, §4.2, §5.1, §6.1
Spec: §6.5
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 00:29:05 +02:00
50b687c43e
feat(media): scaffold feature package with media collection only
2026-05-05 08:11:50 +02:00