Skip to main content

Go Implementation

The official reference implementation of the Weblisk server specification, built for production use.

Reference Implementation

Quick 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

FeatureDescription
Blueprint LoaderAutomatically generates routes from YAML blueprints
Agent HostManages agent lifecycle, health checks, and message dispatch
WebSocket HubBuilt-in channel-based pub/sub for real-time features
SSE StreamingServer-sent event support with automatic keep-alive
MiddlewareCORS, logging, auth, rate limiting — all composable
Hot ReloadDevelopment server watches blueprints and agents for changes
Single BinaryCompiles 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

CommandDescription
weblisk-server initScaffold a new project
weblisk-server devStart dev server with hot reload
weblisk-server buildCompile to production binary
weblisk-server validateCheck blueprints and agents for errors
Source code and full documentation: github.com/avaropoint/weblisk-server