Skip to content
SATANG.B
All workCase study
Eastern Economic Corridor (EEC) Office · via Chanwanich

EEC ID

A digital identity and work-permit platform for foreign workers in Thailand’s Eastern Economic Corridor — where a phone reads the passport chip and matches the face holding it.

Role
Full-stack · wrote nearly all of the Flutter app and mobile service
Stack
Flutter · .NET 8 · Next.js · ZITADEL
PASSPORTP<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Verify identityNFC · ICAO 9303MRZ · OCRFACE MATCH ✓
Problem
Workers had to prove identity in person, and other government systems couldn’t trust a photo of a passport.
What I did
Built the Flutter app and its service: chip reading, OCR, face match, and sign-in for partner apps.

Results

Jun 2025 → May 2026 (continued into the Senior role) · wrote 486 of the mobile app’s 502 commits
  • Foreign workers can prove their identity from a phone instead of queuing at an office — signed off in client testing (SIT and UAT), ahead of launch
  • One-tap sign-in from partner apps works on iPhone, after 7 approaches were compared
  • 28 screens across 11 modules delivered to UAT, from identity checks to app-to-app sign-in

How it fits together

Redrawn diagram
Flutter app
NFC · OCR · face
Officer portal
Next.js
Partner apps
OIDC + PKCE
Identity provider
ZITADEL + custom auth web
Mobile service
Face match
Passport OCR
DGA gateway
Payment
Notification
System stack: Kafka · SignalR · PostgreSQL

How it works

  1. 01

    Reading the ePassport chip over NFC

    The MRZ, scanned with on-device OCR (ML Kit), gives the access key; the app then reads the chip with dmrtd and checks the data instead of trusting an image.

  2. 02

    Matching the face to the chip

    On-device face detection, then a dedicated face-match service compares the live capture with the chip photo.

  3. 03

    Becoming an identity provider

    A custom OIDC provider on ZITADEL, with app-to-app sign-in (PKCE) so partner apps can log users in with their EEC ID.

  4. 04

    Cards generated, not drawn

    eID and work-permit cards are rendered from SVG templates on the server — identical in the app, the portal and print.

What went wrong — and how I fixed it

Real problems from the commit history, not a highlight reel.

  1. 01
    Problem

    On Android, other NFC apps grabbed the passport chip the moment a read finished.

    How I fixed it

    Keep holding NFC for ~2 s after success and tell the user to move the phone away.

  2. 02
    Problem

    Camera and NFC fought each other, sessions overlapped, and the app broke after the background.

    How I fixed it

    A single camera-session manager, a finish-once guard, lifecycle-aware cleanup, plus countdowns and attempt counters.

  3. 03
    Problem

    Images for MRZ and face match had wrong colours, wrong orientation, unknown formats and were too large.

    How I fixed it

    Full still photos instead of preview frames, rotation, chip image-format detection and compression before upload.

  4. 04
    Problem

    Backend verification was slow because steps ran one after another.

    How I fixed it

    Ran uploads and face-match calls in parallel, added per-step timing, and split a slow query in the officer portal.

  5. 05
    Problem

    Silent app-to-app login failed on iOS because cookies are per browser context — 7 approaches tried.

    How I fixed it

    The logged-in app’s backend issues the authorization code and hands a standard PKCE redirect to the calling app.

Decisions & trade-offs

  • Verify the chip, not the picture

    More steps for the user (scan the MRZ, then tap the passport) — but the data is signed by the issuing country.

  • Build on ZITADEL instead of writing auth

    Standard OIDC for partners; custom screens and claims only where the government flow differs.

What I owned
  • The Flutter app, end to end (Riverpod, Freezed, Dio)
  • The .NET mobile service
  • Features in the officer web portal
Stack
  • Flutter
  • .NET 8
  • Next.js
  • ZITADEL
  • SignalR
  • PostgreSQL
  • FastAPI

Client system with private data — the visuals on this page are redrawn diagrams, not screenshots.