Skip to content
All case studies

02 · Public transit · PurpleTalk

Public transit smart-card customer portal

Customer portal for a public-transit smart-card system, on Next.js 16, GraphQL and a headless CMS.

Context

A customer portal for a public-transit smart-card system. Customers activate cards, manage journeys, pay and review transaction history. Data comes from third-party transit APIs. Non-technical teams manage multilingual content themselves.

My role

I architected the frontend: the App Router structure, the GraphQL data layer, the design system, and the test and CI/CD pipeline.

Architecture

Architecture, left to right. Client: Customer → Frontend: Next.js 16 · App Router → Data: GraphQL layer, Payload CMS 3 → Sources: Third-party transit APIs, PostgreSQL.

Frontend request path. The two rows in the last two columns are separate flows: transit data on top, managed content below. Dashed boxes are outside my scope.

Key decisions

  1. 01

    ISR with Server Components

    I used Server Components with ISR because most portal pages are content that changes rarely, so cached static output gives fast loads and keeps repeated calls off the transit APIs. Per-user data such as card balances and transactions is fetched dynamically, because it has to be current. The trade-off is that cached content can be briefly stale until it revalidates, which I accepted for the speed.

  2. 02

    GraphQL codegen over third-party APIs

    Types are generated from the GraphQL schema over the third-party transit APIs, so codegen catches breaking schema changes at build time.

  3. 03

    Payload CMS with live preview

    FAQs, localisation, SEO, themes and feature flags live in CMS collections. Non-technical teams manage multilingual content across environments without a deploy.

Results

  • Shipped card activation, journeys, payments and transaction history in one portal.
  • Non-technical teams manage multilingual content themselves, with live preview.
  • AI-assisted development with Copilot, under strict review of generated code, let a lean team meet accelerated timelines.

Stack

  • Next.js 16
  • React 19
  • React Server Components
  • GraphQL (Apollo Client + codegen)
  • Payload CMS 3
  • PostgreSQL
  • Radix UI
  • Shadcn/UI
  • Tailwind
  • next-intl
  • Sentry
  • Cypress
  • Storybook
  • Chromatic
  • Docker
  • Bitbucket Pipelines
  • AWS
  • Nx