Verstak Sync Server — HTTP API, auth/pairing, device registry, vault operation log, blob upload/download, conflict handling
 
 
Go to file
mirivlad c793084fa4 server: add SMTP config, user management web pages, install script
- SMTP configuration in admin panel with test button
- Admin web interface for user creation (/admin/create-user)
- REST API for user creation (/admin/api/users/create)
- Self-registration endpoint (/register)
- Systemd service file and install script
2026-06-20 19:21:25 +08:00
build/bin server: add SMTP config, user management web pages, install script 2026-06-20 19:21:25 +08:00
cmd/server fix: wire main.go to actual server package, server now starts 2026-06-20 11:13:41 +08:00
internal/server server: add SMTP config, user management web pages, install script 2026-06-20 19:21:25 +08:00
scripts server: add SMTP config, user management web pages, install script 2026-06-20 19:21:25 +08:00
.gitignore feat: add server core (server, config, schema) 2026-06-20 02:01:23 +08:00
AGENTS.md docs: add AGENTS.md with platform architecture rules 2026-06-16 11:53:20 +08:00
README.md fix: clarify sync server build script, produce visible binary 2026-06-20 03:39:01 +08:00
go.mod feat: add server core (server, config, schema) 2026-06-20 02:01:23 +08:00
go.sum feat: add server core (server, config, schema) 2026-06-20 02:01:23 +08:00
verstak-server.service server: add SMTP config, user management web pages, install script 2026-06-20 19:21:25 +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 (produces binary at build/bin/verstak-sync-server)
./scripts/build.sh

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

# First run with admin user
./build/bin/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