automatedteach/vending-machine-lab

What would still need you if you left a business alone for two weeks? A free browser simulation.

JavaScript

0

1 commits

updated Sep 16, 2026

See the code

README

Vending Machine Lab

What would still need you if you left a business alone for two weeks?

Vending Machine Lab is a free browser simulation for exploring that question. Choose a digital product, custom digital service, vending machine, or reusable equipment business. Set its costs, capacity, rules and helpers. Run fourteen simulated days, see what gets stuck, change the setup, and try the same fortnight again.

Play: vending-machine-lab.pages.dev

This is a completed side project, shared as a small experiment. It grew out of an attempt to design businesses that could operate with little ongoing owner involvement. The useful result was a way to make the operating assumptions visible and try changing them.

What it does

  • Models supplied customer demand, working cash, delivery, refunds, staffing, outages and owner requests.
  • Includes forty editable examples across four operating models. Examples are starting assumptions, not market estimates.
  • Keeps previous runs so you can compare a repair against the same fictional conditions.
  • Saves work in your browser and supports workspace export/import.
  • Optionally lets you copy a packet to an assistant you already use and import its proposed decisions.

Customer arrivals, money, physical work and the success or failure of AI help are simulated. The Lab does not predict demand or profit, validate an idea, or run a real business. Prices do not automatically change demand. Setup costs and the value of your own time are excluded from the operating result. See MODEL.md for the complete assumptions and accounting rules.

Run locally

Use Node.js 22 or newer (tested with Node.js 22). There are no application dependencies to install and no build step. The tests cover the calculation engines; the browser smoke-check procedure is in qa/README.md.

npm test
npm run serve

Open http://127.0.0.1:4173/. Use HTTP rather than opening index.html directly: the app uses JavaScript modules. Clipboard access works on localhost or HTTPS.

You can also serve the contents of dist/ with another static HTTP server. Keep the legacy/ directory: it reproduces older saved calculations.

AI and data

The ordinary simulation runs deterministic rules in your browser. This site makes no AI API calls and requires no AI account or API key. Its small CSV transformation and demo download run locally; generic digital jobs, AI help, human service and physical work are modeled outcomes.

The optional assistant workflow is manual: copy fictional orders and your machine description to your own assistant, then paste its JSON decisions back. It supplies the fictional fortnight in advance and accepts one standing decision per order. It is not a live agent thinking between days. Your assistant's own plan and data terms apply.

Workspace data is kept in browser storage. You can export it, copy it, or share it through the optional browser-agent interface. In browsers that expose the supported modelContext interface, registered tools let a browser agent read machine settings, change the draft, or run a local rehearsal. Review descriptions before sharing them with an assistant or another person. The web host receives ordinary HTTP requests to serve the app; no analytics, account system or workspace upload endpoint is included.

Keeping your work

Export a workspace before clearing browser data or switching devices/domains. Browser saves do not transfer automatically between sites. To move an existing workspace, export it at the old address and import it here. Import replaces the destination workspace after confirmation. Older runs retain their original calculation version; a current recheck is explicit.

Hosting

Upload the contents of dist/ to a static host. No database, server function, account binding, environment secret or build service is needed. The included _headers supplies security headers on Cloudflare Pages; configure equivalent headers on other hosts. 404.html supplies a real missing-page response on Pages.

Cloudflare Pages Direct Upload can publish the folder without connecting a Git repository. The live URL is a hosting choice, not a runtime dependency; forks can use another host or domain. When publishing a fork, update the canonical and social-preview URLs in dist/index.html.

