How advplyr/audiobookshelf works
Main Components
a. Frontend Layer:
• Vue.js/Nuxt.js based web client (/client directory)
• Progressive Web App (PWA) capabilities
• Mobile apps (Android/iOS) integration points
• Web socket connections for real-time updates
b. Backend Layer:
• Node.js server (/server directory)
• Core server components (Server.js, Auth.js, Database.js)
• Controllers for different functionalities
• Managers for specific features
• File system handlers
c. Storage Layer:
• Database storage (SQLite/embedded)
• File system storage for media files
• Backup storage system
• Cache management system
d. External Services Integration:
• Metadata providers (Audible, Google Books, etc.)
• RSS feed services
• Email services
• Chromecast integration
Key Relationships to Highlight
a. Data Flow:
• Client-server communication via REST API and WebSocket
• Media streaming pathways
• Metadata synchronization
• User authentication flow
b. Component Interactions:
• Library scanning and monitoring
• Media processing pipeline
• Backup and restoration processes
• Podcast feed management
Architectural Patterns to Emphasize
• MVC pattern in the backend structure
• Component-based architecture in the frontend
• Event-driven architecture for real-time updates
• Service-oriented architecture for external integrations
[Client Layer]
• Web Client (Vue.js/Nuxt.js)
• Mobile Apps
• Progressive Web App
[API Gateway / WebSocket]
[Server Layer]
• Authentication & Authorization
• Core Services
• Library Management
• Media Processing
• User Management
• Podcast Management
• Support Services
• Backup Manager
• Cache Manager
• Task Manager
• Notification Manager
[Storage Layer]
• Database (SQLite)
• File System
• Cache Storage
[External Services]
• Metadata Providers
• RSS Feeds
• Email Services
• Chromecast
Important Implementation Details
• Separation between the client (/client) and server (/server) codebases
• Managers (/server/managers) that handle specific functionality
• Controllers (/server/controllers) that manage API endpoints
• Model structure (/server/models) for data organization
• Providers (/server/providers) for external service integration