r/FastAPI • u/illusiON_MLG1337 • Dec 19 '25
feedback request Helix – Dynamic API mocking built with FastAPI, Starlette Middleware, and Redis. Features Chaos Engineering and strict schema validation.
Hi r/fastapi!
I wanted to share an open-source tool I've been building with FastAPI: Helix. It's a dynamic API mocking server that generates realistic data on the fly using LLMs (Ollama, DeepSeek, etc.).
Why I built it: I often find myself blocked on the frontend while waiting for the backend implementation. Static JSON mocks are tedious to maintain, so I wanted something dynamic but reliable.
The FastAPI Stack:
Core: FastAPI handles dynamic routing for undefined endpoints.
Middleware: I rely heavily on Starlette middleware for "Chaos Engineering" (simulating latency/errors) and request logging.
Async/Await: Critical for handling AI inference without blocking the main event loop.
Schema Enforcement: Since we all love Pydantic/Types here, I implemented a "Strict Mode" where the AI output is forced to match a specific JSON Schema or TypeScript interface. This ensures type safety even with LLM generation.
Key Features:
Zero-config setup (Docker).
Works 100% offline with Ollama (Llama 3.2).
Strict Schema Enforcement (no random AI hallucinations breaking the frontend).
Chaos Mode (inject random 500s or delays).
It's fully open source (AGPLv3). I'd love to hear your feedback on the architecture or features!
4
u/leec0621 Dec 19 '25
Great job bro