Files
k-tv/k-tv-backend/infra/src/lib.rs
Gabriel Kaszewski e805028d46 feat: add server-sent events for logging and activity tracking
- Implemented a custom tracing layer (`AppLogLayer`) to capture log events and broadcast them to SSE clients.
- Created admin routes for streaming server logs and listing recent activity logs.
- Added an activity log repository interface and SQLite implementation for persisting activity events.
- Integrated activity logging into user authentication and channel CRUD operations.
- Developed frontend components for displaying server logs and activity logs in the admin panel.
- Enhanced the video player with a stats overlay for monitoring streaming metrics.
2026-03-16 02:21:40 +01:00

47 lines
1.4 KiB
Rust

//! K-TV Infrastructure Layer
//!
//! Concrete adapters for the repository and provider ports defined in the domain.
//!
//! ## Repository adapters
//! - `SqliteUserRepository` / `PostgresUserRepository`
//! - `SqliteChannelRepository` / `PostgresChannelRepository`
//! - `SqliteScheduleRepository` / `PostgresScheduleRepository`
//!
//! ## Media provider adapters
//! - `JellyfinMediaProvider` (feature = `"jellyfin"`)
//!
//! ## Database
//! - [`db::run_migrations`] — run all pending SQLite/Postgres migrations
pub mod auth;
pub mod db;
pub mod factory;
pub mod jellyfin;
pub mod provider_registry;
mod activity_log_repository;
mod channel_repository;
mod schedule_repository;
mod user_repository;
#[cfg(feature = "local-files")]
pub mod local_files;
// Re-export for convenience
pub use db::run_migrations;
pub use provider_registry::ProviderRegistry;
#[cfg(feature = "sqlite")]
pub use activity_log_repository::SqliteActivityLogRepository;
#[cfg(feature = "sqlite")]
pub use user_repository::SqliteUserRepository;
#[cfg(feature = "sqlite")]
pub use channel_repository::SqliteChannelRepository;
#[cfg(feature = "sqlite")]
pub use schedule_repository::SqliteScheduleRepository;
#[cfg(feature = "jellyfin")]
pub use jellyfin::{JellyfinConfig, JellyfinMediaProvider};
#[cfg(feature = "local-files")]
pub use local_files::{LocalFilesConfig, LocalFilesProvider, LocalIndex, TranscodeManager, decode_stream_id};