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>
This commit is contained in:
2026-05-06 00:08:15 +02:00
parent 780d5cb83b
commit 700d311052
21 changed files with 488 additions and 302 deletions

View File

@@ -1,3 +1,11 @@
export const BLOG_SYMBOLS = {
IArticlesRepository: Symbol.for("blog:IArticlesRepository"),
// Use cases
IGetArticlesUseCase: Symbol.for("blog:IGetArticlesUseCase"),
ICreateArticleUseCase: Symbol.for("blog:ICreateArticleUseCase"),
IGetArticleBySlugUseCase: Symbol.for("blog:IGetArticleBySlugUseCase"),
// Controllers
IGetArticlesController: Symbol.for("blog:IGetArticlesController"),
ICreateArticleController: Symbol.for("blog:ICreateArticleController"),
IGetArticleBySlugController: Symbol.for("blog:IGetArticleBySlugController"),
} as const;