Zero Crust is a POS simulator that explores architectural patterns for quick-service restaurant operations. It features dual synchronized windows, modeling the hardware segregation found in production deployments where cashier and customer displays run on separate hardware.
Architecture Explorer
Trusted process: MainStore, PaymentService, BroadcastService, IPC handlers
Pattern: Centralized State + Command Handler
Security: Zod validation, sender verification
Click nodes to explore. Watch IPC messages flow between processes.
Key Features
- Dual-Head Display Simulation — Separate cashier and customer windows with real-time synchronization
- Command Pattern IPC — Type-safe, auditable command system with Zod runtime validation
- Integer-Only Currency — All monetary values stored in cents to prevent floating-point errors
- Architecture Debug Window — Real-time visualization of IPC flow and state changes
- Demo Loop — Auto-generates realistic order patterns for continuous operation
Security Model
Zero Crust implements six layers of Electron security:
- Electron Fuses — Compile-time security flags that cannot be changed at runtime
- Context Isolation — Renderer processes cannot access Node.js APIs directly
- Zod Validation — All IPC commands validated with schemas before processing
- Sender Verification — IPC handlers validate message origin against allowed sources
- Navigation Control — Blocks unauthorized navigation and window.open calls
- Permission Denial — Blocks all permission requests by default
The Broadcast Pattern
Instead of delta updates or complex synchronization logic, Zero Crust broadcasts the entire application state on every change:
// BroadcastService.ts - Subscribe and broadcast on change
this.mainStore.subscribe((state) => {
this.windowManager.broadcastState(state);
});
This “full-state sync” pattern eliminates an entire category of bugs—renderers always have the complete, consistent picture. The performance cost is negligible for typical POS cart sizes.
Screenshots




Was this helpful?
Want to learn more?
Ask can answer questions about this project's implementation, technologies, and more.