How mal-xa/printhub works
This repository contains two print workflows: a LAN-oriented print server/client with a local printer agent, and a PrintHub web application for order-based printing. In the LAN workflow, users submit jobs and monitor printers; the server handles API requests and coordinates with agents, which register, receive dispatches, and print through their local system. PrintHub adds user accounts, order management, file uploads, and per-file print-job monitoring. The README is placeholder text; relationships below are limited to excerpted source and SOURCE INDEX references, with unsampled capabilities represented only where the tree supports them.
Main entry points: use-cases Agent Use Cases · app.ts Agent Runtime · App.tsx Job And Printer UI · controllers HTTP Controllers
Components 27
LAN Client
- Job And Printer UI
printing-system/print-client/packages/print-client/src/App.tsx - Polling Hooks
printing-system/print-client/src/hooks/usePolling.ts - Print API Client
printing-system/print-client/src/api/printApi.ts - Shared API Contracts
printing-system/print-common/src
LAN Server
- HTTP Application
printing-system/print-server/src/presentation/http/app.ts - HTTP Controllers
printing-system/print-server/src/presentation/http/controllers - Print Services
printing-system/print-server/src/application/services - WebSocket Gateway
printing-system/print-server/src/infrastructure/websocket/ws-gateway.ts - Uploaded File Store
printing-system/print-server/src/infrastructure/storage/local-file-storage.ts - Server Repositories
printing-system/print-server/src/infrastructure/persistence/in-memory
Print Agent
- Agent Runtime
printing-system/print-agent/src/app.ts - WebSocket Event Router
printing-system/print-agent/src/interface/ws-event-router.ts - Agent Use Cases
printing-system/print-agent/src/application/use-cases - Agent WebSocket
printing-system/print-agent/src/infrastructure/transport/websocket-client.ts - Local Printing
printing-system/print-agent/src/infrastructure/printing/cups-printing-system.ts - Local Job Queue
printing-system/print-agent/src/infrastructure/persistence/json-file-job-queue.repository.ts
PrintHub Client
- Order And Admin UI
printing-system/printhub/1/client/src/routes - Client Services
printing-system/printhub/1/client/src/services
PrintHub Server
- Authentication Service
printing-system/printhub/1/server/src/services/auth.service.ts - Order API Routes
printing-system/printhub/1/server/src/routes/order.routes.ts - Print Job Controller
printing-system/printhub/1/server/src/controllers/printJob.controller.ts - Print Job Service
printing-system/printhub/1/server/src/services - Print Queue Worker
printing-system/printhub/1/server/src/jobs/printQueue.job.ts - Hub Repositories
printing-system/printhub/1/server/src/repositories
Other components
- Print User
- PrintHub User
- Firebase Auth
Connections 24
- Print User → Job And Printer UI: submits jobs
printing-system/print-client/packages/print-client/src/App.tsx - Job And Printer UI → Polling Hooks: loads status
- Polling Hooks → Print API Client: fetches data
- Job And Printer UI → Print API Client: submits jobs
- HTTP Application → HTTP Controllers: routes requests
printing-system/print-server/src/presentation/http/app.ts - HTTP Controllers → Print Services: calls services
printing-system/print-server/src/presentation/http/controllers/printers.controller.ts - HTTP Controllers → Uploaded File Store: stores uploads
- Print Services → Server Repositories: uses repositories
- Agent Runtime → Agent Use Cases: schedules work
printing-system/print-agent/src/app.ts - Agent Runtime → WebSocket Event Router: attaches router
printing-system/print-agent/src/app.ts - WebSocket Event Router → Agent Use Cases: dispatches events
printing-system/print-agent/src/interface/ws-event-router.ts - Agent Runtime → Agent WebSocket: connects transport
- Agent Use Cases → Local Printing: prints jobs
- Agent Use Cases → Local Job Queue: persists jobs
- WebSocket Gateway → Agent WebSocket: exchanges events
- PrintHub User → Order And Admin UI: places orders
- Order And Admin UI → Client Services: uses services
- Client Services → Order API Routes: calls API
- PrintHub User → Authentication Service: authenticates
- Authentication Service → Firebase Auth: verifies tokens
printing-system/printhub/1/server/src/services/auth.service.ts - Order API Routes → Print Job Controller: routes print jobs
printing-system/printhub/1/server/src/routes/order.routes.ts - Print Job Controller → Print Job Service: creates jobs
printing-system/printhub/1/server/src/controllers/printJob.controller.ts - Print Job Controller → Print Queue Worker: starts processing
printing-system/printhub/1/server/src/controllers/printJob.controller.ts - Print Job Service → Hub Repositories: uses repositories
printing-system/printhub/1/server/src/services/auth.service.ts