frontend-guide

command
v0.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Command frontend-guide is the runnable companion to docs/FRONTEND_SPEC_LLM.md (`appximo frontend-spec`): ONE binary serving a frontend + the generated API + one custom byte-serving route, exercising every pattern the spec teaches —

  • Config.Static: a no-build vanilla SPA (web/) embedded and served at "/"
  • auth: signup/login from the SPA (enable signup with APPXIMO_AUTH_SIGNUP_ROLE=editor), the 401-bounce, expiry
  • generated CRUD: posts list/create with the multi-field 422 mapped to inputs and the screen states (loading/empty/error+retry)
  • files: upload with XHR progress → attach via the `photo` file field → display through a short-lived signed URL (authenticated) and through the PUBLIC route below (anonymous)
  • Ctx.ServeFile: /api/public-photo — the storefront-image pattern: a Public + ByteServing route that authorizes by relationship ("the photo of a PUBLISHED post") and streams with Range/ETag/sendfile

The SPA is deliberately plain JS with no build step so this example runs from a bare clone (`go run ./examples/frontend-guide`) — a real product would use SvelteKit + adapter-static exactly as the spec §2 recommends; the contract exercised here is identical.

Run it:

DATABASE_URL=… JWT_SECRET=… ADMIN_KEY=… APPXIMO_AUTH_SIGNUP_ROLE=editor \
  go run ./examples/frontend-guide --schema examples/frontend-guide/schema.json

then register a tenant on the control plane and open http://<tenant>.localhost:8080/.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL