Skip to contentSkip to contact
Dennis KhorRossi Italian
Recruiter mode

Client workWeb27 Jun 2026 to 19 Sep 2026

A three-branch restaurant's single-file site, rebuilt as a trilingual Next.js app. Three languages, one rule held by a test: an uncertified branch never shows a halal claim.

The greeting in three languages: Welcome. 欢迎光临. Selamat datang.

3 locales, 121 message keys each, no English fallback

  1. Branch one

    • Live menu on the restaurant's POS
    • Photos from its own ImageKit folder
    • Booking opens WhatsApp, prefilled
    Test the rule here, Branch one
  2. Branch two

    • Live menu on the restaurant's POS
    • Photos from its own ImageKit folder
    • Booking opens WhatsApp, prefilled
    Test the rule here, Branch two
  3. Branch three

    • Live menu on the restaurant's POS
    • Photos from its own ImageKit folder
    • Booking opens WhatsApp, prefilled
    Test the rule here, Branch three

The halal rule

Try to breakthe rule

Halal claims are regulated in Malaysia, so a branch without certification must never show halal wording, in any language, anywhere. The UI asks mayDisplayHalal(id), and halal-rule.test.ts scans every locale clause by clause.

Certify a branch and its label appears in all three languages. Force the label onto an uncertified branch and watch the test.

Branch one

mayDisplayHalal(1) → false

  • enNo halal wordingNone
  • zh-HansNo halal wordingNone
  • msNo halal wordingNone

Not certified, so no label

Branch two

mayDisplayHalal(2) → false

  • enNo halal wordingNone
  • zh-HansNo halal wordingNone
  • msNo halal wordingNone

Not certified, so no label

Branch three

mayDisplayHalal(3) → false

  • enNo halal wordingNone
  • zh-HansNo halal wordingNone
  • msNo halal wordingNone

Not certified, so no label

  • Rejected"Certification in progress" labels, because they still imply a claim.
  • Held upWhen a branch was certified in September 2026, the rule needed no change. It reads data, not branch names.
  • Where it livesRead how the rule is enforced

Page weight

Measured onthe phone

My first performance pass ran on localhost with no throttling and reported wins a phone never saw. So I profiled the deployed site on a throttled mobile profile, and fixed what it showed.

Above-the-fold transferDown from 941 KB. Bytes through Netlify's image optimiser fell from 856 KB to 459 KB.

Sections visible at 500 ms

The reveal held content at opacity 0 until JavaScript ran. Driving it from CSS view() timelines fixed it, and 38 of 38 are visible with JavaScript off.

The largest image

The navigation logo: 46 KB requested at w=1920 for a wordmark about 120 px wide.

Blur-up placeholders

21KB

Of render-blocking HTML, so they went.

Client work27 Jun 2026 to 19 Sep 2026

Rossi Italian

A three-branch restaurant's single-file site rebuilt as a trilingual Next.js app, with an owner-managed gallery and a test that stops an uncertified branch from ever showing a halal claim.

Built with an AI pair programmer, then reviewed and tested by me. The tests and decision records below are how I hold that work to account.

Kind
Client work
Platforms
Web
Period
27 Jun 2026 to 19 Sep 2026
Stack
  • Next.js 16
  • React 19
  • TypeScript 6
  • next-intl
  • Tailwind CSS 4
  • ImageKit
  • Vitest
  • Playwright
  • Languages3
  • Tests101across 17 files
  • Above-the-fold transfer799KBfrom 941 KB

The problem

Rossi Italian has three branches in Malaysia: Penang, Kuala Lumpur and Ipoh. The first version of its site was a dependency-free HTML, CSS and JavaScript port of a design canvas, shipped with placeholder tiles instead of photos because the design-import tool truncated the originals. It could not carry three languages.

The rebuild needed real photography; English, Simplified Chinese and Bahasa Malaysia; booking per branch with no reservation backend; a gallery the client can change without a developer; zero recurring hosting cost; and one hard guarantee. Halal claims are regulated in Malaysia, so a branch without certification must never show halal wording, in any language, anywhere.

