A premium, self-hostable, node-based mock API platform for modern frontend & backend decoupled workflows.
Fack API's is a zero-configuration, self-hostable mock API platform designed to streamline decoupled software development. It functions as a flexible, high-fidelity mock backend that allows frontend and mobile teams to build and test code independently. With a graphical node canvas, a visual schema builder, custom chaos testing, and automatic TypeScript compilation, Fack API's accelerates your dev cycle from days to hours.
🗂️ Workspaces Dashboard
|
🎨 Node-Based Canvas Designer
|
⚙️ Workspace Settings & Safe Deletion
|
|
- 🌐 Isolated Namespaces: Segment routes under individual projects and custom URL prefixes (e.g.
/mock/project-slug/...). - 🎨 Visual Node Canvas: Design your endpoints graphically, customize HTTP methods, and simulate response pipelines with React Flow.
- 🌳 Nested JSON Schema Builder: Build complex response bodies with deep nestings ("objects inside arrays of objects") without writing raw JSON.
- 🎲 Faker.js Data Synthesizer: Connect any schema property to a rich library of data providers (names, images, finance, strings, addresses).
- ⚡ Chaos Testing Simulator: Inject randomized delays (min/max latency) and specify failure rates (e.g. 5% of queries fail with a 500 error) to test UI resilience.
- 📁 Type Contract Exporter: Automatically compile client-side TypeScript interfaces (
.d.tsfiles) directly from your visual schemas. - 🚀 Zero-Config Database: Backed by a high-performance local SQLite file wrapped in type-safe Drizzle ORM queries.
- 🐳 Native Containerization: Light Alpine-based multi-stage Docker build ready for instant deployments with persistent volumes.
graph TD
A["💻 Client / Frontend App"] -->|"1. API Request (/mock/:slug/*)"| D["🔀 Router / Proxy Layer"]
B["🖥️ Dashboard UI"] -->|"Define Schema & Topology"| C[("sqlite SQLite Database")]
C -->|"Sync & Load TOPOLOGY"| D
D -->|"2. Match Route (path-to-regexp)"| E["🎲 Mock Engine (JSF + Faker.js)"]
E -->|"3. Add Latency & Chaos Sim"| F["⚡ Delay / Error Injector"]
F -->|"4. Return Payload / Code"| A
style A fill:#4F46E5,stroke:#fff,stroke-width:2px,color:#fff
style B fill:#10B981,stroke:#fff,stroke-width:2px,color:#fff
style C fill:#0F172A,stroke:#fff,stroke-width:2px,color:#fff
style D fill:#F59E0B,stroke:#fff,stroke-width:2px,color:#fff
style E fill:#6366F1,stroke:#fff,stroke-width:2px,color:#fff
style F fill:#EF4444,stroke:#fff,stroke-width:2px,color:#fff
| Component | Technology | Role |
|---|---|---|
| Framework | Next.js 16 (App Router) | Runtime container, rendering, and API handler |
| Flow Canvas | React Flow (v12) | Topology graph canvas layout |
| UI Components | Radix UI + Tailwind CSS v4 | Clean interface styling and accessibility |
| State Manager | Zustand + Immer | Schema tree edits and node transformations |
| ORM | Drizzle ORM | Database schema mapping and DDL generation |
| Database | SQLite (@libsql/client) | Portable file-based storage engine |
| Mock Engine | json-schema-faker + Faker.js | Synthetic mock payload parser |
| Route Matcher | path-to-regexp | Fast Express-like matching |
| Type Compiler | json-schema-to-typescript | Compiles schema trees into raw .d.ts strings |
- Node.js 20+
- pnpm (v10+)
- Clone the repository and enter the folder.
- Install dependencies:
pnpm install
- Initialize the local database:
mkdir data pnpm drizzle-kit push
- Boot the Next.js server:
pnpm dev
- Open http://localhost:3000/dashboard to manage your projects.
To self-host Fack API's on your local network or server, you have two options:
You can pull and run the official pre-built image directly:
# Pull the Docker image
docker pull mkkatiyar277/fake-api:latest
# Run the container
docker run -d -p 3000:3000 -v fack-data:/app/data mkkatiyar277/fake-api:latestNote: Replace latest with a specific version tag if needed.
If you cloned the source repository and want to run it locally using Docker Compose:
-
Spin up the container:
docker compose up -d
-
The dashboard will be accessible at
http://localhost:3000. -
Database and project topologies are persisted in the
fack-datavolume.
If you create a project payment-service and add a GET /v1/customers/:customerId route:
curl -X GET http://localhost:3000/mock/payment-service/v1/customers/cust_9923{
"id": "cust_9923",
"name": "Jane Smith",
"email": "jane.smith@example.com",
"profile": {
"avatar": "https://avatars.io/jane_smith",
"jobTitle": "Lead System Architect"
}
}This project is licensed under the MIT License - see the LICENSE file for details.



