EN·VI·KO·JA Contact
Services / Development Biz / Business systems
[ Business systems · Architecture & engineering ]

The designbeneath the screen

Domain model, workflow engine, access, integration and security, each layer built to an agreed standard.
The aim is a structure that survives ten years of use and change.

Anatomy

Seven layers of a business system

What each layer is responsible for, and what we fix in writing before building it.

01 / 097layers, screen to platform — each agreed on paper before it is built
Section A–A
01Experience
02API & identity
03Workflow & rules
04Domain modules
05Data
06Integration
07Platform
What it doesFixed in writing before building
  1. Web and mobile screens in KO · VI · EN · JA

    Component library, text-length rules

  2. One entry point, single sign-on, tokens

    OpenAPI contract, OIDC / SAML

  3. Approvals, timers, escalations, decision tables

    BPMN 2.0 and DMN models

  4. Purchasing, stock, sales, finance, HR logic

    Module boundaries and invariants

  5. Transactions, documents, audit log

    Schema migrations, retention

  6. HQ ERP, banks, e-invoice gateways, devices

    Interface catalogue, retry rules

  7. Containers, backups, monitoring

    Environments as code, RPO / RTO

A
A
Elevation · one structure
Domain model

Codes and domain boundaries

Good codes outlive the software; boundaries decide what can change without breaking the rest.

02 / 094languages in one glossary — one term per concept, in code, screens and tickets
SharedMaster data
Purchasing
Inventory
Sales
Finance
HR
Rooms = bounded contexts · core = shared master data
Item code rule (example)
RMtype-STLmaterial-M08size-001sequence
General notes
  1. 1
    Bounded contexts

    Purchasing, Inventory, Sales, Finance, HR each own their data and rules.

  2. 2
    Shared master data

    Item, partner, organisation and account owned once and referenced everywhere.

  3. 3
    Item code rule

    RM-STL-M08-001: type, material, size, sequence (example).

  4. 4
    Account mapping

    Local chart of accounts mapped to the HQ chart, one-to-one or many-to-one.

  5. 5
    Invariants

    A PO total always equals the sum of its lines; posted journals always balance.

  6. 6
    Glossary in four languages

    One term per concept in KO · VI · EN · JA, used in code, screens and tickets.

Architecture choice

Why we start with a modular monolith

Three shapes compared on the criteria that decide cost and risk for a business system.

03 / 091codebase to start — split when scale, teams or release cycles diverge
Specification · structure optionsREV C
CriterionModular monolithStart hereMicroservicesComposable ERP
Data consistencyOne transaction across modulesSagas and eventual consistencyDepends on vendor APIs✓
Team size it suitsOne to three teamsMany independent teamsSmall core team plus vendors✓
Running costLowHigh: more services to watchLicences per module✓
Changing boundaries laterRefactor inside one codebaseHard across servicesLimited to what vendors expose✓
When to split a part outDifferent scale, team or release rhythmFrom the startBuy commodity, build differentiator✓

Following Martin Fowler’s “Monolith First”: service boundaries are learned, not guessed.

PurchasingInventorySalesFinanceHR
Drawer = moduleowns its data and rules
Split out laterwhen scale, teams or release cycles diverge
Drawers = modules · one chest = one release
Workflow engine

Approvals and rules outside the code

Processes run as BPMN models and decisions as DMN tables, so rule changes do not need a release.

04 / 090releases needed to change an approval rule
Decision tablethe lever picks the route
1 · under USD 5,000Team lead
2 · plant · USD 5,000-50,000Plant manager + finance ✓
3 · over USD 50,000Entity head + HQ
Change the rule = move the lever · no release
Request (example)DocumentPODepartmentplantAmountUSD 18,400
Decision table rows (example)DMN · hit policy U (unique)
UDocumentDepartmentAmountApprovers
1POany dept< USD 5,000team lead—
2POplantUSD 5,000–50,000plant manager + finance✓
3POany dept> USD 50,000general director + HQ
Approval line1plant manager→2financeprocess v7 · no release needed
  • Decision table

    Amount, department and category in; approvers out.

  • Timers & escalation

    No answer in 48 hours goes to the deputy (example).

  • Versioned processes

    Running requests finish on the version they started with.

  • Compensation

    A rejected payment reverses its reservation and notifies the requester.

  • Engines

    Camunda or Flowable, embedded or as a service.

Access & audit

Roles, segregation and audit trail

Who can see and do what, which combinations are never allowed, and how every change is kept.

05 / 092segregation-of-duty rules block the risky pairs (example)
Role × action (example)RBAC · Buyer, warehouse clerk, AP accountant, controller, auditor.
ABACentity = VN01dept = Purchasingamount ≤ USD 5,000Entity, department and amount narrow what a role may touch.
Create POCreate vendorReceive goodsApprove paymentPost journalLock periodRead audit trailBuyer●●✕Warehouse clerk●AP accountant●✕Controller●●Auditor●
  • ✕SoDCreate vendor + approve payment
  • ✕SoDPost journal + lock period
Audit trail · append-only (example)hash-linked
  1. 14:02:11Buyer · vendor V-0417 bank account****1201 → ****8830change request CR-88#9f3a ← #41c7
  2. 14:05:40Controller · payment run PR-1031draft → approvedweekly run#c20e ← #9f3a
  3. 17:30:02Controller · period 2026-10open → lockedmonth-end close#7b5d ← #c20e

Who, when, before and after values, reason; append-only and hash-linked.

Single sign-on
••••
MFA ✓

Keycloak with OIDC / SAML, MFA for finance and admin roles.

Access review

Each manager confirms the team’s rights every quarter (example).

Multi-entity

Entities, currencies, languages, time

