Hey everyone,
Iām a huge fan of FastAPI. The fact that it generates an OpenAPI spec out of the box is its true superpower. But I noticed that while we get amazing documentation (Swagger UI / ReDoc) for free, we still have to manually build the internal tools, dashboards, and admin panels to actually use the data easily.
So I built the other half of the equation.
UIGen - point it at your FastAPI /openapi.json URL, and get a fully interactive React frontend in seconds.
npx @uigen-dev/cli serve http://127.0.0.1:8000/openapi.json
# UI is live at http://localhost:4400
How it fits the FastAPI ecosystem
FastAPI is all about types and specs. UIGen follows that philosophy:
Pydantic Validation: Because your spec includes the constraints from your Pydantic models, UIGen automatically builds Zod validation on the frontend to match.
Interactive, not just Docs: Swagger UI is for testing endpoints. UIGen is for managing resources. It handles the "ListView -> DetailView -> EditForm" flow as a cohesive app.
What it generates (from your FastAPI code)
Sidebar nav mapped to your API tags/resources.
Smart Tables with sorting, pagination, and filtering (derived from your query params).
Dynamic Forms derived from your Pydantic models.
Detail Views with related resource links.
Auth UI - handles Bearer tokens and credential injection via a built-in proxy.
Wizards: Large models are automatically split into multi-step forms.
Complex Actions: Non-CRUD endpoints show up as custom action buttons.
How it works
It parses your /openapi.json into a custom Intermediate Representation (IR). A pre-built React SPA (shadcn/ui + TanStack) reads that IR and renders the UI. A Vite dev server serves the app and proxies API calls to your FastAPI backend, handling CORS headers so you don't have to fiddle with middleware during dev.
Honest Limitations
Circular Models: If you have deeply nested recursive Pydantic models, resolution might skip the deepest levels.
Edit View: Works best if you have a standard GET /{id} endpoint for your items.
And many other edge cases.
Try it now
If you have a FastAPI app running locally:
npx @uigen-dev/cli serve http://localhost:8000/openapi.json
Or try it on one of the example yaml files in the repo
Would love to hear thoughts from the FastApi community. Of course, this isn't meant to replace a custom consumer-facing frontend, but for internal tools, rapid prototyping, or providing a UI for your API consumers, itās a massive time-saver.
Happy coding!