User manual
Two tracks. Users build and serve their own mocks; admins manage every namespace, import in bulk, copy endpoints between users, and watch real traffic. Start wherever you sit.
Part 1 · For users
Everything a signed-in user can do, in order — each step builds on the last. Your namespace is assigned for you; the rest is yours to fill.
STEP 01
Open the portal and sign in. Users land on their own endpoints; admins land on the dashboard.
/login.admin / password and user1 / password./abcd — is assigned automatically. Every mock you create is served under it.
STEP 02
Choose a method and path, then define the response you want returned.
STEP 03
Your endpoint is live immediately under your namespace. Match is by method + normalized path.
/<your-namespace>/<path> with the matching method.{"error":"Mock API not found"}.
STEP 04
Skip authoring by hand — capture a real API's response.
-d body, and auth all work).
STEP 05
Stand up a whole API surface at once from a Postman collection — entirely offline, with no network calls.
.json file and import.200 with an empty body.STEP 06
For gateways that wrap responses in an encrypted envelope.
{ "eData": …, "code": … }; decrypting eData returns your JSON.
Part 2 · For admins
Admins can do everything above, for anyone — plus user management, search and bulk operations across all namespaces, copying endpoints between users, and traffic analytics.
STEP 01
Open Users to add accounts. Each user gets their own namespace, generated for them.
user or admin. Editable.STEP 02
The Mock APIs page lists endpoints across all namespaces, each with its owner.
STEP 03
Select endpoints with the checkboxes, then apply one action to all of them at once.
STEP 04
The dashboard reads real traffic — every served request is counted as it happens.
Reference
The handful of ideas behind every mock, plus the environment variables that configure a deployment.
| Concept | What it means |
|---|---|
| namespace (salt) | A unique, auto-generated 4-letter prefix, one per user and permanent. Mocks are served under /<namespace>/…. |
| role | user manages only their own endpoints; admin manages every namespace, users, and the dashboard. |
| method + path | How the dispatcher matches a request. Paths are normalized (leading slashes stripped). |
| response | Stored status, headers (JSON), and body — replayed verbatim when the mock matches. |
| active | Only active mocks are served; inactive ones 404. |
| encrypted | Serves the body inside an AES-256-CBC { eData, code } envelope. |
| request_count | Every served request is counted, powering the admin dashboard. |
| Env var | Purpose (default) |
|---|---|
| DATABASE_HOST / PORT | MySQL location (127.0.0.1 / 3307) |
| DATABASE_USERNAME / PASSWORD | MySQL credentials (admin / pass) |
| MOCK_AES_KEY / IV | eData cipher key (32 bytes) and IV (16 bytes) |
| RECORDER_MAX_BYTES | Cap on a recorded response body (5,000,000) |
| RECORDER_OPEN/READ_TIMEOUT | curl recorder timeouts (5s / 8s) |
| ALLOWED_HOSTS | Comma-separated Host allowlist (production) |