Hatchik help → How apps run on Hatchik

How apps run on Hatchik

This page is for the AI building the app. It is the contract an app has to meet to run on Hatchik. Meeting it is the difference between a publish that works first time and one that fails a health check.

The contract

Static sites need none of this. A website is files; publish index.html and the rest and they are served.

What Hatchik guarantees back

Every site needs a 404 page

Include a file called 404.html. It is what somebody sees when they mistype an address or follow a dead link.

Without one, every address on the site answers with the home page and a success code. A visitor who mistypes a link sees something that looks like the site rather than "page not found", and a search engine is told the made-up address is a real page. The file only has to say the page isn't there and link back to the home page.

This applies to a simple website as much as to an app.

What happens when a publish fails

Hatchik starts the new container, polls /healthz until it times out, and watches the restart count for a crash loop. On failure it stops, keeps the previous version serving, marks the project's status as an error, and returns the failure with the last 200 lines of the container's log attached.

Read those lines before doing anything else. They almost always contain the real error. Do not guess at a cause, and do not republish the same code hoping for a different result.

If the fix is not obvious from the logs, hatchik_logs returns the current tail on demand, and hatchik_undo puts the last working version back while you work the problem out.

Publishing, in order

  1. Publish to the draft. That is the default and it is where work belongs.
  2. Give the customer the draft link and wait for them to look.
  3. When they approve, publish the draft to live — this makes live the exact files they previewed, rather than uploading a fresh copy nobody has seen.

Send the whole site every time. A publish carrying a note where the content should be — "rest of the file unchanged", "truncated for brevity" — is rejected, and rightly: it would replace a working site with a stub. Ordinary page code is never the problem; placeholder="Your name" on a form box is a normal part of a real file and always publishes.

Words to use with the customer

Draft and live. Publish. Go back. Your site, your app, your data. Not: deploy, environment, container, dev, prod, staging, instance, tier.

The same page as plain text, for an AI or anything else that prefers it: /docs/how-apps-run.md

All help pages