‹ Projects

Laravel · 2024

TrustLedger

Full-stack modernisation of a trust fund management system handling thousands of client records across multiple Southeast Asian countries — with a focus on data migration accuracy, business logic conversion, and database performance.

Overview

Full-stack modernisation of a trust fund management system handling thousands of client records across multiple Southeast Asian countries — with a focus on data migration accuracy, business logic conversion, and database performance.

Stack

Laravel · MySQL · Vue.js · Power BI

What I Built

Background

A trust fund company operating across multiple Southeast Asian countries had been running a legacy system that accumulated years of complex business rules, inconsistent data structures, and performance bottlenecks. With thousands of active client records spanning multiple currencies, regulatory frameworks, and country-specific workflows, a full digital transformation was initiated — introducing new features, new tables, and new columns that didn't exist in the original system.

I joined as a full-stack developer on Phase 2, handling both frontend and backend tasks. But the core of my work was data: mapping, migrating, and optimising thousands of client records from the old system into the new schema with full accuracy and zero loss.

The Data Mapping Problem

The new system introduced a significantly expanded schema — new features came with new tables and new columns that had no direct equivalent in the legacy data. My job was to bridge that gap: study the old data structure, understand what each field actually represented in business terms, and determine exactly where it belonged in the new schema.

This wasn't a simple column-to-column lift. Some legacy fields needed to be split across multiple new columns. Some new columns had no legacy source and required derived values calculated from existing records. Others needed default values that were context-sensitive — different depending on the client's country, product type, or account status.

Every mapping decision was documented and validated against the business rules before any migration script ran.

Migrating As-Is — Preserving the Record of Truth

The guiding principle was migrate as-is: every existing record had to arrive in the new system exactly as it existed in the old one — no silent rounding, no implicit type coercion, no dropped precision. For a trust fund system managing client assets, the data is the record of truth. Any corruption, even minor, carries legal and compliance risk.

Wrote migration scripts that preserved original values exactly, handling edge cases like currency precision across different country locales, date format inconsistencies, and nullable fields that encoded implicit meaning in the legacy appBuilt validation layers that ran before each batch committed — checking referential integrity, value ranges, and field-level constraints against the new schemaImplemented reconciliation checks comparing source and destination row counts, field-level checksums, and derived financial totals at each stage to confirm nothing was lost or alteredQuarantined records that failed validation for manual review rather than skipping or defaulting them silently

Handling New Tables and Columns

Where new features introduced schema structures with no legacy equivalent:

Analysed the business intent behind each new table and column to determine the correct population strategyFor columns requiring back-filled historical data, wrote transformation queries that derived values from related legacy records — ensuring new feature data was consistent with the historical recordCoordinated with the backend team on which new columns were nullable vs. required at migration time vs. post-launch, to sequence the migration in the right order without blocking feature rollout

Database Performance

With thousands of records being queried across multi-country joins and aggregate reporting:

Audited slow queries using MySQL slow query logs and rewrote the heaviest ones — focusing on large transaction table joins and cross-country reporting aggregationsAdded composite indexes on high-frequency access patterns (client ID + country + transaction date), bringing query times from seconds to millisecondsIdentified and fixed N+1 query patterns generated by the ORM in high-traffic endpoints

Backend & Frontend

Developed and optimised Laravel APIs to handle multi-country business workflows — different fee structures, regulatory limits, and approval chains per jurisdiction. On the frontend, built and enhanced Vue.js components to support the new workflows: client onboarding forms, transaction approval interfaces, and country-scoped admin views.

Analytics — Power BI

Integrated Power BI for regional reporting and analytics, replacing manual spreadsheet exports with real-time dashboards covering portfolio performance, transaction volumes by country, and compliance summaries.

Deployment

Deployed on on-premise servers with security hardening and performance tuning — a requirement driven by data sovereignty obligations across the jurisdictions the organisation operates in.

Outcome

Migration completed with full reconciliation verified at every phase — no data loss, no silent corruption. The expanded schema successfully absorbed all legacy records while correctly populating new columns introduced for new features. Stakeholders gained real-time regional visibility through Power BI that previously required days of manual effort to compile.