How moxgg/cups_print_app works
CUPSiOut is a CUPS print-management system: Flutter clients or the embedded web UI call a Go REST API, which manages CUPS servers and printers, submits and tracks print jobs, and provides administrative features. The main print path and server-side components are supported by sampled Go source; Flutter internals are not present in the supplied tree, so the client is shown only as a documented API consumer and Android conversion capability.
Main entry points: handler API handlers · repository SQLite repositories · server_service.go CUPS server service · main.go Server startup
Components 22
API and access
- Web UI
internal/router/web/app.js - HTTP router
internal/router/router.go - Auth and limits
internal/middleware - Authentication
internal/service/auth_service.go - API handlers
internal/handler
Printing workflow
- Print service
internal/service/print_service.go - CUPS server service
internal/service/server_service.go - Printer service
internal/service/printer_service.go - Job service
internal/service/job_service.go - DOCX conversion
internal/convert/convert.go - CUPS adapter
internal/cups/client.go - IPP client
pkg/ipp/client.go
Management features
- User management
internal/service/user_service.go - System settings
internal/service/setting_service.go - Announcements
internal/service/announcement_service.go - Version updates
internal/service/version_service.go
Runtime integrations
- Server startup
cmd/server/main.go - SQLite repositories
internal/repository - Android conversion
app/android/app/src/main/java/com/cupsprinthub/cups_print_hub/LibreOfficeConverterPlugin.java
Other components
- Flutter client
app - User or admin
- CUPS server
Connections 41
- User or admin → Flutter client: uses
- User or admin → Web UI: uses
- Flutter client → HTTP router: calls REST API
- Web UI → HTTP router: calls REST API
- Server startup → HTTP router: assembles
- Server startup → SQLite repositories: initializes
- Server startup → CUPS server service: constructs
- Server startup → Print service: constructs
- Server startup → Printer service: constructs
- Server startup → Job service: constructs
- Server startup → Authentication: constructs
- HTTP router → Auth and limits: registers
- HTTP router → API handlers: dispatches
- HTTP router → Authentication: configures auth
- API handlers → Authentication: invokes
- API handlers → CUPS server service: invokes
- API handlers → Printer service: invokes
- API handlers → Job service: invokes
- API handlers → Print service: invokes
- API handlers → User management: invokes
- API handlers → System settings: invokes
- API handlers → Announcements: invokes
- API handlers → Version updates: invokes
- Authentication → SQLite repositories: reads users
- CUPS server service → SQLite repositories: reads and writes
- CUPS server service → CUPS adapter: gets client
- Printer service → CUPS server service: resolves server
- Job service → CUPS server service: resolves server
- Print service → Printer service: checks printer
- Print service → CUPS server service: gets client
- Print service → DOCX conversion: converts DOCX
- Print service → CUPS adapter: submits job
- Print service → SQLite repositories: records history
- CUPS adapter → IPP client: sends IPP
- IPP client → CUPS server: exchanges IPP
- CUPS server service → SQLite repositories: updates health
- User management → SQLite repositories: persists users
- System settings → SQLite repositories: persists settings
- Announcements → SQLite repositories: persists announcements
- Version updates → SQLite repositories: persists versions
- Android conversion → Flutter client: offers local conversion