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

Stanza: Instant Stateful Mock APIs from Natural Language Prompts

说明与用途

Stanza 能即时从自然语言生成状态化的 Mock API,支持 CRUD、延迟和状态码,并通过 TTL 自动清理。

问题

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

结果

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

工作流

  • 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.

证据

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

来源

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).

来源

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.

来源

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.

来源

  • 记录日期: 2026-10-18T22:41:17.319Z