One document, five entities: what the system stores once and what it shows differently.

06 / 095entities read one invoice number on five screens (example)
Bac Ninh (VN)UTC+7
Hóa đơnINV-26-00073131 Oct 2026VND 26,350,000
Changwon HQ (KR)UTC+9
청구서INV-26-0007311 Nov 2026 09:10KRW 1,452,000
Osaka (JP)UTC+9
請求書INV-26-000731¥151,800
Rotterdam (EU)UTC+1
FactuurINV-26-000731€ 925
Austin (US)UTC−6
InvoiceINV-26-000731$1,000
Stored once
  • Document number
  • Legal entity
  • Time in UTC
Shown per entity
  • Posting date (local)
  • Currency & rate
  • Language
Group view
  • Roll-up by entity
  • Reporting currency
  • Fiscal calendar
One invoice, five views (example)
  • Entity as a dimension

    Every record carries its legal entity; reports roll up by group.

  • Three currencies

    Transaction, functional and reporting currency: e.g. EUR order, VND books, USD to HQ.

  • Rates & revaluation

    Rate types per use; open items revalued at month-end.

  • Time zones

    Stored in UTC; posting date is the entity’s local date (Hanoi UTC+7, Seoul and Tokyo UTC+9).

  • Fiscal calendars

    January–December or April–March per entity.

  • Languages

    Labels and master data names in KO · VI · EN · JA; legal documents in the local language.

Integration

Four ways to connect

Each interface gets the pattern that fits its timing, volume and failure cost.

07 / 094integration styles — sync API, events, files, e-invoice
Cable scheduleIF-LIST
LinePatternUsed forGuard
ASynchronous APIStock check, price lookup, user sign-inOpenAPI contract, timeouts, versioning
BEventsOrder created, goods received, invoice postedOutbox pattern, idempotency keys, dead-letter queue
CFiles & EDIBank statements, HQ ERP batches, supplier EDIChecksums, row counts, reconciliation report
DE-invoice gatewaysVN e-invoices, KR e-tax invoices, EU EN 16931 / Peppol, JP PeppolStatus tracking from draft to accepted, error re-issue
StackREST / OpenAPIKafkaRabbitMQSFTPEDIPeppolEN 16931
ASynchronous API
BEvents
CFiles & EDI
DE-invoice gateways
Patch panel · four line types, four patterns
Reporting & data

Operational data apart from reports

Heavy reports never slow down the people entering orders.

08 / 092data models — write for transactions, read for reports
Write modeltransaction DB
Read modelsviews for lists & dashboards
events
P&ID · data flow
InletOrders, receipts, invoices

People entering work write here only.

Read onlyKPI definitions

One formula, one owner, one source for every number.

VesselAnalytics store

History and cross-entity analysis outside the transaction database.

Valve · monthlyHQ package

Monthly export in the HQ chart of accounts and currency.

Write model Normalised tables for transactions and rules. · Read models Pre-built views for lists and dashboards, updated by events.

Security & performance

Security, speed and test targets

Targets written into the specification at the start and measured before each release.

09 / 09< 1 sp95 response time on list screens (example)
Measured on the box
Response time · distribution (example)limit 1 s
Month-end load
0.5×
1×
1.5×
2×

Load test at twice the busiest closing day (example)

Test certificate · before each releaseResult
01Application securityOWASP ASVS 5.0 Level 2 for systems with personal and financial data (example)✓
02Security managementAccess, logging and encryption controls mapped to your security certification where you hold one✓
03Response timeList screens p95 under 1 s; approval action under 300 ms (example)✓
04Month-end loadLoad test at twice the busiest closing day (example)✓
05Test layersUnit, API contract and end-to-end tests in CI; independent testing by QA Biz✓
06DeploymentCloud region or your own servers; blue-green release with rollback✓
FAQ

Engineering questions

Do we need microservices?

Usually not at the start. A well-divided modular monolith is cheaper to run; a module is split out only when it needs its own scale, team or release rhythm.

Which technology stack do you use?

Commonly Java with Spring Boot, .NET or Node.js with NestJS, PostgreSQL, SQL Server or Oracle, and React. We follow your company standard if you have one.

Can approval rules change without a developer?

Yes, for rules kept in decision tables: an administrator edits the table, the change is reviewed and versioned, and new requests use it.

How do you stop the audit log being edited?

The log is append-only, each entry is linked to the previous one by a hash, and the database account of the application cannot delete it.

Will it be fast at month-end?

Reports read from separate read models, and we load-test at a multiple of your busiest closing day before go-live.

Cloud or our own servers?

Either. The same containers run in a cloud region you choose or on-premise; data location follows the rules of each entity’s country.

What documentation do we receive?

Architecture decision records, the domain glossary, OpenAPI specifications, process models and runbooks, kept in your repository with the code.

Can one system serve entities in several countries?

Yes. Every record carries its legal entity, and times are stored in UTC and posted on each entity’s local date. Each entity keeps its own currency, language and fiscal calendar, and reports roll up by group.

Can it issue e-invoices in each country?

Yes, through e-invoice gateways: Vietnamese e-invoices, Korean e-tax invoices, EN 16931 and Peppol in the EU, and Peppol in Japan. Each invoice is tracked from draft to accepted, and rejected ones are re-issued.

Can one person create a vendor and also approve its payment?

No. Segregation-of-duties rules block that combination, as well as posting a journal and locking the period. Roles are narrowed by entity, department and amount, finance and admin roles use MFA, and managers review their team’s rights regularly, for example every quarter.

Tell us what you
need built.

A specialist replies within one business day — in English, Vietnamese, Japanese or Korean.

Book a consultationContact us
↑Back to top