EdgeBalancer is a SaaS control plane for deploying Cloudflare Worker based load balancers from a visual dashboard. Users connect a Cloudflare account, configure origins and routing, and EdgeBalancer generates and deploys the Worker for them.
- JWT auth with
httpOnlycookies - encrypted Cloudflare credential storage
- create, edit, delete, cancel, and rollback flows
- Worker Versions and Deployments based updates
- Worker custom domain attachment and validation
- deployment history pruning after updates
- fullscreen deployment progress and success UX
- seven routing strategies:
round-robinweighted-round-robinip-hashcookie-stickyweighted-cookie-stickyfailovergeo-steering
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS v4
- Backend: Express.js, TypeScript, Mongoose
- Database: MongoDB Atlas
- Edge Runtime: Cloudflare Workers
.
├── client/
├── server/
├── AGENTS.md
├── AGENT.md
├── CLAUDE.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
└── SECURITY.md
- Node.js 20+
- npm
- MongoDB Atlas account
- Cloudflare account with Worker access
cd client
npm install
cp .env.example .env.local
npm run devcd server
npm install
cp .env.example .env
npm run devNEXT_PUBLIC_API_URL=http://localhost:8000MONGODB_URI=mongodb+srv://user:password@cluster.mongodb.net/edgebalancer?retryWrites=true&w=majority
JWT_SECRET=your-jwt-secret-key-here
ENCRYPTION_KEY=your-64-character-hex-encryption-key
PORT=8000
CLIENT_URL=http://localhost:3000
CORS_ORIGIN=http://localhost:3000Cycles requests through origins using an edge-local rotating cursor.
Routes requests proportionally based on configured origin weights.
Maps the incoming client IP to a stable origin selection.
Pins repeat visitors to the same origin using an edge-set cookie.
Uses weights for first assignment, then keeps that visitor pinned by cookie.
Tries origins in order until one succeeds without an upstream 5xx.
Matches origins by Cloudflare colo, then country, then continent, then falls back.
- Create deploys a Worker and attaches a Worker custom domain
- Update uses Cloudflare Worker Versions and Deployments
- Update rollback restores the previous active deployment on failure
- Cancelled create/update operations trigger cleanup or rollback
- Old deployment history is pruned after successful updates
cd client
npx tsc --noEmitcd server
npx tsc --ignoreDeprecations 6.0 --noEmit
npm run build