How thejohndev/xerox works
Xerox is a WhatsApp file-management desktop app with a CLI entry point. Its main workflow starts the service, receives WhatsApp messages, associates senders with customer batches, saves media into dated folders, and exposes those files in the desktop UI for browsing and printing. The app also archives prior-day folders and reconstructs counters and batches after restart. Source excerpts show the core service and storage calls; the renderer implementation is not sampled, so UI-to-bridge interactions are left unverified.
Main entry points: electron-main.js Electron main · filesystem.js File management · whatsapp.js WhatsApp service · logger.js Logs and dashboard
Components 14
Desktop interface
- Electron main
electron-main.js - Main UI
index.html - UI bridge
preload.js - Print preview
print.html - Print bridge
print-preload.js - CLI startup
index.js
WhatsApp intake
- WhatsApp service
src/whatsapp.js
File lifecycle
- File management
src/filesystem.js - Dated file store
State and records
- Path and date config
src/config.js - Runtime counters
src/state.js - Logs and dashboard
src/logger.js
Other components
- Operator
- WhatsApp network
Connections 23
- Operator → Main UI: uses
- Main UI → UI bridge: invokes APIs
- UI bridge → Electron main: invokes IPC
preload.js - Electron main → Main UI: loads UI
electron-main.js - Electron main → File management: starts and queries
electron-main.js - Electron main → WhatsApp service: starts and controls
electron-main.js - Electron main → Logs and dashboard: logs startup
electron-main.js - Electron main → Print preview: opens preview
electron-main.js - Print preview → Print bridge: uses API
- CLI startup → File management: prepares folders
index.js - CLI startup → WhatsApp service: starts service
index.js - CLI startup → Logs and dashboard: logs startup
index.js - WhatsApp service → WhatsApp network: connects and receives
- WhatsApp service → File management: creates and saves
src/whatsapp.js - WhatsApp service → Runtime counters: tracks batches
src/whatsapp.js - WhatsApp service → Logs and dashboard: records events
src/whatsapp.js - File management → Dated file store: reads and writes
src/filesystem.js - File management → Runtime counters: recovers and updates
src/filesystem.js - File management → Logs and dashboard: records archive events
src/filesystem.js - File management → Path and date config: uses paths and dates
src/filesystem.js - Logs and dashboard → Path and date config: gets dated paths
src/logger.js - Electron main → Dated file store: opens files
electron-main.js - Electron main → Print preview: provides batch data
electron-main.js