Skip to content
Mikel McCormick

a Project

The Dad-a-base

A dad-joke site on the icanhazdadjoke API, styled as a newspaper's Sunday funnies, with search, Favorites and a press-and-hold Groan button.

The Dad-a-base front page: a newspaper masthead, "Local dad says the thing again" as the day's top story, and a joke in a comic frame with Another, Fave and Groan buttons.The Dad-a-base front page: a newspaper masthead, "Local dad says the thing again" as the day's top story, and a joke in a comic frame with Another, Fave and Groan buttons.

the problem

The problem, and my role

A small, familiar problem: a site on the icanhazdadjoke API with search, a random joke and a page for each joke. I wanted a piece that showed depth in Vue and Apollo, and that treated each of those basics as a goal rather than a checklist.

Product, design and engineering, built with Claude Code. I made the product and design calls and reviewed every change; Claude Code built each milestone to the spec and recorded its own defaults. Nine milestones and five follow-ups, each with an issue, a pull request and a journal entry, and a VoiceOver pass I ran myself on a Mac and an iPhone.

built with

Stack

  • Vue 3
  • TypeScript
  • Apollo Client
  • Pinia
  • Zod

look at

Highlights

  1. Apollo over a REST API

    icanhazdadjoke's own GraphQL endpoint has no search list or pagination, so every request is a GraphQL document with an @rest directive that apollo-link-rest turns into a REST call. Zod checks every response and is the single source of the API's types, and each Joke is cached once, so opening a search result needs no request.

    Search the archives, for "cat", showing jokes 1 to 10 of 11.Search the archives, for "cat", showing jokes 1 to 10 of 11.
  2. An Error state for every way it can fail

    The API reports a missing joke as HTTP 200 with a 404 in the body, so every response is parsed in one place and mapped to one of six codes. Each has its own page in the paper's voice, shown in place, so the address and "Try again" still work.

    The error page for too many requests: "Easy, tiger. Even Dad needs a breather.", with Try again, Front page and A random joke.The error page for too many requests: "Easy, tiger. Even Dad needs a breather.", with Try again, Front page and A random joke.
  3. A Case Study with the app inside it

    The Case Study is a page on the same site, written in MDX, with the app's own components live beside the decisions they show, in fixed states, rather than screenshots. That needs every component to render from its props alone, which is itself a test of the architecture.

    The Case Study's live figure of a button in both themes at once, above its section on the testing approach, with the chapters listed beside it.The Case Study's live figure of a button in both themes at once, above its section on the testing approach, with the chapters listed beside it.

next

What's next

  • A link preview for each joke. That needs a server to render each one's Open Graph image, which the static site doesn't have.
  • Favorites and Groans that follow you between devices. That needs accounts, and a new decision record replacing the one that keeps them in the browser.

go see