Skip to content
This repository was archived by the owner on Sep 11, 2026. It is now read-only.

Repository files navigation

🐝 PostBee

A powerful, open-source API testing and development tool built with Electron.

PostBee is a full-featured alternative to Postman β€” a desktop-native API client with offline-first architecture, real-time protocol support, visual workflow builder, and optional cloud sync. Built with Electron, React, TypeScript, and SQLite.

License Platform Electron React TypeScript


Features

Core API Client

  • Full HTTP support β€” GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
  • Request builder β€” Params, headers, body (form-data, urlencoded, raw JSON/XML/Text/HTML, binary, GraphQL), auth, scripts, settings
  • 13 authentication types β€” Basic, Bearer, API Key, Digest, OAuth 1.0, OAuth 2.0, Hawk, AWS Signature, NTLM, JWT, Akamai EdgeGrid, ASAP, and more
  • Response viewer β€” Pretty JSON, raw, preview, headers, timing breakdown, copy/download
  • Variable system β€” Scoped variables (Global β†’ Collection β†’ Environment β†’ Local), dynamic variables ($guid, $timestamp, $randomInt)
  • Cookie jar β€” Automatic send/receive, per-domain management, import/export

Collections & Organization

  • Unlimited nesting β€” Collections, folders, and requests with drag-and-drop reordering
  • Collection runner β€” Iterations, delays, CSV/JSON data files, live test results, setNextRequest() flow control
  • Request history β€” Grouped by time, searchable, with full response persistence
  • Environments β€” Multiple environments, quick-switch (Ctrl+E), initial/current values, sensitive value masking, bulk edit

Scripting & Automation

  • Pre-request & post-response scripts β€” Full pm.* API compatible with Postman
  • Sandboxed execution β€” Worker thread isolation with timeout and memory limits
  • Test assertions β€” pm.test(), pm.expect() with Chai-like matchers
  • Script console β€” console.log/info/warn/error capture and display
  • pm.sendRequest() β€” Make additional requests from within scripts

Protocol Support

  • WebSocket β€” Connect/disconnect, send/receive messages, message history, auto-reconnect
  • GraphQL β€” Schema introspection, autocompletion, query validation, schema explorer
  • gRPC β€” Proto file loading, unary and streaming calls
  • MQTT β€” Publish/subscribe, topic management
  • Socket.IO β€” Event-based real-time communication
  • SSE β€” Server-Sent Events streaming
  • Unix Domain Sockets β€” Local process communication

Visual Workflow Builder (Flows)

  • Drag-and-drop canvas β€” Built with React Flow
  • Node types β€” Request, Condition (if/else), Loop, Script, Delay, Output
  • Data flow β€” Variable passing between nodes with step-by-step execution visualization

Mock Servers

  • Local mock servers β€” Create from collection or define custom responses
  • Match rules β€” Method, path, query params, headers
  • Dynamic responses β€” Random/sequential selection, configurable delay
  • Hot-reload β€” Edit mocks while server is running

Developer Experience

  • Code generation β€” Export requests to 22 languages/frameworks
  • cURL import/export β€” Paste detection, multi-line support, Windows CMD format
  • Import/Export β€” Postman v2.1, OpenAPI 3.0, Swagger 2.0, HAR files
  • Command palette β€” Ctrl+Shift+P for quick actions
  • Global search β€” Fuzzy search across collections, requests, URLs (Ctrl+K)
  • Keyboard shortcuts β€” Fully customizable, Postman-compatible defaults
  • Console/Network logger β€” Real-time request logging with variable resolution display

Performance

  • Response streaming β€” Large responses (>10MB) handled efficiently
  • Virtual scrolling β€” History and console lists rendered with react-window
  • Lazy loading β€” Collection tree loads children on expand
  • Web Workers β€” JSON formatting offloaded for large payloads
  • Memory management β€” Monaco editor instances disposed on tab close

Cloud Sync (Optional)

  • Local-first β€” Works 100% offline, sync is opt-in
  • Real-time collaboration β€” WebSocket-based sync with presence indicators
  • Conflict resolution β€” Last-write-wins with offline queue
  • Team workspaces β€” Invite by email, permission model
  • Backend β€” Fastify + PostgreSQL + Redis (self-hostable via Docker)

CLI

  • CI/CD integration β€” Run collections from the command line
  • Multiple reporters β€” Console, JSON output
  • Data file support β€” CSV/JSON variable injection
  • OpenAPI linting β€” Validate specs from terminal

Tech Stack

