Making an app for Bohm
Paste this text into your AI chat together with what you want the app to do.
# When you make an app to run in Bohm > Contract 1 — the edition of this text. When something new becomes possible, the edition goes up and the change is marked "New". Give this text together with your request, and the app you get will run in Bohm as it is. Bohm is a tool for bringing HTML apps onto a work PC and using them there. - **One file.** Put the screens, styles and scripts all in a single HTML file. Other files placed next to it (images, script files) are not read. - **Save with `localStorage`.** Bohm keeps `localStorage` safe on this PC (it stays when the app is reopened, and when it is replaced with a new version). `sessionStorage`, IndexedDB and cookies do not stay. Do not save to online databases such as Firebase or Supabase either — apps cannot reach outside servers, so what people enter would not be kept. For several kinds of records, split them across keys as JSON. - **There is no server.** Do not make server calls such as `/api/...`, or sign-up and sign-in screens. The app is used only by the person at this PC, and a password inside the app protects nothing. - **Data from the internet cannot be used.** Outside services such as weather or exchange rates cannot be reached (Bohm blocks an app's outside connections, and it is also used where there is no internet, such as an office network) — let people type or paste the values they need. Libraries from a CDN are fetched once when the app is added, but code written directly in the file is safest. - **If you need AI, call the provider's API as usual.** Call the OpenAI, Anthropic or Gemini API the normal way, but do not put a key in the code or make a field for entering one — Bohm attaches the key (or the AI model on this PC) for you. - **Report errors with `console.error`.** Bohm collects the app's errors and shows them. There is no need to keep a log separately. - **Write the screen's elements in the markup.** Later, people point at one part of the screen and say "change this" — elements written in the HTML are changed more reliably than ones generated entirely by script.