diff --git a/.vercelignore b/.vercelignore new file mode 100644 index 0000000..6ed4158 --- /dev/null +++ b/.vercelignore @@ -0,0 +1,9 @@ +# This deployment ships the static frontend only. The api/ serverless +# functions are NOT safely deployable as-is on Vercel: api/_lib's sqlite- +# backed stores write to a filesystem path (Vercel's serverless filesystem +# is read-only outside /tmp, which is ephemeral and per-instance), and +# api/*.integration.test.ts sit at the top level of api/, where Vercel's +# zero-config convention would treat them as functions even though they +# import vitest. Exclude the whole directory from this static deploy +# without touching the committed api/ directory itself. +api/ diff --git a/README.md b/README.md index 383deff..1527a62 100644 --- a/README.md +++ b/README.md @@ -18,21 +18,26 @@ works, and a step-by-step guide to running and demoing it live. ## Live demo -**Try it:** the deployed build lives at a Vercel preview URL that was created -with `vercel deploy --temporary --yes` during this build window. Temporary -preview URLs expire roughly one hour after the last deploy to them, so by the -time you read this the link below may already be dead - this was an explicit, -accepted tradeoff for the submission window, not an oversight. A permanent -`vercel --prod` deployment is planned separately, outside this document's -scope. +**Try it:** [`https://first-place-overhaul-todo6.vercel.app`](https://first-place-overhaul-todo6.vercel.app) +- a permanent `vercel --prod` production deployment, not a temporary preview +link - it does not expire. -- Preview URL (may be expired): `https://agile-citrine-45o1qv9.tmp.now` -- If it's dead, redeploy it yourself in under a minute: +This deploy is the **static frontend only**. The self-hosted sync/blob/admin +backend (`api/*`) is a separate, self-hosted-only component per this +project's standing no-managed-cloud-backend preference - it is never part of +this public URL. The app is local-first by design (see above), so the +backend being absent here changes nothing about how it works: every balance +and allocation is still a deterministic replay of this browser's own signed +Event Log, and the one sanctioned caller of that backend +(`trySyncWithBackend()` in `src/lib/sync.ts`) is a silent, throw-free no-op +whenever it's unreachable - exactly the case on this deploy. + +- Redeploy it yourself in under a minute: ```bash npm install npm run build - npx vercel --prod # or: npx vercel deploy --yes for a fresh preview + npx vercel --prod # api/ is excluded from this deploy via .vercelignore ``` (Requires a free Vercel account; `vercel login` once if you've never used diff --git a/vercel.json b/vercel.json index 8ef88d4..70180c7 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,6 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", + "buildCommand": "tsc -b tsconfig.app.json tsconfig.node.json && vite build", "rewrites": [ { "source": "/((?!api/).*)", "destination": "/index.html" } ]