Go Implementation
The official reference implementation of the Weblisk server specification, built for production use.
Reference ImplementationQuick Start
terminal
# Install go install github.com/avaropoint/weblisk-server@latest # Scaffold a new project weblisk-server init my-app --blueprint api-rest # Start development server cd my-app && weblisk-server dev
Minimal Server
main.go
// main.go — minimal Weblisk server package main import ( "log" "github.com/avaropoint/weblisk-server/server" ) func main() { s := server.New(server.Config{ Port: 8080, Blueprints: "./blueprints", Agents: "./agents", }) log.Fatal(s.ListenAndServe()) }
Features
| Feature | Description |
|---|---|
| Blueprint Loader | Automatically generates routes from YAML blueprints |
| Agent Host | Manages agent lifecycle, health checks, and message dispatch |
| WebSocket Hub | Built-in channel-based pub/sub for real-time features |
| SSE Streaming | Server-sent event support with automatic keep-alive |
| Middleware | CORS, logging, auth, rate limiting — all composable |
| Hot Reload | Development server watches blueprints and agents for changes |
| Single Binary | Compiles to a single binary with no runtime dependencies |
Project Structure
my-app/ ├── blueprints/ │ └── api-rest.yaml ├── agents/ │ └── sync-agent.yaml ├── main.go └── go.mod
CLI Commands
| Command | Description |
|---|---|
weblisk-server init | Scaffold a new project |
weblisk-server dev | Start dev server with hot reload |
weblisk-server build | Compile to production binary |
weblisk-server validate | Check blueprints and agents for errors |
Source code and full documentation: github.com/avaropoint/weblisk-server