How bacnh85/yardmaster works
yardmaster is a self-hosted LLM proxy for coding-agent clients. The main flow accepts a client request, authenticates and routes it across configured upstream providers, optionally translates wire formats, streams the response, and records usage for the embedded dashboard. The dashboard also manages providers, combos, keys, quotas, and settings. Relationships reflect README statements and source-index references; some handler-level details and unsampled modules cannot be verified from the excerpts, so uncertain links are omitted.
Main entry points: App.tsx Dashboard shell · api.ts Admin API client · proxy.go Request proxy · server.go HTTP server
Components 28
Proxy runtime
- CLI runtime
cmd/yardmaster/main.go - Configuration
internal/config/config.go - HTTP server
internal/server/server.go - Request proxy
internal/proxy/proxy.go - Wire translation
internal/translate/translate.go
Provider and auth
- Provider registry
internal/provider/registry.go - Provider cooldowns
internal/provider/cooldowns.go - OAuth pool
internal/auth/oauth.go - Inbound auth
internal/auth/auth.go
Usage and catalog
- SQLite request store
internal/store/store.go - Model catalog
internal/server/catalog.go - Quota reporting
internal/server/quota.go
Admin dashboard
- Dashboard shell
web/src/App.tsx - Admin API client
web/src/api.ts - Stats views
web/src/tabs/UsageTab.tsx - Request history
web/src/tabs/RequestsTab.tsx - Live status
web/src/tabs/LiveTab.tsx - Cache statistics
web/src/tabs/CacheTab.tsx - Latency view
web/src/tabs/LatencyTab.tsx
Dashboard management
- Provider manager
web/src/tabs/ProvidersTab.tsx - Combo manager
web/src/tabs/CombosTab.tsx - Endpoint keys
web/src/tabs/EndpointsTab.tsx - Models and tests
web/src/tabs/ModelsTab.tsx - Request playground
web/src/Playground.tsx - Settings
web/src/tabs/SettingsTab.tsx - Quota view
web/src/tabs/QuotaTab.tsx
Other components
- Coding agents
- LLM providers
Connections 46
- Coding agents → HTTP server: send requests
- CLI runtime → Configuration: loads config
cmd/yardmaster/main.go - CLI runtime → Provider registry: registers providers
cmd/yardmaster/main.go - CLI runtime → Request proxy: constructs proxy
cmd/yardmaster/main.go - CLI runtime → HTTP server: starts server
cmd/yardmaster/main.go - CLI runtime → SQLite request store: opens store
cmd/yardmaster/main.go - HTTP server → Request proxy: routes requests
internal/server/server.go - HTTP server → SQLite request store: reads request data
internal/server/server.go - HTTP server → Model catalog: serves catalog
internal/server/server.go - HTTP server → Quota reporting: serves quotas
- Request proxy → Provider registry: selects providers
internal/proxy/proxy.go - Request proxy → Wire translation: translates wires
internal/proxy/proxy.go - Request proxy → SQLite request store: records usage
internal/proxy/proxy.go - Request proxy → Inbound auth: checks inbound keys
internal/proxy/proxy.go - Request proxy → OAuth pool: gets provider tokens
internal/proxy/proxy.go - Request proxy → Provider cooldowns: uses cooldowns
internal/proxy/proxy.go - Provider registry → Configuration: loads provider settings
internal/provider/registry.go - Provider registry → Inbound auth: uses auth adapters
internal/provider/registry.go - OAuth pool → SQLite request store: persists tokens
internal/auth/oauth.go - Request proxy → LLM providers: dispatches requests
- Dashboard shell → Admin API client: calls admin API
web/src/App.tsx - Dashboard shell → Stats views: renders tab
web/src/App.tsx - Dashboard shell → Request history: renders tab
web/src/App.tsx - Dashboard shell → Live status: renders tab
web/src/App.tsx - Dashboard shell → Cache statistics: renders tab
web/src/App.tsx - Dashboard shell → Latency view: renders tab
web/src/App.tsx - Dashboard shell → Provider manager: renders tab
web/src/App.tsx - Dashboard shell → Combo manager: renders tab
web/src/App.tsx - Dashboard shell → Endpoint keys: renders tab
web/src/App.tsx - Dashboard shell → Models and tests: renders tab
web/src/App.tsx - Dashboard shell → Settings: renders tab
web/src/App.tsx - Dashboard shell → Quota view: renders tab
web/src/App.tsx - Provider manager → Request playground: opens test view
web/src/tabs/ProvidersTab.tsx - Models and tests → Request playground: uses test view
web/src/tabs/ModelsTab.tsx - Stats views → Admin API client: fetches stats
web/src/tabs/UsageTab.tsx - Provider manager → Admin API client: manages providers
web/src/tabs/ProvidersTab.tsx - Combo manager → Admin API client: manages combos
web/src/tabs/CombosTab.tsx - Endpoint keys → Admin API client: manages keys
web/src/tabs/EndpointsTab.tsx - Models and tests → Admin API client: loads models
web/src/tabs/ModelsTab.tsx - Request playground → Admin API client: sends test request
web/src/Playground.tsx - Quota view → Admin API client: fetches quotas
web/src/tabs/QuotaTab.tsx - Request history → Admin API client: fetches history
web/src/tabs/RequestsTab.tsx - Cache statistics → Admin API client: fetches cache stats
web/src/tabs/CacheTab.tsx - Latency view → Admin API client: fetches latency
web/src/tabs/LatencyTab.tsx - Live status → Admin API client: fetches live data
web/src/tabs/LiveTab.tsx - Admin API client → HTTP server: calls admin endpoints