SmartGare
Getting started

Quickstart

Make an authenticated request, discover contracts, and find the owning module.

1. Discover the API

With the backend running, open:

http://localhost:8080/swagger-ui.html

The generated OpenAPI document lives at:

http://localhost:8080/v3/api-docs

2. Call a module

Every protected operation accepts a bearer token from the deployment's OIDC provider. The example uses a placeholder credential:

curl --request GET \
  --url http://localhost:8080/referential/v1/carriers \
  --header 'Authorization: Bearer <your-token>'

Permissions are action-specific. Carrier reads require referential.carrier:read; carrier mutations require referential.carrier:write.

3. Follow ownership

When a request changes a fact, find the module that owns it:

FactOwner
Carrier, vehicle, line, station, permitreferential
Effective business policyrules
Display point or presentation profilesiv
Dated departurescheduling
Vehicle/bay commitmentallocation
Observed station passagecycle
Traveler ticket and counter moneyticketing
Vehicle-stay invoicebilling

Call another module only through its published API. Never read or write its schema directly.

4. Regenerate the frontend contract

With the backend running:

pnpm --dir ../smartgare-frontend --filter @smartgare/api generate

The generated declaration is committed so every frontend build consumes the reviewed HTTP contract.

5. Explore the MCP mirror

Enable the backend mcp profile to serve the authenticated Streamable HTTP endpoint at /mcp. Referential tools follow the referential_<verb>_<noun> naming convention and invoke the same use cases as REST.

On this page