1.6 KiB
1.6 KiB
Architecture
Use this page as the English entry point into the shared bilingual architecture documents.
Current Architecture In One View
accounts.svc.plus is a Gin-based Go service that combines:
- identity and session management,
- admin control-plane operations,
- agent and Xray configuration control,
- and usage / billing read models.
The actual startup chain is centered in cmd/accountsvc/main.go, where the service wires the primary store.Store, the GORM-backed admin DB, optional mailer and token service, the agent registry, and the optional Xray periodic syncer before calling api.RegisterRoutes.
Read In This Order
- Architecture overview This is the main runtime story: startup, request flow, session ownership, agent reporting, and Xray config generation.
- Components Use this when you need the ownership map by package and dependency direction.
- Design decisions Use this when you need the current tradeoffs, not just the shape of the system.
Key Architecture Themes
- Session-first control plane with optional JWT middleware.
store.Storeas the core business persistence abstraction.- Selective GORM usage for admin settings, homepage video, sandbox binding, and tenant / XWorkmate models.
- Agent status and sandbox bindings projected into
agentserver.Registry. - Xray config generated from database state through
xrayconfig.Generatorand optionally converged byPeriodicSyncer.