# Where it runs

**One ships; the rest are ideas**

  The hosted board runs as a static page on GitHub Pages and an API on
  Render's free plan. Every other option on this page is TODO. Costs are
  rough orders of magnitude, not quotes.

Static and local, the two modes that ship, are on
[Deployment](/docs/deployment). The options below are for a board a team
edits from the browser.

| Option | Cost | Operating it |
| --- | --- | --- |
| TODO: local server behind a tunnel | Free | Almost nothing; one identity for every commit |
| TODO: a container | Free to a few euros a month | TLS, a secret, uptime |
| Static page and a separate API: ships | Free (Render's free plan) | The service sleeps when idle; secrets in Render |
| TODO: an edge runtime | Free tier | A port of the server |
| TODO: GitHub Actions as the backend | Free | Nothing, but each change takes a workflow run |
| TODO: the page writes to GitHub | Free | Nothing; the token lives in the browser |
| TODO: a managed service | Paid | Tenants, limits and billing |

## TODO: local server behind a tunnel

`folio-board-server` stays on the owner's machine, and Tailscale or
Cloudflare Tunnel exposes it. The tunnel decides who gets in, and TLS comes
with it. Every commit still carries the machine's identity, so it suits one
person on several devices, not a team.

## TODO: a container

The same binary in a container image, on Fly.io, Render, Railway, a VPS or a
home server. It serves the kanban and the API from one origin, behind
[sign-in](/docs/deployment/auth). The board lives in GitHub, so the server
keeps no state of its own.

## Static page and a separate API: ships

The kanban stays on GitHub Pages and the API runs on Render, built from this
repository's `Dockerfile`. The page and the API are two origins, and some
browsers block cookies across sites, so the session travels in a header and
the server lets only the site's origin through CORS.
[Deploy a hosted board](/docs/deployment/deploy) sets it up.

## TODO: an edge runtime

The API on Cloudflare Workers or a similar runtime, with sessions in a key
value store or a signed token. The free tier covers a small team. It needs the
server ported to WebAssembly or rewritten, and only a GitHub store fits there.

## TODO: GitHub Actions as the backend

The page sends each change as a `repository_dispatch` event, and a workflow
applies it and commits. No server, and GitHub decides who may write. Each
change takes a workflow run, tens of seconds, and a conflict shows up late.

## TODO: the page writes to GitHub

No backend: the browser calls the GitHub API with the user's token. See
[Front and back](/docs/deployment/architecture#todo-b-front-only-straight-to-github)
for what that moves into the browser.

## TODO: a managed service

A hosted Folio Board that teams install as a GitHub App on their
repositories. It builds on the container option, adds tenants and limits, and
is a business to run, not a feature to ship.
