refactor: split src into domain / application / infrastructure layers

Replace the history-driven lib/ + utils/ split with DDD layers:
- domain/: aggregate, repositories, value objects, pure parsers/format
- application/: feed-service, email-processor, feed-fetcher, stats
- infrastructure/: logging, auth, KV/R2 adapters, HTTP, framework glue

Pure file relocation; imports updated mechanically. Behaviour unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-24 00:46:56 +02:00
parent ab1c15e69a
commit 7bf0f71f86
45 changed files with 90 additions and 68 deletions
+7 -3
View File
@@ -1,6 +1,6 @@
import { Hono } from "hono";
import { Env, EmailMetadata } from "../../types";
import { logger } from "../../lib/logger";
import { logger } from "../../infrastructure/logger";
import { Layout, clampText } from "./ui";
import {
deleteAttachmentsForEmails,
@@ -8,8 +8,12 @@ import {
} from "./helpers";
import { FeedRepository } from "../../domain/feed-repository";
import { FeedId } from "../../domain/value-objects/feed-id";
import { feedRssUrl, feedAtomUrl, feedEmailAddress } from "../../utils/urls";
import { formatBytes } from "../../utils/format";
import {
feedRssUrl,
feedAtomUrl,
feedEmailAddress,
} from "../../infrastructure/urls";
import { formatBytes } from "../../domain/format";
import { EmailAddress } from "../../domain/value-objects/email-address";
import { emailsPageScript } from "../../scripts/generated/emails-page";