presentation: HTTP server crate w/ handlers, routes, background tasks
Axum binary that wires all clean-arch crates together: - AppState holds pre-built Deps structs (auth, channels, schedule, library, etc.) - JWT extractors (CurrentUser, AdminUser, OptionalCurrentUser) - Handlers delegate to application use cases, map to api-types DTOs - Routes: auth, channels, schedule, library, admin, providers, config, iptv - Background: auto-scheduler, broadcast poller, webhook consumer, library sync - Factory builds everything from Config + DbPool - SimpleProviderRegistry impl of IProviderRegistry trait - NoopMediaProvider fallback
This commit is contained in:
55
crates/presentation/Cargo.toml
Normal file
55
crates/presentation/Cargo.toml
Normal file
@@ -0,0 +1,55 @@
|
||||
[package]
|
||||
name = "presentation"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[[bin]]
|
||||
name = "k-tv"
|
||||
path = "src/main.rs"
|
||||
|
||||
[features]
|
||||
default = ["sqlite", "auth-jwt", "jellyfin"]
|
||||
sqlite = ["dep:adapter-sqlite", "infra-wiring/sqlite"]
|
||||
postgres = ["dep:adapter-postgres", "infra-wiring/postgres"]
|
||||
auth-jwt = ["adapter-auth/jwt"]
|
||||
auth-oidc = ["adapter-auth/oidc"]
|
||||
jellyfin = ["dep:adapter-jellyfin"]
|
||||
local-files = ["dep:adapter-local-files", "dep:tokio-util"]
|
||||
|
||||
[dependencies]
|
||||
domain = { workspace = true }
|
||||
application = { workspace = true }
|
||||
api-types = { workspace = true }
|
||||
infra-wiring = { workspace = true }
|
||||
adapter-auth = { workspace = true }
|
||||
adapter-event-publisher = { workspace = true }
|
||||
|
||||
# Feature-gated adapters
|
||||
adapter-sqlite = { workspace = true, optional = true }
|
||||
adapter-postgres = { workspace = true, optional = true }
|
||||
adapter-jellyfin = { workspace = true, optional = true }
|
||||
adapter-local-files = { workspace = true, optional = true }
|
||||
|
||||
# Framework
|
||||
axum = { workspace = true }
|
||||
axum-extra = { workspace = true, features = ["typed-header"] }
|
||||
tower = { workspace = true }
|
||||
tower-http = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
|
||||
# Utils
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
anyhow = "1"
|
||||
dotenvy = "0.15"
|
||||
reqwest = { workspace = true }
|
||||
handlebars = "6"
|
||||
|
||||
# Local-files streaming
|
||||
tokio-util = { version = "0.7", features = ["io"], optional = true }
|
||||
Reference in New Issue
Block a user