All work

Personal

List of users

2023

A TypeScript app for browsing people: cards, a detail page, server state, and forms that validate.

View on GitHub

Context

I wanted the small product pieces around a list of people: loading, a page for one person, and a form with rules.

Role

I built the app in TypeScript.

Constraints

  • Each person is a card, and the detail is a separate page.
  • Server data should not live in the same place as form state.
  • Invalid input has to be caught before it is sent.

Decisions

  1. 01

    MUI for the screen

    The list and the form use MUI. The detail page uses Joy. The visual system is the library’s, so the time went into the data and the forms.

  2. 02

    React Query for the server

    Fetching and the add-user mutation sit in React Query. The screen reads the query instead of copying the response into local state.

  3. 03

    Forms with Zod

    React Hook Form plus Zod describes what a valid person looks like, and the form follows that schema.

Outcome

  • A typed user list with cards, a detail page, queries, and validated forms.
  • Jotai holds the drawer. That is the client state that is not the server.
  • The repo is public on GitHub.

Stack

TypeScript · React · MUI · Zod