Problem
Deploying what is in the repo today ships a dead site. The only deploy config publishes a directory that does not exist, no host-level wiring forwards /api traffic, dynamic judge/article pages 404, and the prebuilt dist/ is a month old. For a judge-review platform whose core value is /judges/{id}/profile pages and whose transactional emails link to /article/{id}, every one of these is launch-blocking regardless of which host is ultimately chosen. (The missing framework-side prod-serve story is tracked upstream in stacksjs/stacks; this issue covers the app-side wiring that is needed either way.)
Findings
- Publish dir is wrong and the build command is the old pipeline.
netlify.toml:4publishesstorage/framework/views/web/dist, which does not exist;netlify.toml:3invokes./buddy build views, while the real build (bun build.ts→buildApp()) writes rootdist/. - No
/apipath works on a static host. All client API calls use relative/api/...URLs (~50 call sites inresources/stores/**; centralized_apiFetchatresources/stores/auth.ts:138, e.g.auth.ts:207). The only proxy is dev-only (storage/framework/core/actions/src/dev/views.ts:242-243).netlify.tomlhas zero[[redirects]]and no_redirectsfile exists, so every API call 404s in production. - Dynamic routes 404.
dist/holds ~28 HTML files with nodist/article/or per-judge pages, anddist/404.htmlis a 607-byte static page with no router — yet/article/{id}is baked into emails (app/Actions/Reviews/SubmitReviewAction.ts:159,app/Helpers/notifyModerators.ts:55). - Start/dev scripts point at a missing file.
package.jsondev/startrunbun serve.ts;serve.tsdoes not exist (onlypreview.ts, a static-only file server with no API proxy).cloud/Dockerfile's ENTRYPOINT targets a nonexistentdist/index.js;cloud/deploy-script.tsis a log-only no-op. dist/is a month stale with no rebuild trigger. Built 2026-05-12; missingarticle/,admin/,my-reviews, and theverify-email/[id]/[token]deep-link page added since..github/workflows/has onlyci.yml(the README links a nonexistentrelease.yml). The staledist/sitemap.xmlis localhost-baked and would shadow the dynamic/api/sitemap.xml(app/Actions/SitemapAction.ts);public/robots.txthardcodesSitemap: http://localhost:4000/api/sitemap.xml.
Acceptance criteria
- Deploy config builds via
bun build.tsand publishes the actual output directory (rootdist/) /api/*works from the deployed site —[[redirects]]proxy to the API host (or an API base URL wired into_apiFetch) — verified by a login round-trip against the deployed artifact/judges/{id}/profileand/article/{id}resolve on the static host (per-route fallback or SPA catch-all), including email-baked linkspackage.jsondev/startpoint at existing entrypoints (./buddy dev/bun preview.ts); no reference to nonexistentserve.ts- A fresh build is produced at deploy time (CI job or host build) so post-May pages exist; no month-old
dist/ships - Stale
dist/sitemap.xmlno longer shadows/api/sitemap.xml;robots.txtSitemap directive uses the production URL - Smoke test passes:
/judges/1/profile,/article/1, and login succeed against the built artifact
From the 2026-06-10 production-readiness audit.
Upstream (framework root causes):
- https://github.com/stacksjs/stacks/issues/1950 — production serve has no /api proxy