[AVAILABLE].
packages/api. Not a library other packages import, it’s the running server. No public exports (src/index.ts is empty).Purpose
Composes every other package into one running Express process: policy loading, the gateway, credential isolation, and 14 HTTP routes. For the routes themselves, request/response shapes, and verified error codes, see REST API Introduction and Endpoints, this page covers the server’s internal structure.Install
Not installed as a dependency, this package is the deployable server itself. See Deploy patterns.Structure
| Path | Purpose |
|---|---|
src/server.ts | Entry point. Builds the execution system, the application, then the Express app, and listens on port 3000. |
src/app.ts | Mounts all 14 routes and the error handler, in order, the error handler must be registered last. |
src/application.ts | createApplication(executionSystem), wires RuntimeFactory.create() with the repositories and policy repository. |
src/routes/*.ts | One file per route (or router factory), see Endpoints for each one’s behavior. |
src/middleware/error-handler.ts | Maps thrown errors to HTTP status codes by instanceof, falls through to an unstructured 500 for anything unrecognized. |
src/mappers/BusinessTransactionMapper.ts | fromRequest(body), forces status: RECEIVED and createdAt: now regardless of client input. |
src/bootstrap/*.ts | The composition root: createExecutionSystem, createExecutionGateway, createExecutionControl, createConnectorRegistry, createConnectorRoute, createConnectorAuthenticator, createCredentialProvider, createVendorPaymentConnector, createGatewayKeyPair, createGatewayPublicKey, createGatewayIdentity, createNonceStore, createSessionStore, createExecutionAuditSink. Every bootstrap decision described on The gateway and Credential isolation lives here. |
Minimal example
Next
Endpoints
Every route’s request, response, and verified error codes.
Deploy patterns
Storage, keys, and the full environment checklist for running this server.