Verstak Sync Server — HTTP API, auth/pairing, device registry, vault operation log, blob upload/download, conflict handling
 
 
Go to file
mirivlad 69dacb40b0 chore: add .gitignore 2026-06-20 01:57:09 +08:00
cmd/server feat: initialize sync server repository 2026-06-20 01:55:51 +08:00
scripts feat: add scripts/build.sh 2026-06-16 12:12:09 +08:00
.gitignore chore: add .gitignore 2026-06-20 01:57:09 +08:00
AGENTS.md docs: add AGENTS.md with platform architecture rules 2026-06-16 11:53:20 +08:00
README.md feat: initialize sync server repository 2026-06-20 01:55:51 +08:00
go.mod feat: initialize sync server repository 2026-06-20 01:55:51 +08:00

README.md

Verstak Sync Server

Standalone sync server for Verstak2 platform.

Overview

This server provides synchronization between devices running Verstak2. It handles:

  • Device registration and authentication
  • Operational transform-based sync
  • Blob storage for attachments
  • User management with email confirmation

Quick Start

# Build
go build -o verstak-sync-server ./cmd/server

# Run
./verstak-sync-server -port 47732 -data ./server-data

# First run with admin user
./verstak-sync-server -admin-user admin -admin-pass secret

Configuration

Flag Default Description
-port 47732 HTTP port
-data ./server-data Data directory
-admin-user Create admin user (first run)
-admin-pass Admin password (first run)

Architecture

cmd/server/          - Entry point
internal/server/     - Server implementation
  - server.go        - Core server logic
  - handlers.go      - HTTP handlers
  - schema.go        - Database schema

API Endpoints

  • POST /api/push - Push operations to server
  • GET /api/pull - Pull operations from server
  • POST /api/device/pair - Pair device with token
  • POST /api/user/register - Register new user
  • POST /api/user/login - User login

Development

# Run tests
go test ./...

# Build for production
CGO_ENABLED=1 go build -o verstak-sync-server ./cmd/server

License

MIT