Case Study

Building Fuel Prices VIC

Fuel Prices VIC is a portfolio MVP showing how a modern full-stack product can explore 24-hour delayed public fuel price data through a production-shaped GraphQL architecture.

Problem

Drivers need a fast way to compare reported fuel prices by suburb and fuel type without scanning disconnected station listings.

Product goal

Create a focused MVP that helps Victorian drivers compare recently published station prices, see area summaries and move between list, map and station detail views.

Why GraphQL

GraphQL gives the frontend a stable query shape for stations, prices and fuel types while the backend can move from seed data to a real ingestion pipeline.

Architecture

The app follows a clear data path: Fair Fuel Open Data API, server-side data adapter, PostgreSQL, GraphQL API and Next.js UI. Frontend components query GraphQL and do not import mock data directly.

Current tech stack

Next.js App Router, TypeScript, Tailwind CSS, GraphQL Yoga, Apollo Client, Prisma, PostgreSQL, Leaflet, Playwright and Vitest.

Data strategy

Real API ingestion is implemented with a server-side client, x-consumer-id based access, generated transaction IDs, Zod validation, Prisma upserts and mock cleanup after successful write syncs.

Current status

The Fair Fuel smoke test, dry run and full write sync work. GraphQL now serves API-backed station results sorted by selected fuel price ascending.

Testing strategy

Vitest covers utility, normalization, provider and sync logic, while Playwright checks the homepage, station detail pages, suburb pages and map/list experience against the built app.

Next steps

Add durable sync status tracking, refine data freshness UI, review API terms for production use and expand SEO coverage while keeping the 24-hour delayed data limitation clear.