mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Adds remaining architecture diagrams
This commit is contained in:
1 parent
3fca238764
commit
9f1fd3da65
11 files changed
+174
-19
No files matched your search
@@ -16,6 +16,19 @@ Stay tuned as we build something amazing together. Lumina is about to light up y
|
||||
|
||||
P.S. This README is just a spark. Watch it grow into a supernova! ✨
|
||||
|
||||
## Documentation
|
||||
|
||||
For those with technical curiosities, here are some goodies to browse through:
|
||||
- This application was written following Clean Architecture and Domain Driven Design. Although you've probably seen it countless times before, here is the diagram of how the structure looks like.
|
||||
- A tree-like schematic of the Lumina's Server Domain layer can be seen [here](./docs/technical/domain/Domain.md).
|
||||
- The Ubiquitous Language used by Lumina's Server Domain layer can be read [here](./docs/technical/domain/UbiquitousLanguage.md).
|
||||
- For Software Architects, the architecture documents of Lumina were designed using the [C4 model](https://c4model.com/), therefor, you can visualize:
|
||||
1. [1 System Context diagram](./docs/technical/architecture/1%20system-context-diagram.svg)
|
||||
2. [2 Container diagram](./docs/technical/architecture/2%20container-diagram.svg)
|
||||
3. [3.1 Component Web Client diagram](./docs/technical/architecture/3.1%20component-web-client-diagram.svg)
|
||||
4. [3.2 Component API Server diagram](./docs/technical/architecture/3.2%20component-api-server-diagram.svg)
|
||||
5. [4.1 Code media library scanning diagram](./docs/technical/architecture/4.1%20code-media-library-scanning-diagram.svg)
|
||||
|
||||
## Contributing
|
||||
|
||||
Lumina welcomes community contributions. All forms of input, be it code, bug reports, or feature suggestions, are appreciated. Be sure to read the [guidelines](./docs/CONTRIBUTING.md) for contributing first!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@startuml test
|
||||
@startuml Lumina System Context Diagram
|
||||
!include <C4/C4_Context>
|
||||
|
||||
LAYOUT_WITH_LEGEND()
|
||||
@@ -7,7 +7,7 @@ title System Context diagram for Lumina Media Library Manager
|
||||
Person(user, "Home User", "A person who wants to manage and stream their personal media collection")
|
||||
Person(admin, "Administrator", "A person who manages the media library system")
|
||||
|
||||
System(lumina, "Lumina", "Allows users to organize, manage and stream their personal media content")
|
||||
System(lumina, "Lumina 1.1", "Allows users to organize, manage and stream their personal media content [detailed in '2 container-diagram.puml']")
|
||||
|
||||
System_Ext(metadataProvider, "Media Metadata Services", "External services that provide media information and metadata (TMDB, TVDB, GoodReads, MusicBrainz, etc)")
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="836px" preserveAspectRatio="none" style="width:466px;height:836px;background:#FFFFFF;" version="1.1" viewBox="0 0 466 836" width="466px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="412" x="20.25" y="24.5332">System Context diagram for Lumina Media Library Manager</text><!--entity user--><g id="elem_user"><rect fill="#08427B" height="158.5625" rx="2.5" ry="2.5" style="stroke:#073B6F;stroke-width:0.5;" width="217" x="7" y="45.6094"/><image height="48" width="48" x="91.5" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABxUlEQVR42u2YPUoEQRCFJ/QIHsErmIrJJh5ADyAYm20kmwhqaCJiqIlgYGKyoKmskZEIRhpqYGBa8gkLsjAz/VPV3cN2QcHC0Gy/rurX71WzsjFuhpxNBbCQo/0LOb99lOnsVZ5e3v/y+v5Zxmd3srZzfFgsgL2TG/n6/pG+ANj67umsGACrW5NNTtk3qEh2AGze5dTb4ujyQbICCDn5xaD1sgCgBbSCSiYFwB+KYsBaSQFQdu1ICgAq1A7ej2QAYphHm1aDAIhBhFLqcgJ4+/hUBxD6HgQBQJwN+hJr0yikkPwl1mSiGE20nFJC80HbPriSrHI6hpE0PIGKKwqpROzJq1tKNuRSDSg4pufNTT1+l9Zgo1SGRC5DvZobr2OVQQNgvkPP0yo8QqTPqIS183W0FjIitL28H6+ui8q3eb+zKUCR/GZtH1vx3VcTOU/bLExMFxDXiiSVDD5BNV1GkcnNu69K7atEJ59LAUE7BQGwmDxYCL6iT///ffACABWWFm0XOplptzL9ycYmVrbTfHCrFajbQQNoo9MKoALQvgNW43Or8XuRIs5H1LVqIXi3FBnR5fZ6B1eYGcRUjnSxqXUqkTt/AThkzS9XiLScAAAAAElFTkSuQmCC" y="55.6094"/><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="45" x="73" y="120.2188">Home</text><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="4" x="118" y="120.2188"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="36" x="122" y="120.2188">User</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="113.5" y="138.2676"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="9" x="17" y="155.877">A</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="26" y="155.877"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="44" x="30" y="155.877">person</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="74" y="155.877"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="25" x="78" y="155.877">who</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="103" y="155.877"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="36" x="107" y="155.877">wants</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="143" y="155.877"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="12" x="147" y="155.877">to</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="159" y="155.877"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="163" y="155.877">manage</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="24" x="34.5" y="173.4863">and</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="58.5" y="173.4863"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="43" x="62.5" y="173.4863">stream</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="105.5" y="173.4863"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="28" x="109.5" y="173.4863">their</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="137.5" y="173.4863"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="55" x="141.5" y="173.4863">personal</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="38" x="65" y="191.0957">media</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="103" y="191.0957"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="59" x="107" y="191.0957">collection</text></g><!--entity admin--><g id="elem_admin"><rect fill="#08427B" height="140.9531" rx="2.5" ry="2.5" style="stroke:#073B6F;stroke-width:0.5;" widtLine truncated
|
||||
|
After Width: | Height: | Size: 24 KiB |
@@ -2,15 +2,15 @@
|
||||
!include <C4/C4_Container>
|
||||
|
||||
LAYOUT_WITH_LEGEND()
|
||||
title Container diagram for Lumina Media Library Manager
|
||||
title Container diagram for Lumina 1.1
|
||||
|
||||
Person(user, "Home User", "A person who wants to manage and stream their personal media collection")
|
||||
Person(admin, "Administrator", "A person who manages the media library system")
|
||||
|
||||
System_Boundary(c1, "Lumina") {
|
||||
Container(webapp, "Web Application Client", "ASP.NET Core MVC", "Delivers server-rendered views with dynamic client-side functionality for media management and playback")
|
||||
System_Boundary(c1, "Lumina 1.1") {
|
||||
Container(webapp, "Web Application Client 2.1", "ASP.NET Core MVC", "Delivers server-rendered views with dynamic client-side functionality for media management and playback [detailed in '3.1 component-web-client-diagram.puml']")
|
||||
|
||||
Container(api, "API Server", "ASP.NET Core", "Provides media management functionality via a REST API, processes media tasks, and manages metadata synchronization")
|
||||
Container(api, "API Server 2.2", "ASP.NET Core", "Provides media management functionality via a REST API, processes media tasks, and manages metadata synchronization [detailed in '3.2 component-api-server-diagram.puml']")
|
||||
|
||||
ContainerDb(db, "Database", "SQLite", "Stores user data, media metadata, library configuration, automated jobs information, etc")
|
||||
|
||||
@@ -26,7 +26,7 @@ Rel(api, db, "Reads from and writes to", "SQL")
|
||||
Rel(api, filestore, "Reads from and writes to")
|
||||
Rel(api, metadata, "Retrieves metadata from", "HTTPS")
|
||||
|
||||
caption [Container] Lumina
|
||||
caption [Container] Lumina 1.1
|
||||
|
||||
footer The container diagram for the Lumina Media Library Manager - created with PlantUML
|
||||
footer The container diagram for the Lumina 1.1 - created with PlantUML
|
||||
@enduml
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="1257px" preserveAspectRatio="none" style="width:735px;height:1257px;background:#FFFFFF;" version="1.1" viewBox="0 0 735 1257" width="735px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="231" x="245" y="24.5332">Container diagram for Lumina 1.1</text><!--cluster c1--><g id="cluster_c1"><rect fill="none" height="751.5" rx="2.5" ry="2.5" style="stroke:#444444;stroke-width:1.0;stroke-dasharray:7.0,7.0;" width="483" x="7" y="297.6094"/><text fill="#444444" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="83" x="207" y="316.2188">Lumina 1.1</text><text fill="#444444" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="51" x="223" y="332.1914">[System]</text></g><!--entity webapp--><g id="elem_webapp"><rect fill="#438DD5" height="178.4844" rx="2.5" ry="2.5" style="stroke:#3C7FC0;stroke-width:0.5;" width="255" x="201.5" y="351.6094"/><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="34" x="230" y="378.2188">Web</text><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="4" x="264" y="378.2188"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="86" x="268" y="378.2188">Application</text><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="4" x="354" y="378.2188"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="44" x="358" y="378.2188">Client</text><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="4" x="402" y="378.2188"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="22" x="406" y="378.2188">2.1</text><text fill="#FFFFFF" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="54" x="271" y="394.1914">[ASP.NET</text><text fill="#FFFFFF" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="3" x="325" y="394.1914"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="27" x="328" y="394.1914">Core</text><text fill="#FFFFFF" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="3" x="355" y="394.1914"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="29" x="358" y="394.1914">MVC]</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="327" y="411.3613"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="231" y="428.9707">Delivers</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="282" y="428.9707"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="103" x="286" y="428.9707">server-rendered</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="389" y="428.9707"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="34" x="393" y="428.9707">views</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="24" x="255" y="446.5801">with</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="279" y="446.5801"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="52" x="283" y="446.5801">dynamic</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="335" y="446.5801"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="64" x="339" y="446.5801">client-side</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="75" x="260" y="464.1895">functionality</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="335" y="464.1895"> </text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="17" x="339" y="464.1895">for</text><text fill="#FFFFFF" font-family="sans-serif" font-size="14" lengthAdjust="sLine truncated
|
||||
|
After Width: | Height: | Size: 42 KiB |
@@ -2,11 +2,11 @@
|
||||
!include <C4/C4_Component>
|
||||
|
||||
LAYOUT_WITH_LEGEND()
|
||||
title Component diagram for Lumina Web Application Client
|
||||
title Component diagram for Lumina Web Application Client 2.1
|
||||
|
||||
Container_Ext(api, "API Server", "Lumina.Presentation.Api", "Provides media management functionality via JSON/HTTPS API")
|
||||
Container_Ext(api, "API Server 2.2", "Lumina.Presentation.Api", "Provides media management functionality via JSON/HTTPS API [detailed in '3.2 component-api-server-diagram.puml']")
|
||||
|
||||
Container_Boundary(wb, "Web Application") {
|
||||
Container_Boundary(wb, "Web Application 2.1") {
|
||||
Component(fileSystem, "File System Management", "ASP.NET MVC Controllers", "Handles file system operations including drives, directories, and files browsing")
|
||||
|
||||
Component(library, "Library Management", "ASP.NET MVC Controllers", "Manages media libraries and their content (books, etc)")
|
||||
@@ -30,7 +30,7 @@ Rel(clientJs, library, "Makes AJAX calls to")
|
||||
Rel(clientJs, admin, "Makes AJAX calls to")
|
||||
Rel(clientJs, users, "Makes AJAX calls to")
|
||||
|
||||
caption [Component] Lumina - Web Application (Lumina.Presentation.Web)
|
||||
caption [Component] Lumina - Web Application Client 2.1 (Lumina.Presentation.Web)
|
||||
|
||||
footer The component diagram for the Lumina Web Application Client - created with PlantUML
|
||||
footer The component diagram for the Lumina Web Application Client 2.1 - created with PlantUML
|
||||
@enduml
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="1076px" preserveAspectRatio="none" style="width:968px;height:1076px;background:#FFFFFF;" version="1.1" viewBox="0 0 968 1076" width="968px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="405" x="274.5" y="24.5332">Component diagram for Lumina Web Application Client 2.1</text><!--cluster wb--><g id="cluster_wb"><rect fill="none" height="566" rx="2.5" ry="2.5" style="stroke:#444444;stroke-width:1.0;stroke-dasharray:7.0,7.0;" width="955" x="7" y="45.6094"/><text fill="#444444" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="150" x="409.5" y="64.2188">Web Application 2.1</text><text fill="#444444" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="63" x="453" y="80.1914">[Container]</text></g><!--entity fileSystem--><g id="elem_fileSystem"><rect fill="#85BBF0" height="125.6563" rx="2.5" ry="2.5" style="stroke:#78A8D8;stroke-width:0.5;" width="212" x="23" y="284.6094"/><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="27" x="34" y="311.2188">File</text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="4" x="61" y="311.2188"> </text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="57" x="65" y="311.2188">System</text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="4" x="122" y="311.2188"> </text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="98" x="126" y="311.2188">Management</text><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="54" x="54.5" y="327.1914">[ASP.NET</text><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="3" x="108.5" y="327.1914"> </text><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="26" x="111.5" y="327.1914">MVC</text><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="3" x="137.5" y="327.1914"> </text><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="63" x="140.5" y="327.1914">Controllers]</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="127" y="344.3613"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="33" y="361.9707">Handles</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="84" y="361.9707"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="18" x="88" y="361.9707">file</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="106" y="361.9707"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="44" x="110" y="361.9707">system</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="154" y="361.9707"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="67" x="158" y="361.9707">operations</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="56" x="41" y="379.5801">including</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="97" y="379.5801"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="42" x="101" y="379.5801">drives,</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="143" y="379.5801"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="70" x="147" y="379.5801">directories,</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="24" x="72.5" y="397.1895">and</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="96.5" y="397.1895"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="25" x="100.5" y="397.1895">files</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdLine truncated
|
||||
|
After Width: | Height: | Size: 36 KiB |
+6
-6
@@ -2,11 +2,11 @@
|
||||
!include <C4/C4_Component>
|
||||
|
||||
LAYOUT_WITH_LEGEND()
|
||||
title Component diagram for Lumina API Server
|
||||
title Component diagram for Lumina API Server 2.2
|
||||
|
||||
Container_Ext(webapp, "Web Application Client", "Lumina.Presentation.Web", "Provides the user interface")
|
||||
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 Application") {
|
||||
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")
|
||||
@@ -15,7 +15,7 @@ Container_Boundary(api, "API Application") {
|
||||
|
||||
Component(fileSystem, "File System Management", "Domain Services", "Manages file system operations and media access")
|
||||
|
||||
Component(backgroundServices, "Background Services", ".NET Worker Services", "Handles media scanning, metadata synchronization and other maintenance tasks")
|
||||
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(repositories, "Repositories", "EF Core", "Provides data access abstraction for domain entities")
|
||||
}
|
||||
@@ -35,7 +35,7 @@ Rel(backgroundServices, mediaManagement, "Uses")
|
||||
Rel(repositories, db, "Reads from and writes to", "SQL")
|
||||
Rel(mediaManagement, metadataServices, "Retrieves metadata from", "HTTPS")
|
||||
|
||||
caption [Component] Lumina - API Server (Lumina.Presentation.Api)
|
||||
caption [Component] Lumina - API Server 2.2 (Lumina.Presentation.Api)
|
||||
|
||||
footer The component diagram for the Lumina API Server - created with PlantUML
|
||||
footer The component diagram for the Lumina API Server 2.2 - created with PlantUML
|
||||
@enduml
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="1411px" preserveAspectRatio="none" style="width:922px;height:1411px;background:#FFFFFF;" version="1.1" viewBox="0 0 922 1411" width="922px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="321" x="293.75" y="24.5332">Component diagram for Lumina API Server 2.2</text><!--cluster api--><g id="cluster_api"><rect fill="none" height="685.5" rx="2.5" ry="2.5" style="stroke:#444444;stroke-width:1.0;stroke-dasharray:7.0,7.0;" width="696" x="7" y="249.6094"/><text fill="#444444" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="106" x="302" y="268.2188">API Server 2.2</text><text fill="#444444" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="63" x="323.5" y="284.1914">[Container]</text></g><!--entity endpoints--><g id="elem_endpoints"><rect fill="#85BBF0" height="125.6563" rx="2.5" ry="2.5" style="stroke:#78A8D8;stroke-width:0.5;" width="207" x="147.5" y="331.1094"/><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="26" x="196.5" y="357.7188">API</text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="4" x="222.5" y="357.7188"> </text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="79" x="226.5" y="357.7188">Endpoints</text><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="84" x="209" y="373.6914">[FastEndpoints]</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="249" y="390.8613"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="55" x="157.5" y="408.4707">Provides</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="212.5" y="408.4707"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="37" x="216.5" y="408.4707">REST</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="253.5" y="408.4707"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="21" x="257.5" y="408.4707">API</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="278.5" y="408.4707"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="62" x="282.5" y="408.4707">endpoints</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="17" x="164.5" y="426.0801">for</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="181.5" y="426.0801"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="38" x="185.5" y="426.0801">media</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="223.5" y="426.0801"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="82" x="227.5" y="426.0801">management</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="309.5" y="426.0801"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="24" x="313.5" y="426.0801">and</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="62" x="220" y="443.6895">streaming</text></g><!--entity mediaManagement--><g id="elem_mediaManagement"><rect fill="#85BBF0" height="145.7813" rx="2.5" ry="2.5" style="stroke:#78A8D8;stroke-width:0.5;" width="178" x="509" y="561.6094"/><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="45" x="546.5" y="588.2188">Media</text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="4" x="591.5" y="588.2188"> </text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="54" x="595.5" y="588.2188">Library</text><text fill="#000000" font-family="sans-serif" font-size="16" font-weight="bold" lengthAdjust="spacing" textLength="98" x="549" y="608.3438">Management</text><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="47" x="548" y="624.3164">[Domain</text><texLine truncated
|
||||
|
After Width: | Height: | Size: 41 KiB |
@@ -0,0 +1,137 @@
|
||||
@startuml Media Library Scanning System Code
|
||||
!include <C4/C4_Component>
|
||||
|
||||
LAYOUT_WITH_LEGEND()
|
||||
title Code diagram for Background Services 3.2.1
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor White
|
||||
BorderColor Black
|
||||
}
|
||||
|
||||
abstract class MediaLibraryScanJob {
|
||||
+ ScanId: Guid
|
||||
+ UserId: Guid
|
||||
+ Library: Library
|
||||
+ Status: LibraryScanJobStatus
|
||||
# parentsPayloadsExecuted: int
|
||||
+ Children: List<MediaLibraryScanJob>
|
||||
+ Parents: List<MediaLibraryScanJob>
|
||||
+ AddChild(job: MediaLibraryScanJob)
|
||||
+ AddParent(job: MediaLibraryScanJob)
|
||||
+ {abstract} ExecuteAsync<TInput>(id: Guid, input: TInput, token: CancellationToken): Task
|
||||
}
|
||||
|
||||
note right of MediaLibraryScanJob
|
||||
Base class for all scan jobs that defines the parent-child
|
||||
relationship and execution pattern
|
||||
end note
|
||||
|
||||
class HashComparerJob {
|
||||
+ ExecuteAsync<TInput>(id: Guid, input: TInput, token: CancellationToken): Task
|
||||
}
|
||||
|
||||
class FileSystemDiscoveryJob {
|
||||
ExecuteAsync<TInput>(id: Guid, input: TInput, token: CancellationToken): Task
|
||||
}
|
||||
|
||||
class RepositoryMetadataDiscoveryJob {
|
||||
ExecuteAsync<TInput>(id: Guid, input: TInput, token: CancellationToken): Task
|
||||
}
|
||||
|
||||
class GoodReadsMetadataScrapJob {
|
||||
ExecuteAsync<TInput>(id: Guid, input: TInput, token: CancellationToken): Task
|
||||
}
|
||||
|
||||
interface IMediaTypeScanner {
|
||||
+ SupportedType: LibraryType
|
||||
+ CreateScanJobsForLibrary(library: Library): IEnumerable<MediaLibraryScanJob>
|
||||
}
|
||||
|
||||
note top of IMediaTypeScanner
|
||||
Determine the library type (audio, video, etc) and create a scanner for that particular type
|
||||
end note
|
||||
|
||||
interface IBookLibraryTypeScanner {
|
||||
}
|
||||
|
||||
class BookLibraryTypeScanner {
|
||||
- _mediaScanJobFactory: IMediaLibraryScanJobFactory
|
||||
+ SupportedType: LibraryType
|
||||
+ CreateScanJobsForLibrary(library: Library): IEnumerable<MediaLibraryScanJob>
|
||||
}
|
||||
|
||||
class MediaLibraryScanningService {
|
||||
- _mediaScanQueue: IMediaLibrariesScanQueue
|
||||
- _libraryScannerFactory: IMediaLibraryScannerFactory
|
||||
- _librariesScanTracker: IMediaLibrariesScanTracker
|
||||
- _currentUserService: ICurrentUserService
|
||||
+ StartScanAsync(library: Library, token: CancellationToken): Task<Guid>
|
||||
+ CancelScan(scanId: Guid)
|
||||
}
|
||||
|
||||
note top of MediaLibraryScanningService
|
||||
Central service for managing execution and cancellation of media library scans
|
||||
end note
|
||||
|
||||
class MediaLibrariesScanQueue {
|
||||
- _channel: Channel<MediaLibraryScanJob>
|
||||
+ Writer: ChannelWriter<MediaLibraryScanJob>
|
||||
+ Reader: ChannelReader<MediaLibraryScanJob>
|
||||
}
|
||||
|
||||
note bottom of MediaLibrariesScanQueue
|
||||
In-memory queue of media library scan jobs
|
||||
end note
|
||||
|
||||
class MediaLibraryScanJobProcessorJob {
|
||||
- _mediaScanQueue: IMediaLibrariesScanQueue
|
||||
- _librariesScanTracker: IMediaLibrariesScanTracker
|
||||
# ExecuteAsync(token: CancellationToken): Task
|
||||
}
|
||||
|
||||
note top of MediaLibraryScanJobProcessorJob
|
||||
Launch the payload execution of scan jobs that arrive on the in-memory queue
|
||||
end note
|
||||
|
||||
class MediaLibrariesScanTracker {
|
||||
- _runningScans: ConcurrentDictionary<MediaScanTrackerModel, CancellationTokenSource>
|
||||
+ RegisterScan(scanId: Guid, userId: Guid)
|
||||
+ GetTokenForScan(scanId: Guid, userId: Guid): CancellationToken
|
||||
+ CancelScan(scanId: Guid, userId: Guid)
|
||||
+ CancelUserScans(userId: Guid)
|
||||
+ Dispose()
|
||||
}
|
||||
|
||||
note bottom of MediaLibrariesScanTracker
|
||||
Track the state of each running scan job and allow for cancelling at any time
|
||||
end note
|
||||
|
||||
MediaLibraryScanJob <|-- HashComparerJob : inherits
|
||||
MediaLibraryScanJob <|-- FileSystemDiscoveryJob : inherits
|
||||
MediaLibraryScanJob <|-- RepositoryMetadataDiscoveryJob : inherits
|
||||
MediaLibraryScanJob <|-- GoodReadsMetadataScrapJob : inherits
|
||||
|
||||
FileSystemDiscoveryJob ..> HashComparerJob : triggers
|
||||
RepositoryMetadataDiscoveryJob ..> HashComparerJob : triggers
|
||||
HashComparerJob ..> GoodReadsMetadataScrapJob : triggers
|
||||
|
||||
IMediaTypeScanner <|-- IBookLibraryTypeScanner
|
||||
IBookLibraryTypeScanner <|.. BookLibraryTypeScanner
|
||||
|
||||
MediaLibraryScanningService --> IMediaTypeScanner : uses
|
||||
MediaLibraryScanningService --> MediaLibrariesScanQueue : writes to
|
||||
MediaLibraryScanningService --> MediaLibrariesScanTracker : uses
|
||||
|
||||
MediaLibraryScanJobProcessorJob --> MediaLibrariesScanQueue : reads from
|
||||
MediaLibraryScanJobProcessorJob --> MediaLibrariesScanTracker : uses
|
||||
|
||||
BookLibraryTypeScanner ..> MediaLibraryScanJob : creates
|
||||
|
||||
MediaLibraryScanJobProcessorJob ..> FileSystemDiscoveryJob : triggers
|
||||
MediaLibraryScanJobProcessorJob ..> RepositoryMetadataDiscoveryJob : triggers
|
||||
|
||||
caption [Code] Lumina - Background Services 3.2.1
|
||||
|
||||
footer The code diagram for the Background Services 3.2.1 - created with PlantUML
|
||||
@enduml
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="2296px" preserveAspectRatio="none" style="width:1156px;height:2296px;background:#FFFFFF;" version="1.1" viewBox="0 0 1156 2296" width="1156px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="312" x="415" y="24.5332">Code diagram for Background Services 3.2.1</text><!--class MediaLibraryScanJob--><g id="elem_MediaLibraryScanJob"><rect codeLine="11" fill="#FFFFFF" height="329.75" id="MediaLibraryScanJob" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.5;" width="213" x="478" y="1187.6094"/><ellipse cx="512.35" cy="1203.6094" fill="#A9DCDF" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M514.5375,1205.375 L510.3969,1205.375 L509.975,1206.4063 L510.3969,1206.4063 Q511.0063,1206.4063 511.2719,1206.6406 Q511.5375,1206.875 511.5375,1207.2656 Q511.5375,1207.6406 511.2719,1207.875 Q511.0063,1208.1094 510.3969,1208.1094 L508.1,1208.1094 Q507.4906,1208.1094 507.2328,1207.875 Q506.975,1207.6406 506.975,1207.25 Q506.975,1206.875 507.2484,1206.6328 Q507.5219,1206.3906 508.1469,1206.4063 L510.8188,1199.75 L509.7094,1199.75 Q509.1,1199.75 508.8344,1199.5156 Q508.5688,1199.2813 508.5688,1198.8906 Q508.5688,1198.5156 508.8344,1198.2813 Q509.1,1198.0469 509.7094,1198.0469 L513.3813,1198.0469 L516.7719,1206.4063 Q517.3656,1206.4063 517.5531,1206.5469 Q517.9438,1206.8125 517.9438,1207.2656 Q517.9438,1207.6406 517.6859,1207.875 Q517.4281,1208.1094 516.8188,1208.1094 L514.5219,1208.1094 Q513.9125,1208.1094 513.6469,1207.875 Q513.3813,1207.6406 513.3813,1207.25 Q513.3813,1206.875 513.6469,1206.6406 Q513.9125,1206.4063 514.5219,1206.4063 L514.9438,1206.4063 L514.5375,1205.375 Z M513.8188,1203.6719 L512.4594,1200.2969 L511.0844,1203.6719 L513.8188,1203.6719 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="138" x="530.65" y="1209.3379">MediaLibraryScanJob</text><line style="stroke:#000000;stroke-width:0.5;" x1="479" x2="690" y1="1219.6094" y2="1219.6094"/><ellipse cx="489" cy="1233.9141" fill="none" rx="3" ry="3" style="stroke:#038048;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="47" x="498" y="1238.1426">ScanId:</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="545" y="1238.1426"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="30" x="549" y="1238.1426">Guid</text><ellipse cx="489" cy="1251.5234" fill="none" rx="3" ry="3" style="stroke:#038048;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="44" x="498" y="1255.752">UserId:</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="542" y="1255.752"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="30" x="546" y="1255.752">Guid</text><ellipse cx="489" cy="1269.1328" fill="none" rx="3" ry="3" style="stroke:#038048;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="48" x="498" y="1273.3613">Library:</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="546" y="1273.3613"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="44" x="550" y="1273.3613">Library</text><ellipse cx="489" cy="1286.7422" fill="none" rx="3" ry="3" style="stroke:#038048;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="44" x="498" y="1290.9707">Status:</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="542" y="1290.9707"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="138" x="546" y="1290.9707">LibraryScanJobStatus</text><polygon fill="none" points="489,1299.3516,493,1303.3516,489,1307.3516,485,1303.3516" style="stroke:#B38D22;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="168" x="498" y="1308.5801">parentsPayloadsExecuted:</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="4" x="666" y="1308.5801"> </text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="15" x="670" y="1308.5801">int</text><ellipse cx="489" cy="1330.7656" fill="none" rx="3" ry="3" style="stroke:#038048;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthLine truncated
|
||||
|
After Width: | Height: | Size: 84 KiB |
Reference in new issue
Block a user