2 Commits

Author SHA1 Message Date
a9b387b21f docs: Compact node_spooler README.md (429→308 lines)
Remove CI4 integration examples to focus on service documentation

Changes:
- Remove CI4 Integration section (113 lines of PHP/JS examples)
- Remove CI4 Controller from Architecture diagram
- Remove all ReportController, curl, fetch code references
- Condense Quick Start and Troubleshooting sections
- Focus README on pure node_spooler service documentation

Reduction: 429 → 308 lines (-121 lines, 28% smaller)

Scope:
- All API endpoints documented
- Error handling and cleanup procedures preserved
- Monitoring and troubleshooting guides retained
- Deployment instructions maintained
- No CI4 integration code examples
2026-02-03 11:44:44 +07:00
2843ddd392 Migrate PDF generation from legacy spooler_db to CI4 + node_spooler
BREAKING CHANGE: Remove public/spooler_db/ legacy system

Changes:
- Migrate validation preview from http://glenlis/spooler_db/main_dev.php to CI4 /report/{accessnumber}
- Add ReportController::preview() for HTML preview in validation dialog
- Add ReportController::generatePdf() to queue PDF generation via node_spooler at http://glenlis:3030
- Add ReportController::checkPdfStatus() to poll spooler job status
- Add ReportController::postToSpooler() helper for curl requests to spooler API
- Add routes: GET /report/(:num)/preview, GET /report/(:num)/pdf, GET /report/status/(:any)
- Delete public/spooler_db/ directory (40+ legacy files)
- Compact node_spooler/README.md from 577 to 342 lines

Technical Details:
- New architecture: CI4 Controller -> node_spooler (port 3030) -> Chrome CDP (port 42020)
- API endpoints: POST /api/pdf/generate, GET /api/pdf/status/:jobId, GET /api/queue/stats
- Features: Max 5 concurrent jobs, max 100 in queue, auto-cleanup after 60 min
- Error handling: Chrome crash detection, manual error review in data/error/
- PDF infrastructure ready, frontend PDF buttons to be updated later in production

Migration verified:
- No external code references spooler_db
- All assets duplicated in public/assets/report/
- Syntax checks passed for ReportController.php and Routes.php

Refs: node_spooler/README.md
2026-02-03 11:33:55 +07:00