Files
Nemera/docs/technical/architecture/3.2 component-api-server-diagram.puml
T

59 lines
3.8 KiB
Plaintext

@startuml Lumina API Server Components
!include <C4/C4_Component>
LAYOUT_WITH_LEGEND()
title Component diagram for Lumina API Server 2.2
Container_Ext(webapp, "Web Application Client 2.1", "Lumina.Presentation.Web", "Provides the user interface [detailed in '3.1 component-web-client-diagram.puml']")
Container_Boundary(api, "API Server 2.2") {
Component(endpoints, "API Endpoints", "FastEndpoints", "Provides REST API endpoints for media management and streaming")
Component(mediaManagement, "Media Library Management", "Domain Services", "Handles media libraries operations and metadata management")
Component(userManagement, "User Management", "Domain Services", "Handles user authentication and authorization")
Component(fileSystem, "File System Management", "Domain Services", "Manages file system operations and media access")
Component(backgroundServices, "Background Services 3.2.1", ".NET Worker Services", "Handles media scanning, metadata synchronization and other maintenance tasks [detailed in '4.1 code-media-library-scanning-diagram.puml']")
Component(bookReading, "Book Reading 3.2.2", "Application + Infrastructure services", "Resolves the reader plugin of a book, checks its per-library enablement, extracts the book into the reading cache on first access, sanitizes every section, and serves the reading manifest, sections and resources [detailed in '4.2 code-book-reading-diagram.puml']")
Component(readerPlugins, "Book Reader Plugins", "Lumina.Plugins.Epub, Lumina.Plugins.Pdf", "Decode a book format into a normalized reading document (spine, table of contents, sections, resources), loaded into the host by the plugin loader [detailed in '4.2 code-book-reading-diagram.puml']")
Component(scheduledJobs, "Scheduled Jobs 3.2.3", "Application + Infrastructure services", "Lets administrators schedule the one off or recurring execution of maintenance tasks (media library scans, temporary files cleanup); a background scheduler runs the tasks on their schedules and the scheduled jobs hub broadcasts the jobs and their executions [detailed in '4.3 code-scheduler-diagram.puml']")
Component(repositories, "Repositories", "EF Core", "Provides data access abstraction for domain entities")
}
ContainerDb(db, "Database", "SQLite", "Stores user data, media metadata, and system configuration")
Container(readCache, "Reading Cache", "File System", "Temporary directory in the API output, wiped at startup, where the reader plugins extract the contents of the books")
System_Ext(metadataServices, "External Metadata Services", "Provides media information (TMDB, TVDB, GoodReads, MusicBrainz, etc)")
Rel(webapp, endpoints, "Makes API calls to", "JSON/HTTPS")
Rel(endpoints, mediaManagement, "Uses")
Rel(endpoints, userManagement, "Uses")
Rel(endpoints, fileSystem, "Uses")
Rel(endpoints, bookReading, "Uses")
Rel(endpoints, scheduledJobs, "Uses")
Rel(mediaManagement, repositories, "Uses")
Rel(userManagement, repositories, "Uses")
Rel(fileSystem, repositories, "Uses")
Rel(backgroundServices, mediaManagement, "Uses")
Rel(scheduledJobs, repositories, "Uses")
Rel(repositories, db, "Reads from and writes to", "SQL")
Rel(mediaManagement, metadataServices, "Retrieves metadata from", "HTTPS")
Rel(bookReading, readerPlugins, "Resolves and invokes")
Rel(bookReading, repositories, "Reads the per-library reader enablement")
Rel(bookReading, readCache, "Extracts into and serves from", "File system")
Rel(readerPlugins, readCache, "Extracts into", "File system")
Rel(scheduledJobs, backgroundServices, "Queues the media library scans of its ScanMediaLibraries task")
Rel(scheduledJobs, readCache, "Empties with its CleanTemporaryFiles task", "File system")
caption [Component] Lumina - API Server 2.2 (Lumina.Presentation.Api)
footer The component diagram for the Lumina API Server 2.2 - created with PlantUML
@enduml