Provider adapters at the edge. Session-owned history in the client. Local runtime state by default.
Ollama · OpenAI-compatible APIs · Anthropic · custom gateways
Runtime · Configuration · Contracts · Docs
standard-ui is a provider-agnostic chat workspace for local and hosted model backends. Its core contract is narrow: keep provider differences at the API boundary, preserve saved thread history, and avoid turning local runtime state into a managed platform.
Development:
npm run setupOpen http://localhost:3000.
| Need | Command |
|---|---|
| npm dev | npm install && npm run dev |
| Docker | docker compose up --build |
| Production | npm install && npm run prod |
Use .env only for non-default backends:
cp .env.example .env| Backend | Minimum config |
|---|---|
| Ollama | none by default; set OLLAMA_BASE_URL only when needed |
| OpenAI-compatible | OPENAI_ENABLED=true, OPENAI_BASE_URL, OPENAI_API_KEY |
| Anthropic | ANTHROPIC_ENABLED=true, ANTHROPIC_API_KEY |
Docker defaults Ollama to http://host.docker.internal:11434 so a container can talk to a host Ollama process.
- Thread history is persisted session data; request history is derived and may be windowed.
- Provider-specific payloads stay behind
/api/backends,/api/models, and/api/chat. - Custom gateways live in
.standard-ui/provider-plugins.json, not in hardcoded UI branches. - Uploads and provider plugins live in
.standard-ui; selected UI state lives in browser storage. - Engineering rules live in
docs/engineering.mdanddocs/frontend-state.md.
Supported backend shapes:
| Backend | Model list | Chat |
|---|---|---|
| OpenAI-compatible | GET /models |
POST /chat/completions |
| Anthropic | GET /models |
POST /messages |
| Ollama | GET /api/tags |
POST /api/chat |
| Custom gateway | modelsPath |
chatPath |
Custom provider schema: app/api/_lib/provider-plugins.ts.
app/api/_lib/backends.ts: provider translationhooks/use-chat-threads.ts: thread lifecyclehooks/use-chat-streaming.ts: request streaminglib/thread-storage.ts: local thread persistence guardcomponents/chat: chat surfacedocs/frontend-state.md: frontend state contract
MIT. See LICENSE.