import React, { useState } from 'react'; import { Copy, Check, Key, Code, Zap, Shield, Clock } from 'lucide-react'; export default function StubbrLanding() { const [email, setEmail] = useState(''); const [token, setToken] = useState(''); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const [copied, setCopied] = useState(false); const requestToken = async () => { if (!email || !email.includes('@')) { setError('Please enter a valid email address'); return; } setLoading(true); setError(''); setToken(''); try { const response = await fetch('https://stubbr.dev/__token/request', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email }) }); const data = await response.json(); if (response.ok) { setToken(data.token); } else { setError(data.error || 'Something went wrong'); } } catch (err) { setError('Failed to connect. Please try again.'); } finally { setLoading(false); } }; const copyToken = () => { navigator.clipboard.writeText(token); setCopied(true); setTimeout(() => setCopied(false), 2000); }; const handleKeyPress = (e) => { if (e.key === 'Enter') { requestToken(); } }; return (

StubbrDev

Mock API with Superpowers

stubbr.dev

Mock APIs Made Simple

A flexible mock API service that echoes your requests with dynamic fake data generation. Perfect for frontend development, testing, and rapid prototyping.

Instant Setup

Secure Tokens

40+ Placeholders

Rate Limited

Get Your API Token

{!token ? (
setEmail(e.target.value)} onKeyPress={handleKeyPress} placeholder="your@email.com" className="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-400 text-gray-900" />
{error && (
{error}
)}

One token per email • Free forever

) : (

Your API Token

{token}
✓ Token ready! Start making requests immediately.
)}

Quick Start

{`curl -X POST https://stubbr.dev/api/users \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
    "name": "?name",
    "email": "?email",
    "age": "?numberSmall"
  }'`}
            

Response:

{`{
  "name": "John Doe",
  "email": "john.doe@example.com",
  "age": 7
}`}
            

Fake Data Placeholders

{[ { title: 'Personal', items: ['?name', '?firstName', '?lastName', '?email', '?username', '?phone'] }, { title: 'Numbers', items: ['?number', '?numberSmall', '?numberLarge', '?decimal', '?price', '?id'] }, { title: 'Text', items: ['?word', '?sentence', '?paragraph', '?lorem', '?loremShort', '?loremLong'] }, { title: 'Date & Time', items: ['?date', '?dateTime', '?time', '?timestamp', '?stupidDateTime'] }, { title: 'Address', items: ['?address', '?street', '?city', '?state', '?zip', '?country'] }, { title: 'Other', items: ['?uuid', '?boolean', '?color', '?url', '?domain', '?image'] } ].map((category, idx) => (

{category.title}

{category.items.map((item, i) => ( {item} ))}
))}

Array Repeating

Generate multiple items using{' '} __repeat

Request:

{`{
  "user": {
    "__repeat": 3,
    "id": "?counter",
    "name": "?name",
    "email": "?email"
  }
}`}
              

Response:

{`{
  "users": [
    {
      "id": 0,
      "name": "John Doe",
      "email": "john@example.com"
    }
  ]
}`}
              

Special Instructions

Control response behavior with{' '} __instructions

{`{
  "user": { "name": "?name" },
  "__instructions": {
    "delay": 2000,
    "status": 201,
    "headers": {
      "X-Custom": "Value"
    },
    "body": {
      "success": true
    }
  }
}`}
            

Rate Limiting

10

Requests per window

100KB

Max request size

5s

Max delay

); }