Hi!
Skip to main content
Back

SFI Super App

Enterprise Platform · 2025

Context

Enterprise Super App for Supply Chain & Finance Management. As IT Architect and Architecture Lead, designed and led multi-team development of this flagship system handling complete import/trade operations from China to Indonesia.

SFI Super App - 1
SFI Super App - 2

Problem

Import and trade operations were fragmented across manual processes and disconnected systems. Coordination between China suppliers, local operations, finance, and customers was inefficient and error-prone.

Constraints

  • Multi-Role Access — 6 distinct user roles with different permissions
  • Complex Workflows — 13 workflow types with sub-workflow support
  • Multi-Currency — CNY, IDR, USD with real-time rate conversion
  • External Integrations — DHL API, LDAP, SWIFT MT940 Banking
  • Audit Requirements — Full transaction logging for compliance

System Architecture

Designed as a 6-layer architecture with clear separation of concerns, supporting 68 controllers, 94 models, and 370+ routes.

SFI SYSTEM ARCHITECTURE68 Controllers94 Models24 Services189 Migrations370+ RoutesLAYER 1: USER ROLESSuperadminFinanceChina TeamAccount ExecOwnerSystemLAYER 2: PRESENTATION & GATEWAYWeb ApplicationBootstrap 5 + VuexyAPI GatewayREST + Token AuthDataTables44 ClassesMiddlewareAuth + WhitelistLAYER 3: EXPERT PROCESSES (BUSINESS LOGIC)Purchase Order52 Methods • 5,769 LOCCRITICALWorkflow Engine13 Types • Sub-WorkflowCRITICALApproval System60+ MethodsCRITICALLAYER 4: CORE SERVICESWorkflowServiceState MachineEncryptionServiceAES-256 • RSA-2048MT7XXServiceSWIFT MessagesTokenService24h TTLLAYER 5: DATA LAYER (94 Models)mst_*16 Master Tablestrx_*24+ Transactionref_*16 Referencerel_*3 Relationlog_*5 AuditLAYER 6: EXTERNAL INTEGRATIONSDHL APILDAPMT940 BankingPostgreSQL

Key Architectural Decisions

1. State Machine for PO Lifecycle

The Purchase Order module uses a 12-state state machine managing the complete lifecycle from draft to completion. Every state transition is validated, logged, and reversible—preventing data inconsistencies and providing clear audit trails.

PURCHASE ORDER LIFECYCLE12-State State Machine • 52 Methods • 5,769 LOCDraftPO-001Items AddedPO-002Containers ReadyPO-003Pending ApprovalPO-004ApprovedPO-005Supplier AssignedPO-006Payment CompletePO-008In TransitPO-009ArrivedPO-010ClearedPO-011CompletedPO-012SUB-WORKFLOWS TRIGGEREDDeposit FlowSend Money CNPayment SupplierPIB/SPTNPBalance Payment

2. Workflow Orchestration Engine

Custom-built workflow engine orchestrating 13 workflow types with parent-child relationships. Sub-workflows trigger automatically and parent workflows wait for all children to complete. All state changes wrapped in DB::transaction.

3. Multi-Currency Financial Processing

Central AccountStatementFinanceService handles all financial flows—outbound payments to China (CNY), local payments in Indonesia (IDR), and inbound customer payments. Automatic exchange rate calculation with full audit trail.

4. Security by Design

AES-256-CBC and RSA-2048 encryption for sensitive data. OAuth2 for external API integration. IP whitelisting and 24-hour token TTL for access control.

Tech Stack

Laravel 11 (Backend), Bootstrap 5 + Vuexy (Frontend), PostgreSQL/MySQL, Redis, DHL Financial API, LDAP, SWIFT MT940, Linux, Nginx.

Outcome

  • Unified fragmented import/trade operations into single platform
  • Reduced manual coordination between China, operations, and finance
  • Full audit trail for regulatory compliance
  • Architecture used as baseline for future enterprise modules

What I'd Improve Next

Would add event-driven communication between modules. Consider CQRS for complex reporting requirements.