Layer Technology
Desktop Shell Electron 28
Frontend React 18, Ant Design 5, Zustand
Editor Monaco Editor
Database SQLite (better-sqlite3, WAL mode)
HTTP Engine Undici
Build Vite 5, vite-plugin-electron
Testing Vitest
Installer electron-builder (NSIS)
Backend (optional) Fastify, PostgreSQL, Redis
Containerization Docker Compose

Getting Started

Prerequisites

  • Node.js 20 LTS (via fnm recommended)
  • Windows 10/11 (x64)
  • npm (bundled with Node.js)

Installation

# Clone the repository
git clone https://github.com/postbee/postbee.git
cd postbee

# Install dependencies
npm install

# Start development (uses fnm to ensure Node 20)
.\dev.ps1

Or manually:

fnm use 20
npm run dev

Build for Production

# Build the Windows installer (.exe)
npm run electron:build

The installer will be output to the release/ directory.

Run the Backend (Optional)

cd server
npm install
docker-compose up -d   # PostgreSQL + Redis
npm run db:migrate
npm run dev

Project Structure

postbee/
β”œβ”€β”€ electron/              # Main process (Electron)
β”‚   β”œβ”€β”€ main.ts            # App entry, window management
β”‚   β”œβ”€β”€ preload.ts         # Context bridge (IPC)
β”‚   β”œβ”€β”€ db/                # SQLite schema & initialization
β”‚   β”œβ”€β”€ ipc/               # IPC handlers (request, script, file, etc.)
β”‚   └── services/          # Core services (HTTP engine, gRPC, WebSocket, etc.)
β”œβ”€β”€ src/                   # Renderer process (React)
β”‚   β”œβ”€β”€ components/        # UI components by feature
β”‚   β”œβ”€β”€ layouts/           # App shell, sidebar
β”‚   β”œβ”€β”€ stores/            # Zustand state management
β”‚   β”œβ”€β”€ services/          # Data access & sync layer
β”‚   β”œβ”€β”€ types/             # TypeScript type definitions
β”‚   └── utils/             # Utilities (shortcuts, performance)
β”œβ”€β”€ server/                # Cloud sync backend (Fastify)
β”‚   └── src/
β”‚       β”œβ”€β”€ routes/        # REST API endpoints
β”‚       β”œβ”€β”€ ws/            # WebSocket handlers
β”‚       └── db/            # PostgreSQL pool & migrations
β”œβ”€β”€ cli/                   # CLI runner for CI/CD
β”œβ”€β”€ tests/                 # Unit, integration, E2E tests
β”œβ”€β”€ dist-electron/         # Compiled Electron output
β”œβ”€β”€ electron-builder.yml   # Installer configuration
β”œβ”€β”€ vite.config.ts         # Vite + Electron plugin config
└── dev.ps1                # Development startup script

Scripts

Command Description
npm run dev Start Vite dev server (renderer only)
npm run electron:dev Start full Electron app with hot-reload
npm run electron:build Build Windows installer
npm run build TypeScript compile + Vite build + electron-builder
npm run test Run tests in watch mode
npm run test:run Run tests once
npm run test:coverage Run tests with coverage report
npm run lint ESLint check
npm run typecheck TypeScript type checking

CLI Usage

# Run a collection
postbee run collection.json --iterations 5 --delay 200

# Run with environment variables
postbee run collection.json --environment staging.json

# Lint an OpenAPI spec
postbee lint openapi.yaml

# Export collection to OpenAPI format
postbee export collection.json --format openapi

Keyboard Shortcuts

Shortcut Action
Ctrl+Enter / F5 Send request
Ctrl+N / Ctrl+T New request tab
Ctrl+W Close tab
Ctrl+S Save request
Ctrl+E Switch environment
Ctrl+K Global search
Ctrl+Shift+P Command palette
Ctrl+L Focus URL bar
Ctrl+/ Toggle console
Ctrl+, Open settings
Ctrl+Tab Next tab
Esc Cancel request / close modal

Configuration

PostBee stores all data locally in SQLite. Configuration includes:

  • Theme β€” Light, Dark, or System
  • Request defaults β€” Redirects, SSL verification, timeout, max response size
  • Editor β€” Font family, tab size, word wrap, minimap
  • Proxy β€” HTTP/HTTPS/SOCKS5, per-request override, no-proxy list
  • Certificates β€” CA certs, client certs with domain matching
  • Shortcuts β€” Fully customizable key bindings

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License. See LICENSE for details.


Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages