diff --git a/README.md b/README.md index d673acb..0077196 100644 --- a/README.md +++ b/README.md @@ -90,11 +90,12 @@ Hexagonal (Ports & Adapters) with Domain-Driven Design: ``` api-types — shared REST API request/response DTOs (Serialize/Deserialize + utoipa schemas) + HtmlPageContext; used by presentation, tui, and template adapters infra-wiring — shared infrastructure types (DbPool, EventBusBackend, AppConfig) used by both presentation and worker binaries -domain — pure types and CQRS port traits (MovieCommand/MovieQuery, WatchEventCommand/WatchEventQuery, PersonCommand/PersonQuery, SearchCommand/SearchPort, ImageFetcher, RssFeedRenderer), no external deps except serde +domain — pure types and CQRS port traits (MovieCommand/MovieQuery, WatchEventCommand/WatchEventQuery, GoalCommand/GoalQuery, DiaryQuery, PersonCommand/PersonQuery, SearchCommand/SearchPort, ImageFetcher, RssFeedRenderer), no external deps except serde application — use cases (commands + queries), business logic orchestration; handlers delegate here for all domain logic presentation — Axum HTTP router, OpenAPI spec assembly, Swagger UI + Scalar serving, composition root for the HTTP process worker — standalone worker binary (event consumer, poster sync, federation) adapters/ + adapter-common — shared row-to-domain conversions, sqlx error mapping, date/uuid parsing utils auth — JWT issuance and validation (Argon2 passwords) sqlite — SQLite repository + connection factory postgres — PostgreSQL repository + connection factory diff --git a/architecture.mmd b/architecture.mmd index 23949b6..5dc0a29 100644 --- a/architecture.mmd +++ b/architecture.mmd @@ -59,7 +59,7 @@ graph TB M_SEARCH["SearchQuery,
SearchResults"] end subgraph Ports["Port Traits (Interfaces)"] - P_REPOS["MovieCommand / MovieQuery
ReviewRepository
DiaryRepository / StatsRepository
UserRepository
WatchlistRepository
WatchEventCommand / WatchEventQuery
WebhookTokenRepository
ImportSessionRepository
MovieProfileRepository
WrapUpRepository
GoalRepository
UserSettingsRepository
MovieDeduplicator"] + P_REPOS["MovieCommand / MovieQuery
ReviewRepository
DiaryQuery / StatsRepository
UserRepository
WatchlistRepository
WatchEventCommand / WatchEventQuery
WebhookTokenRepository
ImportSessionRepository
MovieProfileRepository
WrapUpRepository
GoalCommand / GoalQuery
UserSettingsRepository
MovieDeduplicator"] P_SERVICES["AuthService
MetadataClient
PosterFetcherClient
ImageFetcher
ObjectStorage
EventPublisher
EventConsumer
PasswordHasher
DiaryExporter
DocumentParser
RssFeedRenderer"] P_SEARCH["SearchPort
SearchCommand
PersonQuery
PersonCommand"] P_FEDERATION["SocialQueryPort
LocalApContentQuery
RemoteWatchlistRepository
RemoteGoalRepository"] @@ -82,6 +82,7 @@ graph TB subgraph Adapters["Adapters (implement Port Traits)"] direction TB + A_COMMON["adapter-common
Shared row conversions,
error mapping, date utils
"] subgraph Storage["Storage"] A_SQLITE["sqlite
SQLite repos"] A_PG["postgres
PostgreSQL repos"]