feat: update README with improved adapter descriptions and Docker usage instructions

This commit is contained in:
2026-05-10 19:00:21 +02:00
parent e461c689d9
commit a47e3ae4e6

View File

@@ -24,24 +24,28 @@ Hexagonal (Ports & Adapters) with Domain-Driven Design:
``` ```
domain — pure types and trait definitions, no external deps domain — pure types and trait definitions, no external deps
application — use cases / business logic orchestration application — use cases / business logic orchestration
presentation — Axum HTTP router, wires all adapters together presentation — Axum HTTP router, composition root for the HTTP process
worker — standalone worker binary (event consumer, poster sync, federation)
adapters/ adapters/
auth — JWT issuance and validation (Argon2 passwords) auth — JWT issuance and validation (Argon2 passwords)
sqlite — SQLite repository via sqlx sqlite — SQLite repository + connection factory
metadataOMDb HTTP client postgres PostgreSQL repository + connection factory
poster-fetcher — downloads poster images metadata — TMDB / OMDb HTTP client
poster-storageuploads posters to local filesystem or S3-compatible storage poster-fetcher downloads poster images
template-askama — Askama HTML rendering poster-storage — stores posters on local filesystem or S3-compatible storage
rss — RSS/Atom feed generation template-askama — Askama HTML rendering
exportCSV and JSON diary serialization rss RSS/Atom feed generation
sqlite-event-queue — polling event queue backed by SQLite (DB-queue mode) export — CSV and JSON diary serialization
postgres-event-queue — polling event queue backed by PostgreSQL (DB-queue mode) event-payload — shared event serialization DTOs (used by all event bus adapters)
sqlite-event-queue — durable polling event queue backed by SQLite
postgres-event-queue — durable polling event queue backed by PostgreSQL
nats — NATS Core / JetStream event publisher and consumer nats — NATS Core / JetStream event publisher and consumer
event-publisher — in-memory event channel (used in tests) event-publisher — in-memory event channel (tests only)
activitypub — ActivityPub federation (follow, inbox/outbox, actor) activitypub — ActivityPub federation wiring (follow, inbox/outbox, actor)
activitypub-base — core ActivityPub types and repository traits activitypub-base — core ActivityPub protocol types and service
sqlite-federation — SQLite-backed federation repository
postgres-federation — PostgreSQL-backed federation repository
doc — OpenAPI spec assembly and Swagger UI / Scalar serving doc — OpenAPI spec assembly and Swagger UI / Scalar serving
worker — standalone worker binary (polls the event queue, syncs posters)
tui — terminal UI client (ratatui) tui — terminal UI client (ratatui)
``` ```
@@ -136,17 +140,39 @@ cargo test
## Docker ## Docker
The image contains both `presentation` (HTTP server) and `worker` (event processor). Run them as separate containers sharing the same data volume:
```bash ```bash
docker build -t movies-diary . # Build (SQLite + federation + NATS support)
docker build -t movies-diary \
--build-arg FEATURES=sqlite,sqlite-federation,nats .
# HTTP server
docker run -p 3000:3000 \ docker run -p 3000:3000 \
-e DATABASE_URL=sqlite:///data/movies.db \ -e DATABASE_URL=sqlite:///data/movies.db \
-e JWT_SECRET=change-me \ -e JWT_SECRET=change-me \
-e OMDB_API_KEY=your-key \ -e OMDB_API_KEY=your-key \
-e BASE_URL=https://yourdomain.example.com \ -e BASE_URL=https://yourdomain.example.com \
-e EVENT_BUS_BACKEND=nats \
-e NATS_URL=nats://nats:4222 \
-v $(pwd)/data:/data \ -v $(pwd)/data:/data \
movies-diary movies-diary
# Event worker (separate container, same image)
docker run \
-e DATABASE_URL=sqlite:///data/movies.db \
-e JWT_SECRET=change-me \
-e OMDB_API_KEY=your-key \
-e BASE_URL=https://yourdomain.example.com \
-e EVENT_BUS_BACKEND=nats \
-e NATS_URL=nats://nats:4222 \
-v $(pwd)/data:/data \
--entrypoint ./worker \
movies-diary
``` ```
To build for PostgreSQL: `--build-arg FEATURES=postgres,postgres-federation,nats`
## License ## License
MIT License. See [LICENSE](LICENSE). MIT License. See [LICENSE](LICENSE).