Platform, Architecture & Foundations
How SamvraCore ERP is built, packaged, licensed, isolated per tenant, and internationalised.
1. Architecture and Single-Binary Distribution
What SamvraCore ERP is
SamvraCore ERP is a multi-tenant ERP delivered as a single self-contained Go 1.25 binary. The React 19 + TypeScript frontend is compiled by Vite and embedded directly into that binary at build time using //go:embed dist/*, wired through frontend/embed_prod.go and frontend/serve.go. This means one artefact contains both the API server and the web UI, so there is no separate web server or static-asset host to deploy.
The codebase is organised in layers. The inventory for v1.11.82 records 34 backend usecase modules under internal/usecase/, 77 Gin HTTP controllers under internal/adapter/controller/, 73 domain entities under internal/domain/entity/, and roughly 80 repository implementations under the Postgres persistence package. On the frontend there are over 180 page components across 38 domain folders and 51 API service modules.
Runtime stack
The server uses the Gin HTTP framework. The frontend is a Vite-built single-page application styled with Tailwind CSS 4 and Lucide icons, using React Context plus custom hooks for state. The Axios client auto-injects the Bearer token and performs a refresh on a 401 response. Rich UI primitives include the TipTap rich-text editor, Recharts charts, and dnd-kit drag-and-drop.
A Redux Toolkit store is installed but currently unused; the live state model is React Context with custom hooks. The reference production deployment runs at samvracore.tech. Because the binary embeds everything it needs, a typical install is one file plus a database, which keeps the deployment surface small and predictable across operating systems.