Constraints

  • Netlify's credit-based free plan: 300 credits a month, 15 per production deploy, 20 per GB of bandwidth, and the site goes offline when they run out. This one constraint shaped the gallery, the images and the menu.
  • Every string ships in all three locales with no English fallback. The Chinese and Malay copy is machine-translated and waiting for the client's review.
  • No reservation backend, CMS, auth or online ordering in this phase, and no invented content: gaps are tracked, not filled in.
  • The visual language adapts the parent restaurant group's site, with Rossi's own photos, copy and line art.

What I built

A Next.js 16 App Router site in React 19 and TypeScript 6, statically generated, with the gallery revalidated hourly. next-intl handles locale-prefixed routes and hreflang, and each of the 3 locales has 121 message keys. Booking is a Radix dialog that picks a branch and opens WhatsApp with a prefilled message: no backend, no stored customer data, and the channel diners already use. Motion uses native CSS scroll-driven animations gated on @supports and reduced motion, not scroll listeners or a new library. A Playwright loop screenshots pages for visual self-review, and every change is checked at 360, 390 and 768 px.

The application is 4,185 lines of non-test TypeScript. I built this with an AI pair programmer; every change went through tests and my review.

Decisions that mattered

Halal wording gated by data and enforced by a test

A documentation-only rule would regress the first time someone edited copy. A branch may show "Halal", "halal" or "清真" only when its halal field is certified. mayDisplayHalal(id) gates the UI, and halal-rule.test.ts scans every locale clause by clause and asserts that every certified branch actually says so. "Certification in progress" labels were rejected because they still imply a claim. When a branch was certified in September 2026, the rule needed no change, because it reads data rather than naming branches.

Tests for documentation drift, and their limit

Eleven review passes found eight places where a governance doc stated something the code no longer did, and fixing them one sentence at a time never ended. docs.test.ts now fails the suite when the decision index and records disagree on status, when a doc cites a superseded record without saying so, when a doc states a halal status the data contradicts, or when a doc names an environment variable the code never reads. I mutation-tested it by restoring a stale line. It cannot catch a stale fact about code, and the menu proves it: the record saying menu categories link to the PDF is still marked accepted, although nothing links it.

The live menu is the POS, and only the POS

Each branch links to its menu on the restaurant's POS, which the kitchen already maintains, so prices stay current without a deploy. An 8.7 MB PDF stayed as a fallback because it works offline. On a metered plan it was the site's largest bandwidth exposure: roughly 1,700 opens would spend the month's credits, and compressing it failed because its weight is vector and font data. On 19 Sep 2026, after the client's review of the running site, the categories became plain copy and nothing links the PDF now. The POS link is an unmonitored third-party dependency on a primary call to action.

Hard problems

A broken stylesheet that every gate passed

A scripted edit of mine inserted an @media block by matching a focus-ring selector that appeared twice, so one copy landed between the two halves of a two-line selector. The dev server returned 500 on every locale, while tsc, ESLint, Vitest and next build all exited 0. I re-broke it on purpose to find out why: Turbopack drops an unparseable rule in a production build instead of failing. I had also been grepping build output for "error" rather than reading exit codes. Now css.test.ts parses the stylesheet with PostCSS and asserts that no selector has swallowed an at-rule and that braces balance, mutation-tested against the exact break.

A scroll-lock bug living between two files

The navigation's scroll-lock effect ran on mount with the menu closed, reset the body's overflow, and silently released the lock the intro cover had just taken. Each file was correct alone, and four per-file review passes missed it. I replaced both with one reference-counted useBodyScrollLock in a layout effect. The first integration test passed by accident. I found the discriminating case, closing the mobile menu while the cover is up, by reverting the fix and watching nine tests still pass.

Measuring the phone, not localhost

My first performance pass ran on localhost with no throttling and reported wins a phone never saw. Profiling the deployed site on a throttled mobile profile, the largest image was the navigation logo: 46 KB requested at w=1920 for a wordmark about 120 px wide, because its Image declared a width of 1250 and next/image builds the srcset from that. Blur-up placeholders cost 21 KB of render-blocking HTML, so they went. The section reveal held content at opacity 0 until JavaScript ran: under throttling, 0 of 23 sections were visible at 500 ms. Driving it from CSS view() timelines made 23 of 23 visible, and 38 of 38 with JavaScript off.

How it is tested

101 tests across 17 files pass, measured with npx vitest run on 27 Sep 2026. data.test.ts pins every WhatsApp link to the branch data, after the contact section and the booking modal read numbers from two files and disagreed for one branch. A message check enforces key parity across locales.

