Architecture¶
This section provides a comprehensive overview of Printernizer's architecture, design decisions, and technical implementation.
Available Documentation¶
- System Design - Overall system architecture and service design
- API Specification - Complete API reference and specifications
- Data Models - Database schemas and data structures
- Event Contracts - Event system contracts and interfaces
- Event Flows - Event flow diagrams and workflows
- Algorithms - Core algorithms and implementation details
- Repository Pattern - Data access layer design
Architecture Overview¶
Printernizer is built as a modern, asynchronous web application using:
- Backend: FastAPI with async SQLite for high-performance API services
- Frontend: Vanilla JavaScript with modern ES6+ features
- Communication: WebSocket for real-time updates, REST API for operations
- Printer Integration: MQTT for Bambu Lab, HTTP for Prusa
- Database: SQLite with aiosqlite for async operations
- Deployment: Docker, Home Assistant add-on, standalone Python
Key Design Principles¶
- Async-First: All I/O operations are asynchronous for optimal performance
- Service-Oriented: Clean separation of concerns through service classes
- Event-Driven: Real-time updates via WebSocket and event system
- API-First: RESTful API design for maximum interoperability
- Extensible: Plugin architecture for printer integrations
System Components¶
Core Services¶
- PrinterService - Printer management and status tracking
- JobService - Print job monitoring and history
- FileService - File operations and downloads
- AnalyticsService - Business metrics and reporting
Printer Integrations¶
- BambuLabPrinter - MQTT-based integration
- PrusaPrinter - HTTP API integration
- BasePrinter - Abstract base class for printer implementations
For Developers¶
If you're looking to:
- Understand the codebase → Start with System Design
- Integrate new features → Review API Specification
- Add printer support → See Repository Pattern
- Work with events → Read Event Contracts
- Contribute code → Check Development Guide