Category: How-to
17 pages in this category. Other categories: Foundations, Agents, Models and providers, Security and data, Problems & solutions.
- From idea to deployed AI app: a typical workflow: One concrete path, end to end: build with an assistant, keys and secrets, deploy, logs, costs, updates.
- How to check a web app an AI built: Run it in a headless browser: load each page, click the main actions, and keep the console errors, failed requests and screenshots as evidence.
- How to shrink a container image: A working web server can fit in a few kilobytes: use a scratch image and a static binary. How to get there, what you give up, and how to measure the stored size.
- How to tell whether a page overflows the screen: Compare scroll size with client size at the viewport sizes you care about: a larger scroll width or height means something does not fit.
- Querying a web crawl from a small app: Read Common Crawl's Parquet index and hyperlink graph directly from a small container with DuckDB, without copying the data — and without the big join that runs a 256 MB container out of memory.
- Where your keys come from: attribution for AI apps: When agents sign up instead of people, record a link ref, the agent and model the caller reports, and its HTTP client family, then count them by day.
- How to point a domain at your app, with one record for every subdomain: Point one wildcard DNS record at your app's server so every app subdomain resolves without its own record, and one wildcard certificate covers them for HTTPS.
- How to tell whether a deploy actually worked: The deploy call returning is not the app running: wait for the build, check the port and read the logs before you believe it.
- Serve one custom domain from more than one datacenter: One hostname for an app that runs in several datacenters: point the domain at one entry point that looks up which datacenter holds each name, and forward the rest with the Host header kept.
- How to deploy your app on every push: Run the same deploy script from CI on every push to main: tests first, the key in the repository's secret store, one deploy at a time, and a check that the app answers.
- Persistent storage for many AI sandboxes: A block volume per sandbox stops scaling at the host's per-machine limit: give each sandbox a directory on a shared filesystem, and plan isolation, quotas and snapshots.
- Where an AI-built app keeps its data: Data that must outlive a visit, a restart or a redeploy belongs on the server, in a database or files on storage that outlives the container — not in the browser or in process memory.
- Previewing a signed-in page on localhost: When sign-in cannot finish on http://localhost, sign the session cookie yourself with the app's own secret, on loopback only, to preview the signed-in page.
- How to run an app that keeps its own SQLite database: Run the official image as one container with a volume at the app's storage path, keep its secret keys outside the image, and finish the first-run setup once.
- How to keep an AI reply running when the browser refreshes: Make the server own the turn, buffer its events and let a reloaded page reattach — instead of tying the model call to one HTTP response.
- How to serve a single-page app from one container: One HTML file plus its assets in an nginx image, with no build step: hash routes need no rewrite rule, path routes need one, and the build context must not carry your secrets.
- How to carry a prompt through sign-in into the first chat: Save the text a visitor typed before the sign-in redirect, read it back once when the app restarts, and use it as the first message: what survives the redirect, and how to keep the handoff safe.