How asm0dey/opdsko works
Main Components
a) Core System Components:
• HTTP Server Layer (Ktor-based)
• Database Layer (SQLite with JOOQ)
• File System Scanner
• OPDS Feed Generator
• FB2 Parser Component
b) External Interfaces:
• HTTP/OPDS Client Access
• Local File System (FB2 files storage)
Architecture Pattern
The project follows a layered architecture with clear separation of concerns:
• Controllers Layer (controllers package)
• Service Layer (service package)
• Repository Layer (repository package)
• Data Access Layer (JOOQ-generated code)
• Domain Model Layer (model package)
[Client Layer]
• ▼
[HTTP/OPDS Interface]
• ▼
[Application Core]
• [Controllers]
• OPDS Controller
• API Controller
• Simple Controller
• [Services]
• InfoService
• [Repository]
• Database Access
• [File System]
• FB2 Files Scanner
Important Details
a) Data Flow:
• How requests flow from clients through the OPDS/HTTP endpoints
• How the FB2 parser processes files
• Database read/write operations
• Demonstrate the scanning process flow
b) Database Structure:
Main entities:
• Books
• Authors
• Genres
• Full-text search tables
• Relationships between entities
Technical Stack Indicators
Technology labels:
• Ktor (Web Framework)
• SQLite (Database)
• JOOQ (Database Access)
• Kotlin (Programming Language)
• Flyway (Database Migrations)
Interactions
Key interactions:
• Client requests for book listings
• Search operations
• File scanning processes
• Database updates
• File serving