Online Admission System (OMAS)
From June 2026 (project-based, now ended)
Rebuilt the public applicant flow of MAAP's legacy PHP admission system as a standalone React 18 + TypeScript SPA over a layered PHP JSON API. 5,000+ live registrations and counting.
- Client
- Maritime Academy of Asia and the Pacific (MAAP) — ISSD
- Role
- Software Engineer (sole developer on the rebuild)
- Platform
- Web (public applicant pages + PHP API)
- Period
- From June 2026 (project-based, now ended)
- Stack
- PHP 8
- MySQL
- React 18
- TypeScript
- React Hook Form + Zod v4
- PHPMailer
- Apache
- Source
- Private — details limited by client agreement
5,000+
live applicant registrations
101
validated form fields
7
step application wizard
In short
I rebuilt the public applicant flow for the Maritime Academy of Asia and the Pacific’s admission system as a standalone React 18 and TypeScript single-page application that talks to a layered PHP JSON API. I was the sole software engineer, keeping the existing MySQL schema and Apache/PHP host intact while replacing the two server-rendered pages with client-side validation and progress saving. The new flow now handles over 5,000 live registrations.
Written by AI from this case study.

Context & constraints
MAAP runs its admissions on a legacy PHP system. The two pages every applicant touches — registration and the application form — were the oldest part of it: server-rendered, string-concatenated SQL, no client-side validation, and no way to save progress. Applicants on slow connections lost work; staff spent time fixing records that should never have been accepted.
The constraints were fixed from day one: the existing MySQL schema and the rest of the legacy system stayed in place, the new pages had to ship into the same Apache/PHP host, and there was one engineer. The brief was to rebuild the public flow without a rewrite of everything behind it.
Architecture
The two public pages became a standalone React 18 + TypeScript single-page app that talks to a new JSON API written in PHP 8. The API is layered: thin endpoint controllers, Service classes for the rules, Repository classes for the queries, all PSR-4 autoloaded. Every query runs through PDO prepared statements.
The form is a seven-step wizard built on React Hook Form with a Zod v4 schema per step. Each step gates the next, so an applicant can't reach step five with an invalid step two. Drafts autosave as the applicant types — text to localStorage, file uploads to IndexedDB — and restore when they come back.
Key decisions
- Layered PHP API instead of a framework: the host already ran PHP and Apache, and the rest of the system is PHP. A framework would have added a second deployment story for one feature. PSR-4 + PDO gave the structure without the weight.
- Schema-gated wizard over one long form: 101 fields on one page is where applicants abandon. Per-step Zod schemas mean the server only ever sees a payload that already passed the same rules the UI enforces.
- Email as best-effort after commit: the branded HTML confirmation goes out via PHPMailer over SMTP only after the registration transaction commits. An SMTP outage can delay an email; it can never roll back a saved registration.
- Hardened the API end to end: prepared statements everywhere, strict input validation on the server regardless of what the client sent, and an exam-center seat allocation that holds a row lock so two applicants can't take the last slot at once.
- Autosave split by storage type: localStorage for text is simple and synchronous; file uploads go to IndexedDB so a multi-megabyte scan doesn't blow the localStorage quota.
What broke
Exam-center overbooking. Each center has a capacity; the legacy code read the count, compared it, then inserted. Under real load two applicants could both pass the check and both get the last seat. It never showed up in testing because tests ran one request at a time. The fix was to do the check-and-insert inside a transaction with the center row locked for update, and to add a test that fires the two requests concurrently and asserts exactly one succeeds.
Quality
101 validated fields with matching client and server rules. A server runbook covering Apache, PHP, MySQL, SMTP and filesystem permissions so the system can be redeployed or recovered by someone other than me. Structured, best-effort email delivery that is observable when it fails.
What I'd do differently
I would have written the concurrency test for seat allocation before touching the code, not after finding the race. The bug was obvious once I thought about two requests at once; the habit of asking "what if this runs twice at the same time?" for every write is the thing I actually took away from this project.
Evidence
Source is not published — it is an employer's live production service. The applicant flow itself is public during admission periods; the screenshot below is step 2 of the wizard filled with my own details, no applicant data. Happy to walk through the architecture and the concurrency fix in an interview.
The API layering — router, controller, service, repository, PDO — is extracted with the business logic removed into a public starter with PHPUnit and CI.
Source private — details limited by client agreement.
Write-ups from this project
- Two applicants, one seat: fixing an overbooking race with a row lock
The legacy code read the count, compared it, then inserted. Under real load two requests both passed the check. One transaction and SELECT … FOR UPDATE.