A comprehensive, local-first API mocking service that allows you to dynamically create, configure, and serve API endpoints with a modern, cyberpunk-themed UI.
- Dynamic Endpoint Creation: Create GET, POST, PUT, DELETE, PATCH endpoints on the fly.
- Visual JSON Builder: Construct complex JSON responses without writing raw JSON, or edit raw JSON directly.
- Latency Simulation: Simulate slow network conditions (0-5000ms delay) per endpoint.
- Status Code Control: Force endpoints to return specific status codes (e.g., 404, 500) for error testing.
- File Manager: Drag-and-drop file uploads (images, documents) served statically.
- Request Logging: Real-time inspection of incoming requests (headers, query params, body) for debugging.
- Network Access: Access the API and UI from any device on your local network (mobile, tablet, etc.).
- Backend: Node.js, Express, LowDB (JSON database), Multer (File uploads)
- Frontend: React (Vite), TailwindCSS v3, Framer Motion, Axios, Lucide React
Clone the repository or download the source code.
cd server
npm installcd ui
npm installYou need to run both the server and the UI.
The server runs on port 3000.
cd server
node index.jsOutput: Server running on http://localhost:3000 and http://0.0.0.0:3000
The UI runs on port 5173.
cd ui
npm run devOutput: Network: http://<YOUR_IP>:5173/
- Make sure your computer and mobile device are on the same Wi-Fi network.
- Start both the server and UI as shown above.
- Check the
npm run devoutput for the Network URL (e.g.,http://192.168.1.15:5173). - Open that URL in your mobile browser.
- Note: Windows Firewall rules have been added for ports 3000 and 5173. If you still can't connect, ensure your network profile is set to "Private" or check your firewall settings.
The service exposes a few management APIs you can use programmatically if needed:
GET /_manage/endpoints: List all endpointsGET /_manage/files: List uploaded filesGET /_manage/logs: Get request logsPOST /_manage/upload: Upload a file (multipart/form-data, field:file)
All other paths (e.g., /api/users) will be matched against your dynamically defined endpoints.
Simple_API_Service/
├── server/ # Express Backend
│ ├── uploads/ # Stored uploaded files
│ ├── db.json # LowDB database file (Endpoints & Logs)
│ └── index.js # Main server entry
├── ui/ # React Frontend
│ ├── src/ # Source code
│ └── vite.config.ts # Vite configuration
└── README.md # This file
- 500 Internal Server Error? Check the server terminal for error logs.
- Can't connect from mobile? Verify the IP address is correct and Windows Firewall is not blocking Node.js.
- UI Blank? Check the browser console (F12) for errors.
Built with ❤️ by your AI Agent.
