Skip to content

feat(api-client): REST API client with Postman/Insomnia/Swagger import - #190

Merged
slaveofcode merged 12 commits into
developfrom
feat/api-client
Aug 9, 2026
Merged

feat(api-client): REST API client with Postman/Insomnia/Swagger import#190
slaveofcode merged 12 commits into
developfrom
feat/api-client

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Summary

  • API Client tool (/tools/api-client) — browser-based REST debugger, no vendor lock-in, no account required
  • Imports Postman v2.1, Insomnia v4, OpenAPI 2/3 (JSON+YAML), and HAR files with auto-detection
  • Exports back to Postman v2.1 + full workspace backup JSON
  • Environment variables with {{var}} syntax; cross-request token chaining via VarSource (JSONPath from another request's saved response)
  • Per-request response history ring (max 5, newest first); global history ring (max 50)
  • Auto-save to localStorage — exact whiteboard countdown pattern (30s, amber chip, flush on visibility/pagehide/unload)
  • Desktop: native HTTP via Tauri http_request command (reqwest, no CORS); Web: fetch() fallback with amber CORS warning banner
  • Two-column layout with drag-resizable request/response split
  • Bilingual SEO content (EN + ID)

New files

File Purpose
src/tools/dev/api-client.types.ts Shared TypeScript types
src/tools/dev/api-client-store.lib.ts localStorage CRUD + ring buffers
src/tools/dev/api-client-import.lib.ts 5-format import parsers
src/tools/dev/api-client-export.lib.ts 4-format exporters
src/tools/dev/api-client-env.lib.ts {{var}} substitution, JSONPath, capture
src/tools/dev/api-client-request.lib.ts executeRequest() with Tauri/fetch dispatch
src/islands/dev/ApiClient.tsx Main island UI
src-tauri/src/commands.rs http_request Rust command (reqwest)

Test plan

  • npx vitest run — 915 tests, 0 failures
  • npm run lint — 0 errors
  • npm run build — completes, /tools/api-client/index.html present
  • Import a Postman collection → requests appear in sidebar
  • Import an OpenAPI YAML → requests generated from paths
  • Send a GET request (web, CORS-friendly API like httpbin.org) → response shown
  • Add env variable, reference with {{var}} in URL → substituted on send
  • Edit request, wait 30s → amber chip counts down → auto-saves
  • Click amber chip → saves immediately, chip → "✓ Saved"
  • Reload page → workspace restored
  • Export collection → valid Postman JSON downloaded
  • Desktop app: send to any API → no CORS banner, full response

🤖 Generated with Claude Code

slaveofcode and others added 12 commits August 8, 2026 17:24
Promote to production: CartoDB raster tiles for Map Explorer
Promote to production: Static Map CartoDB fix
Promote to production: SEO content for clipboard-inspector and hotkey-test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g buffers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ace)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…olution, capture

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… (fetch + Tauri dispatch)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
goodwebtools d77a359 Aug 09 2026, 08:18 AM

@slaveofcode
slaveofcode merged commit b7c7347 into develop Aug 9, 2026
8 checks passed
@slaveofcode
slaveofcode deleted the feat/api-client branch August 9, 2026 08:24
slaveofcode added a commit that referenced this pull request Aug 9, 2026
feat(api-client): REST API client with Postman/Insomnia/Swagger import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant