ENDPOINTS
The whole API surface, on one page
REST routes, GraphQL operations and the events you publish, grouped by resource. Each one shows its method, auth, parameters, status codes and the types it takes and returns, and it links to the database tables it reads or writes.
REST and GraphQL, side by side
The Relay API mixes REST calls with the events that handheld scanners push, and every route is linked to its tables. The merchant portal is GraphQL, so its queries, mutations and subscriptions come with the object types behind them.
Click an endpoint for its parameters, and click its request or response type to jump to that type. The tables it touches are highlighted and listed.
What it draws
Every field in the spec, and where it shows up. An endpoint needs an id, a method and a path. Everything else is drawn when it is there.
ENDPOINTS
- method
- A coloured badge. One catalogue can mix all three kinds.GETPOSTPUTPATCHDELETEHEADOPTIONSQUERYMUTATIONSUBSCRIPTIONEVENT
- path
- REST:
/users/{id}. GraphQL: the signature,shipment(id: ID!). Event: the topic, queue or webhook name. - summary · description
- One line on the row, and the longer text in the details panel.
- auth
- A 🔒 chip with the scheme or role (
bearer,api-key,admin).nonedraws nothing, so an open route stands out by its missing lock. - status[]
- Status codes as a chip on the row, up to four.
- params[]
- A table in the details panel: name, where it goes, type, and whether it is required.pathqueryheaderargbody
- request · response
- Type names. When the type is in the catalogue, it becomes a chip that jumps to it.
- entities[]
- ERD table IDs this endpoint reads or writes. They are highlighted on selection, and the dashboard lists them per table.
- deprecated · tags
- A deprecated endpoint is struck through and chipped. Tags are free labels, and search matches them.
- sources[]
- The handler's file and line, linked to the code when
meta.repositoryis set.
GROUPS AND TYPES
- groups[]
- One card per resource, tag or controller. An endpoint with no group goes in
default. - types[]
- The schemas the endpoints reference, each with its fields and a required mark.objectinputenuminterfaceunionscalar
- meta.api_kind · base_url · version
rest,graphqlormixed, plus the server URL and API version in the header.- layout.columns · card_width · show_types
- Group cards are laid out as masonry, in one to four columns.
show_types: falsehides the types section.
Where it reads from
Works with OpenAPI 3 and Swagger 2. An operation's first tag becomes its group, with the tag's description, and any further tags stay as tags. security becomes auth, and an empty requirement becomes none. Numeric response codes become status, and $ref parameters and bodies are resolved. The base URL comes from servers[0], or from host and basePath in Swagger 2.
A YAML document needs the optional yaml package. Run npm install in the skill folder, or convert the document to JSON.
Query, Mutation and Subscription each become a group, and every field on them becomes an operation with its argument signature. Object, input, enum, interface and union types fill the types section. The parser is vibeX's own. It skips directives and whatever else it does not understand rather than failing on it. Add --erd to draw the same file as an ERD instead.
The skill reads @Controller prefixes and @Get/@Post/… paths, including the global prefix and URI versioning. @UseGuards and @Roles become auth, and the @Body() DTO becomes request. @Param, @Query and @Headers become params, and a query DTO is expanded into one param per property. GraphQL resolvers map @Query, @Mutation and @Subscription the same way. Each endpoint points at its handler.
Check this one before you trust it. It is the agent's reading of your code, not an import.
The skill reads router.get('/x', …), app.post(…) and fastify.route({ method, url }). Topics you publish to go in as EVENT, so the catalogue covers what the service emits as well as what it answers.
Same caveat. Read the draft once.
The spec you keep
{
"schema_version": 1,
"diagram_type": "endpoints",
"meta": { "title": "Orders API", "base_url": "/v1" },
"groups": [{ "id": "orders", "label": "Orders" }],
"endpoints": [
{ "id": "create", "group": "orders",
"method": "POST", "path": "/orders",
"summary": "Place an order",
"auth": "bearer", "request": "CreateOrder",
"response": "Order", "status": [201, 400, 409],
"entities": ["order", "customer"] },
{ "id": "placed", "group": "orders",
"method": "EVENT", "path": "order.placed",
"summary": "Published after the order commits",
"entities": ["order"] }
]
}entities holds IDs from your ERD. That list is what lets the dashboard answer “which routes write the orders table?”
Keep summary to one line. A long description goes in description, which appears in the details panel.
The full contract is schemas/endpoints.schema.json.
What validate stops
Errors
Exit 1. Each one names the field.
dangling-refan endpoint's group does not existid-clashan endpoint, group or type sharing an IDmissingan endpoint with no path, a type with no nametypestatusthat is not a list of codes,entitiesthat is not a list of IDs
Warnings
Printed, never blocking.
duplicate-routethe same method and path listed twicesummaryan endpoint with no summarysizemore than 80 endpoints. One catalogue per bounded context
The sentences it writes
A docs section can ask for endpoints.operations and endpoints.types. From the Relay build, word for word:
POST /v1/shipments — Book a shipment and mint a tracking number per parcel. It accepts CreateShipmentInput. It returns Shipment.endpoints.operations · relay.endpoints
GET /v1/shipments — List the calling merchant's shipments, newest first. It returns Shipment[].endpoints.operations · relay.endpoints
Your summary is attached as written, never reworded.
What it connects to
Routes and the tables they touch
The dashboard overview has a table: every ERD table, and the endpoints that list it. Each one opens its panel with that row selected.
ERD →From a container to its routes
A container's link can open its catalogue, the way Relay's shipment API does.
“This route is missing”
Every endpoint's details panel has a report link that opens an issue already naming it.
Intake →