Project

ESI Global

An operations platform for a migration consultancy, bringing case workflows, client communication, payments, and staff tools together.

Features

01Marketing site

  • The marketing site is 17 Astro pages that stay readable with JavaScript off, while the contact and QR enquiry forms post straight to the API

  • JSON-LD schema and copy written for answer engines, with per-page SEO and a no-JS check running in CI

  • An embedded chat widget and a renderer for policy documents

02Staff portal

  • A lead pipeline that captures enquiries, flags duplicates, enforces status transitions, imports CSVs in partial batches, and hands staff a distribution panel

  • A client CRM built around one record per client across five branches, covering phases, consent, notes, and timelines

  • The case workflow engine carries versioned stage templates with SLAs, payment-clearance gates that fail closed against the real invoice ledger, and compare-and-set task transitions

  • Work queues and role dashboards, materialised ahead of time for the document team and submission officers

  • A checklist and document vault with authority templates, rejection recordings, expiry sweeps, and ZIP export whose access gets audited

  • Service agreements run on versioned templates with signature capture and PDF export that embeds its fonts

  • Operational admin covers branches, teams with managed scoping, staff management, and versioned trade rules

03Client portal (/my)

  • Case progress shown as phase steps, with checklist items to upload

  • Documents, agreement viewing and signing, invoices, and payments

  • Per-case chat with media and voice notes, kept behind a consent gate that cannot be skipped

04Chat & calls

  • Case and client chat rooms keep staff whispers isolated, with reactions, read markers, and presence

  • Voice notes that know who has listened, plus message search and daily email digests

  • LiveKit audio huddles come with ringing and active-state exclusivity, attendance reconciliation, and call logs with summaries

  • Delivery runs over WebSockets on top of durable notifications, with Postgres LISTEN/NOTIFY bridging processes

05Finance

  • An invoicing engine runs per-case and global sequences, handles AUD as a single currency, and gets the GST maths right

  • Public Stripe Checkout links at /pay/:code that know how to expire and how to say no

  • Stripe Connect webhooks on both the platform and linked accounts, verified against the raw request body

  • Refunds anchored to cooling-off windows and held to an approval scope

  • Manual payments across several money accounts, with payment promises, dues call lists, and statements

  • A commission engine for partners, versioned terms, enrolment instalments, and settlements that lock while they run

  • Admission accounts keep tuition separate from agency income, with institution payments on an audit trail

  • Partner invoices go to institutions with multi-attempt delivery and PDF rendering

06Backend & infra

  • The Fastify API runs on a shared TypeBox contract that serves as both runtime validation and the portal permission matrix

  • One login covers staff and clients: signed session cookies, a scrypt password policy with lockout, and invalidation by session epoch whenever a password resets

  • Every sensitive action lands in an append-only audit ledger, redacted where it should be and cursor-paged so it stays quick to read

  • BullMQ sweeps run on bare PostgreSQL with no Redis involved: follow-ups, expiry, refunds, and checkout expiry

  • A single Cloudflare Worker serves the static site, the portal, and the reverse-proxied API from one origin

  • Documents live in S3, guarded at boot so a staging deploy pointed at the production bucket refuses to start

07Engineering

  • A Vitest suite of 379 API test files, from journey-level specs to migration-immutability and webhook-signing checks

  • CI carries a coverage ratchet, the no-JS site gate, and Playwright journeys through the portal

  • Staging deploys happen automatically; getting into production requires four green checks first

Technologies

Astro 5React 19Vite 6Tailwind CSS 4Fastify 5TypeBoxPrisma 6PostgreSQL 16BullMQStripe + ConnectLiveKitWebSocketCloudflare WorkersS3/R2pdf-libVitestPlaywright