A modern, lightweight API testing tool built with Next.js 16, React 19, and TypeScript. Inspired by Postman and Requestly, designed for developers who need a fast, clean interface for testing APIs.
- ๐ฏ All HTTP Methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
- ๐ Custom Headers: Add, edit, and toggle custom request headers
- ๐ฆ JSON Body Editor: Built-in JSON validation and formatting
- ๐จ Beautiful UI: Dark mode with zinc color scheme using shadcn/ui
- โก Fast & Responsive: Smooth animations with Motion (Framer Motion)
- ๐ Response Viewer: Tabbed interface for Body, Headers, and Raw response
- ๐ Request History: Automatically saves last 10 requests to localStorage
- ๐ No CORS Issues: Server-side proxy bypasses all CORS restrictions
- ๐ Universal Access: Test localhost, Render, Vercel, or any backend URL
- โจ๏ธ Keyboard Shortcuts:
Ctrl+Enter(orCmd+Enter) to send requestCtrl+K(orCmd+K) to focus URL bar
- ๐ Copy Response: One-click copy to clipboard
- ๐ Syntax Highlighting: Properly formatted JSON responses
- ๐จ Error Handling: Comprehensive error messages for network, CORS, and validation issues
- ๐ฑ Mobile Friendly: Responsive design that works on all devices
- Framework: Next.js 16.0.3 (App Router)
- Language: TypeScript 5
- Styling: Tailwind CSS 4
- UI Components: shadcn/ui (zinc theme)
- Animations: Motion (Framer Motion)
- HTTP Client: Axios
- JSON Viewer: react-json-view-lite
- Notifications: Sonner
- Icons: Lucide React
# Clone the repository
git clone https://github.com/Pratham-Prog861/mini-postman.git
cd mini-postman
# Install dependencies
npm install
# Run development server
npm run devOpen http://localhost:3000 in your browser.
- Select HTTP Method: Choose from GET, POST, PUT, DELETE, PATCH, HEAD, or OPTIONS
- Enter URL: Type or paste your API endpoint
- Add Headers (optional): Switch to Headers tab and add custom headers
- Add Body (optional): For POST/PUT/PATCH, switch to Body tab and enter JSON
- Click Send: Or press
Ctrl+Enterto send the request
Method: GET
URL: https://jsonplaceholder.typicode.com/posts/1Method: POST
URL: https://jsonplaceholder.typicode.com/posts
Headers:
Content-Type: application/json
Body:
{
"title": "Test Post",
"body": "This is a test",
"userId": 1
}- All requests are automatically saved to localStorage
- Click any history item to restore that request
- Maximum 10 requests are stored
- Clear all history with the "Clear All" button
Ctrl+Enter/Cmd+Enter: Send requestCtrl+K/Cmd+K: Focus URL input
mini-postman/
โโโ src/
โ โโโ app/
โ โ โโโ layout.tsx # Root layout with fonts
โ โ โโโ page.tsx # Main application page
โ โ โโโ globals.css # Global styles & theme
โ โโโ components/
โ โ โโโ ui/ # shadcn/ui components
โ โ โโโ BodyEditor.tsx # JSON body editor with validation
โ โ โโโ HeaderEditor.tsx # Key-value header editor
โ โ โโโ MethodSelector.tsx # HTTP method dropdown
โ โ โโโ RequestForm.tsx # Tabbed request configuration
โ โ โโโ RequestHistory.tsx # Sidebar history panel
โ โ โโโ ResponseViewer.tsx # Tabbed response display
โ โโโ hooks/
โ โ โโโ useApiRequest.ts # Custom hook for API logic
โ โโโ lib/
โ โ โโโ apiClient.ts # Axios wrapper with error handling
โ โ โโโ utils.ts # Utility functions (cn)
โ โโโ types/
โ โโโ index.ts # TypeScript type definitions
โโโ public/ # Static assets
โโโ package.jsonNo environment variables required! The app runs entirely in the browser.
No more CORS problems! ๐
This app uses a built-in server-side proxy that runs on Next.js API routes. All requests are proxied through your server, which means:
โ
No CORS restrictions - Works with any API (localhost, Render, Vercel, etc.)
โ
Test localhost APIs - Even from a deployed site
โ
No external proxy needed - Everything runs on your own server
โ
Secure - Your requests stay private
The proxy automatically:
- Forwards your requests server-side
- Handles all response types (JSON, text, etc.)
- Preserves headers and status codes
- Bypasses browser CORS policies
- JSONPlaceholder:
https://jsonplaceholder.typicode.com - ReqRes:
https://reqres.in/api - HTTPBin:
https://httpbin.org - Dog API:
https://dog.ceo/api - Cat Facts:
https://catfact.ninja
The app handles various error scenarios:
- Invalid URL: Validates URL format before sending
- Network Errors: Detects connection issues, timeouts, DNS failures
- CORS Errors: Provides helpful messages and suggestions
- Invalid JSON: Real-time validation in body editor
- HTTP Errors: Displays status codes and error messages
- Body Tab: Formatted JSON with syntax highlighting and collapsible nodes
- Headers Tab: Clean key-value display of response headers
- Raw Tab: Plain text view of response body
- Status Badge: Color-coded status (green for 2xx, red for errors)
- Response Time: Millisecond-accurate timing
# Build for production
npm run build
# Start production server
npm start
# Run linter
npm run lintMIT License - feel free to use this project for personal or commercial purposes.
Contributions are welcome! Please feel free to submit a Pull Request.
- localStorage has a 5-10MB limit (sufficient for 10 requests)
- Collections/Folders for organizing requests
- Environment variables support
- Request/Response export (JSON, cURL)
- Authentication helpers (Bearer, Basic, API Key)
- Query parameters editor
- File upload support
- WebSocket testing
- GraphQL support
- Dark/Light mode toggle
- Request chaining
For issues or questions, please open an issue on GitHub.
Built with โค๏ธ using Next.js 16 and React 19