tiru Svelte Themes

Tiru

a frictionless API Mocker runnable via the npx command

tiruAPI

image

tiruAPI is a lightweight API mocking tool with a modern Svelte UI and ultra-fast Bun + Hono backend. Create, test, and manage mock APIs for local development — runnable instantly with npx or pnpx.


Quick Start

# Using npx
npx @felixfern/tiru-api

# Using pnpx (pnpm)
pnpx @felixfern/tiru-api

This will:

  1. Start the backend server on http://localhost:3000
  2. Open the web UI in your browser

Features

  • 🎨 Modern Dark UI — beautiful dark-mode interface
  • Ultra-fast — Powered by Bun + Hono
  • 📂 Sidebar & Folders — Organize APIs into collections with collapsible folders
  • 🖱️ Drag & Drop — Easily reorder endpoints with drag-and-drop
  • 🔀 Dynamic URLs — Support for path parameters like /api/users/:id
  • 🎭 Response Simulation — Add delays, JSON responses, and random failures
  • JSON Editor — Built-in JSON formatter and validator
  • 📊 Live Logs — Real-time API hit logging with inspection
  • 🌐 CORS enabled — Works seamlessly with any frontend

Usage

Creating a Collection

  1. Open the web UI at http://localhost:3000
  2. Click the + button in the sidebar to create a new collection
  3. Expand the collection folder to see endpoints

API Path Patterns

You can use dynamic path parameters:

/api/users/:id          → matches /api/users/123, /api/users/abc
/api/posts/:id/comments → matches /api/posts/5/comments

Simulation Features

  • Delay: Add response delay in milliseconds
  • Failure Rate: Simulate random failures (0-100%)
  • Status Codes: Customize success (200, 201) and failure (400, 500) codes

Export/Import

  • Click the download icon on a collection card to export as JSON
  • Click the Import button in the toolbar to load a collection

Development

# Clone the repo
git clone https://github.com/felixfern/tiru.git
cd tiru

# Install dependencies (requires Bun & pnpm)
pnpm install

# Run development servers
pnpm dev

This starts:

  • Frontend: http://localhost:5173
  • Backend: http://localhost:3000

Building for Production

# Build both frontend and backend
pnpm build

# Start production server
pnpm start

Top categories

Loading Svelte Themes