API Visualization
An admin-oriented API discovery solution based on OpenAPI aggregation and Scalar UI.
MuseMVP provides a complete API documentation pipeline through three admin-only endpoints. Routes use describeRoute and validator from hono-openapi to generate schemas automatically, and Scalar renders an interactive API reference UI.

Use Cases
Suitable for internal API documentation sharing, frontend-backend integration, and external integrators reviewing interface specs.
Endpoint Matrix
GET /api/app-openapi
Generates OpenAPI schema from Hono routes only, without Better Auth routes.
GET /api/openapi
Merges app schema and Better Auth schema into one unified spec.
GET /api/docs
Renders an interactive Scalar API reference UI with search and try-it support.
| Endpoint | Purpose | Permission |
|---|---|---|
GET /api/app-openapi | OpenAPI schema for Hono routes | 🔒 Admin |
GET /api/openapi | Merged app + Better Auth spec | 🔒 Admin |
GET /api/docs | Scalar API reference UI | 🔒 Admin |
Swagger Ecosystem Compatibility
The built-in UI uses Scalar, but the underlying output is standard OpenAPI JSON, fully compatible with the Swagger ecosystem:
| Use Case | Description |
|---|---|
| Swagger UI / Editor | Import specs for browsing and debugging |
| Postman / API gateways | Auto-generate collections from shared specs |
| SDK / type generation | Generate client code based on OpenAPI |
| CI contract validation | Run API compatibility checks in pipelines |
Admin Usage Guide
Sign in with an admin account.
Visit /api/docs, then use tags or search to filter endpoints.
Visit /api/openapi to export the raw spec for Swagger-compatible tools.
Import into your toolchain for unified API governance and collaboration.
Production Recommendations
API Governance
It is recommended to restrict /api/docs and /api/openapi to admin-only or internal-network access to avoid leaking interface details.
| Recommendation | Description |
|---|---|
| Complete route metadata | Fill summary, tags, and responses in describeRoute for each route |
| Treat as contract | Review OpenAPI spec changes during code review |
| Restrict access scope | Keep /api/docs and /api/openapi for admin/internal environments |