The suite once printed "54 passed" and exited 1. jsdom implements neither scrollTo nor scrollBy, so a click handler threw an uncaught error instead of failing an assertion. Five of seven component suites also had no cleanup, and their assertions had adapted to leftover DOM with getAllByRole(...)[0]. A shared setup file made those assertions singular and passing, which proved the duplicates were the bug.

Reviews ran in lanes: React, TypeScript, security and WCAG 2.2 AA. They caught about 12 invisible menu controls in the keyboard tab order, now removed with inert; three small-text contrast failures, fixed with new --terra-ink and --terra-deep tokens beside the brand terracotta rather than darkening it; and a Next version inside a security advisory's range, upgraded from 16.2.9 to 16.3.5.

Results

The site is live at rossi-italian.netlify.app, hosting costs nothing, and the client changes gallery photos without a deploy. Above-the-fold transfer dropped from 941 KB to 799 KB and bytes through Netlify's image optimiser from 856 KB to 459 KB. The project took 100 commits and 27 decision records.

What I would do next

  • Give each branch its own route for local SEO. Gallery tabs delivered per-branch views cheaply; real routes touch routing, i18n, the sitemap and structured data.
  • Fix the two stale menu records, and find a way to test factual claims about code.
  • Get the client's review of the Chinese and Malay copy, and confirm the production domain.

Milestones

What shipped, and when.

  1. Rebuild from one static file to a trilingual app

  2. A test stops uncertified branches showing a halal claim

  3. Native scroll-driven animation, no JavaScript

  4. Owner-managed photo gallery per branch

  5. Above-the-fold weight cut from 941 KB to 799 KB

  6. Live per-branch menus

Decisions

7 decision records shown here, 1 of them superseded and kept on the list. Open one to read its context and consequence.

  1. Accepted

    Host on Netlify's free tier

    Host on Netlify's free tier through its Next.js plugin.
    Context
    Vercel's free tier forbids commercial use, and the site had to cost nothing to host.
    Consequence
    Hosting costs nothing, but the plan is credit-based: deploys and bandwidth spend credits, and the site goes offline when they run out.

    Decision record ADR-010 from 27 June 2026. Status: accepted.

  2. Accepted

    Halal wording only for certified branches, enforced by a test

    Show halal wording only when a branch's halal field is certified, gated by mayDisplayHalal and checked across every locale by halal-rule.test.ts.
    Context
    Halal claims are regulated in Malaysia, and a branch without certification must never show halal wording in any locale.
    Consequence
    When a branch was certified in September 2026 the rule needed no change, because it reads data rather than naming branches.

    Decision record ADR-017 from 28 June 2026. Status: accepted.

  3. Accepted

    Native CSS scroll-driven animations

    Use CSS scroll() and view() timelines, gated by @supports and prefers-reduced-motion.
    Context
    Two small scroll effects did not justify JavaScript scroll listeners or a new animation library.
    Consequence
    There is no dependency and no main-thread scroll work. The section reveal later moved to the same mechanism so content no longer waits for JavaScript.

    Decision record ADR-018 from 29 June 2026. Status: accepted.

  4. Accepted

    Accessible colour tokens beside the brand palette

    Add dedicated tokens for small text and filled surfaces beside the brand colour instead of darkening it.
    Context
    A WCAG 2.2 AA pass found three small-text contrast failures against the brand terracotta.
    Consequence
    Every text pairing clears 4.5:1 and the brand colour the client recognises is unchanged.

    Decision record ADR-022 from 15 September 2026. Status: accepted.

  5. Accepted

    The per-branch POS menus are the only live menu

    Make the menu categories plain copy and link only each branch's live menu on the restaurant's POS, keeping the PDF file in the repo.
    Context
    Roughly 1,700 opens of the 8.7 MB PDF would spend a month's credits, and compressing it failed because its weight is vector and font data.
    Consequence
    The bandwidth risk is closed. The POS links are an unmonitored third-party dependency, and the older menu records still need updating to match.

Live status

Sampled 16 Nov 2026, 02:51 UTC. Failures are shown as they were read.

Ask about fit

Paste a job description. You get a verdict, the evidence that matches it with citations, and what the sources do not show.

Open to senior AI and software engineering roles: on site or hybrid in Sydney, or remote for Australian and US teams.

Email meBook 15 minCV