Core abstractions and implementations for building realistic coffee machine simulations in TypeScript