Skip to content

adityai0/ZapAPI

Repository files navigation

ZapAPI

A lightweight browser-based REST API client for testing and debugging HTTP endpoints. Built with Next.js, TypeScript, Tailwind CSS, and shadcn/ui.

Features

  • HTTP method selector (GET, POST, PUT, PATCH, DELETE)
  • URL input with Enter-to-send support
  • Key-value headers editor
  • JSON request body editor with inline validation
  • Response viewer with status code, response time, and pretty-printed body
  • Request history persisted to localStorage

Tech Stack

  • Framework — Next.js 16 (App Router)
  • Language — TypeScript
  • Styling — Tailwind CSS v4
  • Components — shadcn/ui (Base UI primitives)
  • Runtime — Bun

Getting Started

bun install
bun run dev

Open http://localhost:3000.

Scripts

Command Description
bun run dev Start the development server
bun run build Build for production
bun run start Start the production server
bun run lint Run ESLint
bun run format Format all files with Prettier
bun run format:check Check formatting without writing

Project Structure

app/
  page.tsx          # Root page (thin shell)
  layout.tsx        # Root layout with fonts and Toaster
components/
  ZapClient.tsx     # Main application component
  MethodSelector.tsx
  HeadersEditor.tsx
  RequestBody.tsx
  ResponseViewer.tsx
  HistoryPanel.tsx
  ui/               # shadcn/ui components (do not edit)
lib/
  apiRequest.ts     # fetch wrapper with timing
  storage.ts        # localStorage history helpers
  utils.ts          # cn utility
types/
  request.ts        # Shared TypeScript types
utils/
  formatJson.ts     # JSON formatting and validation

About

A lightweight browser-based REST API client for testing and debugging HTTP endpoints. Built with Next.js, TypeScript, Tailwind CSS, and shadcn/ui.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors