YoBFF is a cloud-native BFF gateway and load balancer. It provides a Go-based data/control plane with a built-in React admin console.
- Control plane and data plane run in one process with clear separation.
- Admin UI can be served from embedded assets (Go embed) or an external directory via
ADMIN_UI_DIR. - Single-binary deployment is supported, with state persisted in SQLite (
modernc.org/sqlite, CGO-free).
- Host-based routing with exact and wildcard domain support.
- Load balancer pools and route rules are manageable via API and admin UI.
- HTTP/HTTPS forwarding with SNI certificate matching and certificate management.
X-Forwarded-Forprocessing with trusted proxy CIDR validation.
- Bearer token authentication for admin APIs.
- Brute-force mitigation via captcha requirement after failed login attempts.
- Request tracing with
X-Request-IDand fixed-window rate limiting. - Configurable HSTS response header for HTTPS requests.
- Config read/validate/apply/reload workflows.
- Global config snapshot history, version listing, and rollback.
- Site-level config versions, rollback, diff, and log stream settings.
- Audit logs with filtering by action/operator/target/time and paginated responses.
- Audit operator is bound to the authenticated login user, with
X-Operatorcompatibility.
- Built-in providers: Cloudflare, Aliyun ESA, Tencent TEO.
- Scheduled CIDR synchronization from CDN providers.
- Site-level CDN origin sync status query and manual refresh endpoints.
- Available modules: Dashboard, Traffic, Certificates, Observability, System, Weaver.
- Observability includes filterable and paginated audit log interactions.
- Weaver supports draft create/update/list/detail/run and writes audit records.
- OpenAPI contract is located at:
contracts/openapi/admin.yaml. - It includes login, config, LB pools/routes, site management, certificates, log stats, audit logs, and Weaver APIs.
- Go 1.24 or higher
- Node.js (frontend development only)
- pnpm (frontend development only)
- Clone the repository.
- Initialize environment variables:
cp .env.example .env(use equivalent copy command on Windows). - Start the service:
go run .Default endpoints:
- Admin UI:
http://localhost:8080/admin - Health check:
http://localhost:8080/healthz
- Enter the frontend directory:
cd web/source
pnpm install
pnpm dev- Backend tests:
go test ./... - Backend static checks:
go vet ./... - Frontend lint:
pnpm lint - Frontend build:
pnpm build
The following items are not completed yet:
- Dynamic service discovery via Kubernetes Service APIs and Consul.
- Application-level auth plugins (JWT validation and OIDC proxy).
- Observability extension (Prometheus exporter and Grafana dashboards).
- Multi-instance config synchronization using Etcd.
- Advanced L7 policies (declarative rewrite, circuit breaking, etc.).
Copyright 2026 YoBFF.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.