Source map

  • dist/app.mjs: interface, saved workspace, comparisons, import/export and optional browser-agent controls.
  • dist/engine.mjs: configuration checks, fictional event tape, digital fulfillment and decision validation.
  • dist/physical.mjs: inventory, equipment faults, field work and physical-order accounting.
  • dist/labor.mjs: staffing terms and equipment capacity.
  • dist/examples.mjs: the existing forty editable examples.
  • dist/legacy/: earlier calculation engines for saved work.
  • qa/*.test.mjs: repeatable engine and accounting tests.
  • MODEL.md: model contract and limitations.

Status and reuse

Calculation version 0.5.0. Shared under the MIT license. You are welcome to fork and adapt it. No active development roadmap or ongoing support is promised.

The interface and implementation were developed with AI coding assistance and iterated through AI role-playing of users, automated browser checks, and feedback from people who tried it. Those exercises improved the interface; they are not validation of business forecasts or real-world AI reliability.

Contributors

automatedteach/vending-machine-lab

What would still need you if you left a business alone for two weeks? A free browser simulation.

JavaScript

0

1 commits

updated Sep 16, 2026

See the code

README

Vending Machine Lab

What would still need you if you left a business alone for two weeks?

Vending Machine Lab is a free browser simulation for exploring that question. Choose a digital product, custom digital service, vending machine, or reusable equipment business. Set its costs, capacity, rules and helpers. Run fourteen simulated days, see what gets stuck, change the setup, and try the same fortnight again.

Play: vending-machine-lab.pages.dev

This is a completed side project, shared as a small experiment. It grew out of an attempt to design businesses that could operate with little ongoing owner involvement. The useful result was a way to make the operating assumptions visible and try changing them.

What it does

  • Models supplied customer demand, working cash, delivery, refunds, staffing, outages and owner requests.
  • Includes forty editable examples across four operating models. Examples are starting assumptions, not market estimates.
  • Keeps previous runs so you can compare a repair against the same fictional conditions.
  • Saves work in your browser and supports workspace export/import.
  • Optionally lets you copy a packet to an assistant you already use and import its proposed decisions.

Customer arrivals, money, physical work and the success or failure of AI help are simulated. The Lab does not predict demand or profit, validate an idea, or run a real business. Prices do not automatically change demand. Setup costs and the value of your own time are excluded from the operating result. See MODEL.md for the complete assumptions and accounting rules.

Run locally

Use Node.js 22 or newer (tested with Node.js 22). There are no application dependencies to install and no build step. The tests cover the calculation engines; the browser smoke-check procedure is in qa/README.md.

npm test
npm run serve

Open http://127.0.0.1:4173/. Use HTTP rather than opening index.html directly: the app uses JavaScript modules. Clipboard access works on localhost or HTTPS.

You can also serve the contents of dist/ with another static HTTP server. Keep the legacy/ directory: it reproduces older saved calculations.

AI and data

The ordinary simulation runs deterministic rules in your browser. This site makes no AI API calls and requires no AI account or API key. Its small CSV transformation and demo download run locally; generic digital jobs, AI help, human service and physical work are modeled outcomes.

The optional assistant workflow is manual: copy fictional orders and your machine description to your own assistant, then paste its JSON decisions back. It supplies the fictional fortnight in advance and accepts one standing decision per order. It is not a live agent thinking between days. Your assistant's own plan and data terms apply.

Workspace data is kept in browser storage. You can export it, copy it, or share it through the optional browser-agent interface. In browsers that expose the supported modelContext interface, registered tools let a browser agent read machine settings, change the draft, or run a local rehearsal. Review descriptions before sharing them with an assistant or another person. The web host receives ordinary HTTP requests to serve the app; no analytics, account system or workspace upload endpoint is included.

Keeping your work

Export a workspace before clearing browser data or switching devices/domains. Browser saves do not transfer automatically between sites. To move an existing workspace, export it at the old address and import it here. Import replaces the destination workspace after confirmation. Older runs retain their original calculation version; a current recheck is explicit.

Hosting

Upload the contents of dist/ to a static host. No database, server function, account binding, environment secret or build service is needed. The included _headers supplies security headers on Cloudflare Pages; configure equivalent headers on other hosts. 404.html supplies a real missing-page response on Pages.

Cloudflare Pages Direct Upload can publish the folder without connecting a Git repository. The live URL is a hosting choice, not a runtime dependency; forks can use another host or domain. When publishing a fork, update the canonical and social-preview URLs in dist/index.html.

Source map

  • dist/app.mjs: interface, saved workspace, comparisons, import/export and optional browser-agent controls.
  • dist/engine.mjs: configuration checks, fictional event tape, digital fulfillment and decision validation.
  • dist/physical.mjs: inventory, equipment faults, field work and physical-order accounting.
  • dist/labor.mjs: staffing terms and equipment capacity.
  • dist/examples.mjs: the existing forty editable examples.
  • dist/legacy/: earlier calculation engines for saved work.
  • qa/*.test.mjs: repeatable engine and accounting tests.
  • MODEL.md: model contract and limitations.

Status and reuse

Calculation version 0.5.0. Shared under the MIT license. You are welcome to fork and adapt it. No active development roadmap or ongoing support is promised.

The interface and implementation were developed with AI coding assistance and iterated through AI role-playing of users, automated browser checks, and feedback from people who tried it. Those exercises improved the interface; they are not validation of business forecasts or real-world AI reliability.

Contributors

Languages

JavaScript

100.0%