Kaful — Streaming CNC Digital Twin
A deployed platform for monitoring CNC cutting tools in real time. After each cut, the system ingests new sensor data, updates its estimate of tool wear, and forecasts how much useful life remains. Rather than returning a single prediction, it produces a range that reflects uncertainty and becomes more precise as more data arrives. I built the platform end to end, including authentication, customer data isolation, streaming ingestion, the wear and RUL models, storage, testing, and deployment.
- Designed the system to support multiple machine shops while keeping each customer's machines and data fully isolated. A shared storage interface allows it to run on SQLite locally and Postgres in production, with parity tests across both databases.
- Improved the ingest path for scale and concurrency by replacing an operation that slowed as a run grew with a constant time lookup, and adding per run locking to prevent simultaneous uploads from corrupting state. Benchmarked the system before and after the changes.
- Deployed on Render, Neon Postgres, and Cloudflare R2, with approximately 136 automated tests.