← Back to all posts

engineering

RequestLab: A Local-First macOS API Workbench

A native SwiftUI API client built around readable workspace files, testable core logic, and practical release packaging.

27 Apr 20263 min read
  • #swift
  • #macos
  • #api-client
  • #tooling

Why build another API client?

I was using Postman, but more and more of the workflow I wanted started to feel gated behind paid features. That pushed me to build my own API client instead of adapting my workflow around someone else's pricing boundary.

RequestLab is a native macOS API workbench for REST and GraphQL exploration. The reason it exists is not novelty; it is control over the workflow.

The project is local-first. Workspaces are readable files, secrets stay out of shared YAML, and the core request/persistence behavior is testable without launching the UI. That combination is more important to me than chasing every feature a mature commercial client already has.

RequestLab app icon

RequestLab local-first API workbench diagram

The architecture boundary

The codebase is split into two major targets:

  • Sources/RequestLab is the SwiftUI app shell.
  • Sources/RequestLabCore is the reusable runtime boundary.

That second target is where the durable behavior lives: workspace models, YAML persistence, validation, request execution, variable resolution, Postman import, and Keychain-backed secret storage.

The UI can evolve, but the workbench contract needs to stay stable. Putting persistence and execution in RequestLabCore makes that contract easier to test and harder to accidentally bury inside view state.

Workspace files as the product contract

RequestLab workspaces are folder-based:

SampleWorkspace.workspace/
  workspace.yaml
  collections/
  environments/
  .order.yaml
  .client/
    history.yaml

Shared YAML stays readable and versionable. Secret environment values are redacted from those files and stored in macOS Keychain instead.

The persistence layer writes through a staging directory, preserves unrelated .client files, and rolls back if a commit fails. That is the kind of engineering detail users rarely notice when it works, but immediately feel when it does not.

What it supports today

RequestLab already covers the core loop:

  1. Author REST and GraphQL requests.
  2. Manage environments and variables.
  3. Send requests through a thin execution service.
  4. Inspect response status, headers, body, and timing.
  5. Import Postman JSON to bootstrap a workspace.
  6. Package the app into a zipped macOS .app artifact with checksum output.

The standard verification surface runs through rtk, including rtk swift test, rtk swift build, and rtk ./script/build_and_run.sh --verify.

What is still early

RequestLab is a work-in-progress project and I expect to keep updating it continuously as my own API testing workflow changes. The current gaps are mostly public-distribution and documentation hardening:

  • no standalone architecture note yet
  • no standalone workspace-format reference yet
  • no notarization runbook yet
  • one stale docs reference still needs cleanup around the now-present license file

Those are good gaps to have at this stage. They are productization gaps, not signs that the underlying application shape is missing.

The useful lesson

The project works because it treats local files as a serious interface. API clients can become opaque databases with buttons attached. RequestLab pushes in the other direction: inspectable workspace state, native UI, and a core library that can be tested directly.

Related posts

Continue with articles that overlap in category or shared tags.