Architecture & stack

Technology foundation of Axiom ERP

Built on modern enterprise development principles β€” no compromises on performance, reliability or scalability.

Go 1.26 PostgreSQL 18 Angular 21 DDD + CQRS Hexagonal Architecture Event-Driven
Principles

Architectural approach

Each of the 31 business contexts is organized with the same structure β€” four clear layers with one-directional dependencies.

01
HTTP / Ports Entry point β€” request handling
Gin Handlers DTOs RBAC Middleware Validation
↓
02
Application Orchestration β€” use-case logic
Commands Queries Event Handlers
↓
03
Domain Core β€” pure business rules
Aggregates Value Objects Domain Events Business Rules
↓
04
Infrastructure Adapters β€” external systems
PostgreSQL Repos Redis Cache File Storage SMTP

Key principles

1

Dependency Inversion

Domain does not depend on Infrastructure. Repositories are interfaces in the domain, implementation is in the infrastructure.

2

CQRS β€” separation of reads and writes

Each command and query has a separate Handler. Reads are optimised independently from writes.

3

Event-driven integration

No direct calls between contexts. Event Bus (in-memory + Redis) is the only communication channel.

4

Google Wire β€” compile-time DI

No reflection at runtime. Dependency graph is built at compile time β€” zero overhead.

Technical Excellence

Technology stack

Chosen for performance and reliability.

⚑
Go 1.26 Backend Backend Β· compiled Β· concurrent
Go 1.26

Statically typed language with native concurrency. Minimal latency, minimal memory footprint.

Gin v1.10 pgx/v5 squirrel Google Wire golang-jwt go-redis v9 OpenTelemetry testify
🐘
PostgreSQL 18 Primary database Β· relational
PG 18

Native uuidv7() support, LTREE for hierarchies, JSONB for metadata, DATERANGE for time boundaries.

Native uuidv7() LTREE paths JSONB DATERANGE Triggers data-checksums
πŸ…°οΈ
Angular 21 Frontend Frontend Β· SPA Β· TypeScript
NG 21

Signals-based reactivity, standalone components, PrimeNG UI, Chart.js visualisations.

Angular 21 PrimeNG 21 TypeScript 5.9 Chart.js 4 CodeMirror 6 Signals API
Technical Excellence

What makes Axiom technically unique

Money as int64, never float

All monetary values stored as BIGINT (cents). Custom pkg/money with full arithmetic. Zero rounding errors.

UUID v7 everywhere

Time-ordered keys enable efficient cursor pagination and natural chronological sorting without additional indexes.

Two-tier automation

Tier-1: expr-lang for fast formulas (<1ms). Tier-2: Starlark Python-like sandbox for complex logic.

Offline RSA-2048 licensing

Signed keys without internet connection. Public key embedded at compile time via //go:embed. Only stdlib.

No ORM β€” full SQL control

Raw SQL via pgx/v5 + squirrel. Full query visibility, optimal execution plans, no N+1 problems.

Testcontainers in CI

Integration tests spin up real PostgreSQL 18 in Docker β€” not mocks. 265+ tests including real migrations.

Multi-entity via company_id

Holding structure support: 15 migrations add company_id to 10 bounded contexts. RequireCompanyContext middleware + session-level entity switching. One Docker image for all customers.

Core Principles

Automatic event chains

No manual data transfer. 185+ domain events form automatic business processes.

Sales β†’ Operations

  • DealWon β†’ Auto-contract + sales target credit
  • ContractActivated β†’ Auto-generate revenue plan
  • OrderCreated β†’ Auto stock reservation
  • OrderConfirmed β†’ Auto invoice creation

Procurement β†’ Finance

  • GoodsReceived β†’ Stock receipt + AP accrual
  • InvoiceCreated β†’ AR posting in accounting
  • ProductionStarted β†’ Raw material issue from warehouse
  • PayrollPosted β†’ GL journal entries + production labour

Flexible deployment options

🏒

Modular Monolith

Single binary, Docker Compose, minimal infrastructure requirements. Ideal for getting started.

☁️

Microservices

Each context can be extracted independently. No direct imports. Event Bus β†’ Kafka/RabbitMQ.

πŸ”’

On-Premise

Full data control. Offline licensing. Suitable for data protection requirements.

One image β€” any server

Native x86-64 and ARM64 support

Axiom publishes OCI multi-architecture manifest lists. One tag in the registry β€” Docker automatically delivers the correct binary for any server, whether Intel Xeon in a Ukrainian data center or AWS Graviton in the cloud.

πŸ–₯️
x86-64 (amd64)
Intel & AMD processors
  • Intel Core i3 / i5 / i7 / i9
  • Intel Xeon E3 / E5 / Silver / Gold / Platinum
  • AMD EPYC Naples / Rome / Milan / Genoa
  • AMD Ryzen / Threadripper
  • Any cloud VPS (Hetzner, DigitalOcean, AWS EC2 c5/m5)
  • Ukrainian data centers (Mirohost, Volia, GigaCloud)
⚑
ARM64 (aarch64)
ARM architecture β€” Apple, Amazon, Ampere
  • Apple Silicon M1 / M2 / M3 / M4 (development)
  • AWS Graviton 2 / 3 / 4 β€” 40–60% better price-performance
  • Azure Ampere Altra (Dpsv5 / Epsv5)
  • Oracle Cloud Ampere A1 (free tier available)
  • Google Cloud Tau T2A
  • Raspberry Pi 4/5, NVIDIA Jetson (edge/IoT)

One command β€” both architectures

# Build for x86-64 + ARM64 β†’ GHCR
make release VERSION=0.11.0

# Intel/AMD only (faster ~40%)
make release PLATFORMS=linux/amd64

# On any target server β€” Docker picks arch
make ansible-upgrade VERSION=0.11.0
1
Cross-compile
Go binary compiled natively for amd64 + arm64 without QEMU β€” fast.
2
Manifest list
OCI manifest list pushed to GHCR β€” one tag, two layers (amd64 + arm64).
3
Auto-select
Docker on the target server reads the manifest and pulls only the matching layer.
Zero-latency data

Reactive dashboard refresh

Dashboard data is always live β€” no cron jobs, no polling scripts, no manual refreshes required. The system reacts to real business events in real time.

1

Business data changes

New order, posted invoice, or production record β€” any INSERT / UPDATE / DELETE on orders, invoices, production_orders.

2

PostgreSQL trigger fires

notify_dashboard_refresh() trigger calls pg_notify('dashboard_refresh', table_name) β€” a single lightweight signal, no data in the payload.

3

Go listener debounces

A dedicated goroutine holds a connection via pgx.Conn.WaitForNotification(). Rapid changes are debounced (5 s window) to prevent thundering-herd refreshes.

4

REFRESH MATERIALIZED VIEW CONCURRENTLY

4 materialized views (mv_revenue_monthly, mv_ar_aging, mv_production_daily, mv_customer_summary) are refreshed concurrently β€” reads are never blocked.

Why not cron?

  • Cron fires on a fixed interval regardless of whether data changed
  • NOTIFY fires exactly when data changes β€” zero unnecessary work
  • No external scheduler dependency β€” pure PostgreSQL + Go
  • Debounce prevents cascade refresh on bulk imports

Dashboard config = one SQL row

  • Widget layout stored as JSONB in dashboard_configs
  • Change dashboard = UPDATE one row β€” no code deploy
  • 25+ widgets: KPI, spline charts, paginated tables
  • Per-company configs: farm β‰  factory β‰  distribution