DEXPO Exports
OutSystems Architecture
This document describes the three-layer OutSystems architecture for the DEXPO Exports system — covering existing applications, the new Logistic feature modules, their responsibilities, and all data entities with relationships.
Three-Layer Architecture
OutSystems mandates a strict top-down dependency rule: UI references Core, Core references Foundation. No upward references are allowed. This prevents circular dependencies, makes each layer independently deployable, and allows foundational services to be reused across multiple applications.
UI Layer — Top
Screens & User Experience
Consumes Core services and Foundation layouts. No business logic lives here.
DEXPO
Core Layer — Middle
Business Logic & Data
Owns all entities, business rules, and server actions. References Foundation only.
DEXPO_CS
DEXPO_Logistic_CS
New
DEXPO_CS
DEXPO_Logistic_CS New
Foundation Layer — Bottom
Shared Services & Integration
Provides reusable themes, auth, roles, and integration services. Has no upward dependencies.
DEXO
Dexpo_Lib
Dexpo_Logistic_IS
New
DEXO (Theme)
Dexpo_Lib
Dexpo_Logistic_IS New
Third-Party Logistic Provider APIs
The Dexpo_Logistic_IS integration service module (Foundation) is the single point of contact for all outbound API calls to registered logistic providers. Only this module contains the HTTP consumer logic — no other module communicates with external APIs directly. All API credentials (Partner ID, API Key, API Secret) are passed in at runtime from DEXPO_Logistic_CS actions.
Module Details
Foundation Layer
Module: DEXO
- Theme & branding tokens
- Login & session flow
- Shared UI layouts & patterns
Module: Dexpo_Lib
- Role definitions (Admin, Manager, User, Logistic)
- Role-based access logic
- User management server actions
Module: Dexpo_Logistic_IS
- HTTP consumer for provider APIs
- Input & response structures
- Error handling & retry logic
- No business logic — pure integration
Core Layer
Module: DEXPO_CS
- All core entities: Customer, Vendor, Item, Category, SO, PO, line items
- Core business rules and server actions
- Exposes services consumed by UI layer
Module: DEXPO_Logistic_CS
- Logistic_Provider, Logistic_Status_Mapping entities
- ExportMovement, ExportMovementLog entities
- Static Entity: DeliveryStatus (7 records)
- Static Entity: DexpoLogisticPartners (2 records: ZedEx Logistics, Universal Logistics)
- Wrapper actions to call Dexpo_Logistic_IS
- Logistic business logic (assign, track, poll)
UI Layer
Module: DEXPO
- All screens: Dashboard, Customers, Vendors, Items, PO, SO, Reports, Logistic Dashboard, Manage Providers
- Screen-level UI logic and navigation
- Calls Core server actions only — no direct DB access
Entity Relationship Diagram
Relationship Summary
One user creates many export orders (1:N)
One vendor receives many purchase orders (1:M)
One category contains many items (1:N)
Core export transaction chain
Core import transaction chain
One SO generates one movement record (1:1) — Phase 2
One movement has many log rows — one per status change (1:N)
One provider has many status mapping rows (1:N)
Single source of truth — referenced by all logistic entities
The Logistic User assigned to handle this shipment
One-to-one — each Dexpo Partner can have at most one Provider entry (unique FK)
Entity Attribute Reference
Architecture Principles
No Upward References
Dependencies flow strictly downward — UI → Core → Foundation. No layer may reference the layer above it.
Reusability
Foundation modules (Theme, Lib, Logistic_IS) are reusable by any current or future Core module without duplication.
Single Responsibility
Each module has one job: IS modules own integrations, CS modules own data & logic, UI modules own screens only.