Realistic JSON
Seeded users, products, posts, todos, and carts return shaped
payloads with pagination (total, skip,
limit) and searchable list filters.
Dummy REST API
Spin up fake but behaviorally real REST data — auth tokens, CRUD mutations, and proper status codes — without standing up a backend.
What this is
Dummy REST API is an in-memory fake service for frontend and mobile developers. Requests create, update, and delete records for the life of the process — not a frozen fixture file — so your loading states, error handling, and auth flows get exercised end to end.
Seeded users, products, posts, todos, and carts return shaped
payloads with pagination (total, skip,
limit) and searchable list filters.
GET, POST, PUT,
PATCH, and DELETE each return the status
codes and bodies you would expect from a production-style API.
/api/register and /api/login issue JWTs
on success and 400 responses when fields are missing —
enough to build login screens and error states against a live
contract.
Browse interactive docs at /api/docs, or pull the machine-readable spec from /api/openapi.yaml.
Endpoints
Every collection supports list, read, create, replace, patch, and
delete. Lists accept limit, skip, and where
useful q, userId, category, or
completed.
POST /api/register
{ "email", "password", "username" } → 201 + token
POST /api/login
{ "email"|"username", "password" } → 200 + token
missing fields / bad credentials → 400
GET /api/me
Authorization: Bearer <token> → current user
Sample login:
emily.johnson@example.com /
emilyspass
Security
The service is meant for testing, but writes and resets are gated so strangers cannot silently trash or flood your instance.
POST/PUT/PATCH/DELETE
POST /api/reset
JWT_SECRET, RESET_TOKEN, and
WRITE_API_KEY
curl -X POST https://your-host/api/products \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_WRITE_API_KEY' \
-d '{"title":"Test Gadget","price":42.5}'
Quick start
Copy .env.example to .env, set secrets, then
bring the container up. The process listens on port
3000 by default.
cp .env.example .env
# set JWT_SECRET, RESET_TOKEN, WRITE_API_KEY
docker compose up --build -d
# health
curl http://localhost:3000/api/health
# interactive OpenAPI
open http://localhost:3000/api/docs