Skip to content

System Architecture

Service Registry

ServiceCodePortSnowflakeBase PathBase Class
identitySVC-00010310101/v1/api/identityIssuerApplication
commerceSVC-00020310202/v1/api/commerceVerifierApplication
saleSVC-00030310303/v1/api/saleVerifierApplication
financeSVC-00040310404/v1/api/financeVerifierApplication
inventorySVC-00050310505/v1/api/inventoryVerifierApplication
ledgerSVC-00060310606/v1/api/ledgerVerifierApplication
pricingSVC-00070310707/v1/api/pricingVerifierApplication
paymentSVC-00080310808 / 91,92/v1/api/paymentVerifierApplication
signalSVC-00090310909/v1/api/signalVerifierApplication
outreachSVC-001003111010/v1/api/outreachVerifierApplication
licensingSVC-001103112011/v1/api/licensingVerifierApplication
taxationSVC-001303113013/v1/api/taxationVerifierApplication

Payment supports mode-based deployment: full (default, all-in-one), api (REST only, Snowflake 8), worker (BullMQ only, Snowflake 91, 92, ...).

Network Topology

Application Hierarchy

BaseApplication (@venizia/ignis)
  └── BaseApplication (@nx/core — CORS, Swagger, health check)
        ├── IssuerApplication (JWKS issuer — signs JWTs, serves /jw-certs)
        │     └── identity
        └── VerifierApplication (JWKS verifier — fetches remote /jw-certs)
              └── commerce, sale, finance, inventory, pricing, payment,
                  signal, ledger, outreach, licensing, taxation

All services verify JWTs by fetching the identity service's /jw-certs JWKS endpoint. Only identity signs tokens.

Package Dependency Chain

Build order (from Makefile): third-parties first, then core, then all packages in dependency order. See Build System for the full target reference.

Database Schema Mapping

All schemas are defined in @nx/core and shared across services via the PostgresCoreDataSource. Each service connects to the same PostgreSQL database but operates on different schemas.

SchemaTablesPrimary ServicePurpose
public15identity, commerceUsers, roles, permissions, merchants, organizers, products, categories, variants, devices, sale channels, configurations
pricing11pricingFares, fare rules, costs, taxes, price evaluations
allocation4commerceEvent seating, venue layouts
sale9saleSale orders, order items, checks, kitchen tickets
inventory12inventoryStock, purchase orders, purchase items, stock movements
finance3financeWallets, transactions, categories
payment1paymentWebhook configurations
ledger2ledgerLedger jobs, generated documents
identity8identityUser credentials, identifiers, profiles, mail verification
licensing5licensingPolicies, policy features, licenses, activations, license events
outreach2outreachInquiries, subscribers

Total: 72 tables across 11 schemas.

See Database Guide for migration workflow and ORM patterns.

Component Matrix

Which packages register which infrastructure components:

PackageKafka ProducerKafka ConsumerWebSocketCache RedisMail / SMS
coreYes
identityYesYes (SMS + Mail)
commerceYesYes
saleYesYes
financeYesYes
inventoryYesYesYes
pricingYes
ledgerYesYes
taxationYes
search— (CDC)
paymentYes
signalYes (E2E encrypted)
outreachYes
licensingYes

See Event Architecture for the full topic and queue reference.

Frontend Applications

AppFrameworkPurposePort
@nx-app/clientReact 19 + Vite 7 + shadcn/uiAdmin dashboard (28 screen modules)5173
@nx-app/boReact 19 + Vite 7 + shadcn/uiBack office (merchant management)5174
@nx-app/sale-rendererReact 19 + Tauri 2 WebViewPOS desktop UI
@nx-app/sale-mainRust + Tauri 2POS desktop backend (SQLite, hardware plugins)
@nx-app/overtureAstroMarketing / landing page4321
@nx-app/admin-ui-kitReact + Radix UIShared component library (38 shadcn + custom)
@nx-app/coreTypeScriptShared constants, hooks, locales, utilities

Third-Party Integrations

PackagePurposeProvider
@nx/mq-payMulti-provider payment (QR, Phone POS, Smart POS)VNPAY
@nx/mq-smsMulti-provider SMS gatewayVNPAY
@nx/iiapiVietnam e-invoice serviceVNPAY viiAPI
@nx/t-vanVietnam Tax Authority data transmissionT-VAN
PageDescription
Getting StartedLocal setup walkthrough
Build SystemMakefile targets, dependency graph
Event ArchitectureKafka topics, queues, WebSocket, CDC
Database GuideSchema details, migrations, ORM patterns
IGNIS PatternsApplication hierarchy, DI, controller factory
Packages OverviewPer-package documentation index

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.