Web interface for chatting with Petal 1 (petal-1-150M).
Two independent projects in a single git repository:
frontend/— SvelteKit app (TypeScript, Tailwind 4, Bun), targeting Cloudflare Workers;backend/— Go API exposing chat over SSE streaming and routing to the inference provider.
Conversations stay in the browser's localStorage: no database or accounts in v1.
No real generation yet: without
INFERENCE_PROVIDER=fake,/api/chatemits a singleerrorSSE event (not_configured) and the UI displays it cleanly.
- Bun 1.4+
- Go 1.27 (backend, module name
github.com/GautierP/web/backend)
Backend (from the service root, port 8080 by default):
cd backend
INFERENCE_PROVIDER=fake go run . # test mode: simulated stream, no real generationFrontend (Bun):
cd frontend
bun install
bun run dev # http://localhost:5173The backend's CORS allows http://localhost:5173 by default, and the frontend reaches
the API at http://localhost:8080 by default (PUBLIC_API_BASE_URL).
cd backend && go test ./... && go vet ./... && go build ./...
cd frontend && bun run check && bun run lint && bun run test && bun run buildFull documentation: Petal Web documentation.
- Architecture — request flow, deployment, data ownership, secrets
- Backend — routes, SSE contract, validation, environment variables, middleware
- Frontend — API client, local storage, generation lifecycle, checks
- Inference — provider seam, current providers, RunPod work, known limitations