Add complete Web UI infrastructure: Go backend: - REST API handlers for messages, agents, channels (internal/api/) - SSE hub for real-time event streaming - Session-to-owner middleware bridging auth sessions to API context - SPA file server with go:embed for static assets - GetMessageByID on MessagingService, RevokeKey on AgentService - Updated router with RouterConfig for full service wiring Svelte 5 SPA (web/): - SvelteKit with static adapter for SPA mode - Tailwind CSS with dark mode (class-based, localStorage persisted) - API client with auto-redirect on 401 - SSE client with exponential backoff reconnect - Pages: Login, Dashboard, Conversations, Channels, Agents, Settings - Components: Sidebar, Header, MessageList, ComposeForm, AgentCard, TraceViewer - Responsive layout with mobile sidebar toggle Build: - Placeholder index.html in internal/web/dist/ for go:embed compilation - Updated Makefile web target to copy build output - All existing Go tests pass, CGO_ENABLED=0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
627 B
Makefile
33 lines
627 B
Makefile
.PHONY: build test dev web clean lint
|
|
|
|
BINARY := synapbus
|
|
MODULE := github.com/smart-mcp-proxy/synapbus
|
|
BUILD_DIR := bin
|
|
LDFLAGS := -s -w
|
|
|
|
CGO_ENABLED := 0
|
|
|
|
build:
|
|
CGO_ENABLED=$(CGO_ENABLED) go build -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY) ./cmd/synapbus
|
|
|
|
test:
|
|
CGO_ENABLED=$(CGO_ENABLED) go test ./... -v -count=1
|
|
|
|
dev:
|
|
CGO_ENABLED=$(CGO_ENABLED) go run ./cmd/synapbus serve
|
|
|
|
web:
|
|
cd web && npm install && npm run build
|
|
rm -rf internal/web/dist
|
|
cp -r web/build internal/web/dist
|
|
|
|
clean:
|
|
rm -rf $(BUILD_DIR)
|
|
rm -rf web/node_modules web/build
|
|
rm -rf data
|
|
|
|
lint:
|
|
golangci-lint run ./...
|
|
|
|
.DEFAULT_GOAL := build
|