Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Stanza: Instant Stateful Mock APIs from Natural Language Prompts

Description and use

Stanza instantly creates stateful mock APIs from natural language, supporting CRUD, latency, and status codes, with automatic cleanup via TTL.

Problem

Frontend developers and indie hackers need quick, realistic mock REST APIs to prototype applications before building a real backend.

Outcome

Stanza provides instant, stateful mock REST APIs from natural language, supporting full CRUD, custom latency, and status codes, with automatic cleanup via TTL indices.

Workflow

  • 1. Provide a natural language prompt describing desired data (e.g., "A list of 20 online users with id, name, avatar, and last seen").
  • 2. Stanza’s AI Blueprint Engine (qwen/qwen3.8-27b via Groq) parses the prompt and outputs a strict JSON schema and record count.
  • 3. The Local Data Multiplier uses @faker-js/faker and a recursive generator to create nested JSON data matching the schema.
  • 4. A single‑document MongoDB Atlas collection stores the mock data with a TTL index to auto‑expire after a custom lifespan.
  • 5. Middleware injects simulated delay and status code overrides based on query parameters (e.g., ?delay=2000&status=200).
  • 6. The endpoint is exposed immediately and can be called by frontend code or testing tools.
  • 7. After the TTL expires, the mock data is automatically cleaned up.
  • 8. Developers can iterate by changing the prompt or query parameters to adjust data or behavior.

Evidence

Stanza transforms plain natural language descriptions into live, stateful mock REST API endpoints instantly.

Source

It supports full CRUD operations (GET, POST, PUT, DELETE), custom data payloads, and query-based simulations like artificial latency (?delay=5000) and custom status codes (?status=500).

Source

Uses open-weight models (qwen/qwen3.8-27b) via Groq with strict JSON output mode to extract the exact schema structure and record count from natural language prompts.

Source

Database Layer (MongoDB Atlas): Utilizes a single-document collection strategy with TTL indices (expiresAt) to automatically expire and clean up temporary mock endpoints after their custom lifespan.

Source

  • Record date: 2026-10-18T22:41:17.319Z