QFind anything/
API Reference

Infrastructure

Services, ports, and communication protocols.

Services and ports

ServicePortPurpose
Payment Reconciler API8000Main REST API
LedgerMatch (REST)9000Single-transaction matching
LedgerMatch (gRPC)50051Bulk matching
Keycloak8080Authentication, user management
PostgreSQL (Payment Reconciler)5433Payment Reconciler database
PostgreSQL (LedgerMatch)5434LedgerMatch database
PostgreSQL (Keycloak)Keycloak DB (internal to Docker)
Redis6379BullMQ queues, cache
RedisInsight5540Redis UI (optional)
Mailpit1025 (SMTP), 8025 (UI)Dev email capture for invites and notifications
Ollama11434Local embeddings (when not using OpenAI)

Port 5433 is used for Payment Reconciler DB to avoid conflict with a local PostgreSQL on 5432.

Communication protocols

ProtocolUse
RESTAll client-to-API communication. LedgerMatch single-transaction match.
gRPCLedgerMatch bulk match when tenant has matchStrategy: 'grpc'.
WebhooksOutbound HTTP POST to subscriber URLs with event payloads.
KeycloakOAuth2/JWT. Token exchange, JWKS validation.

Dependencies

DependencyRequiredImpact if unavailable
LedgerMatchYesMatching fails. Health check fails.
PostgreSQLYesAPI cannot start.
RedisYesJobs and queue processing fail.
KeycloakProductionToken exchange and JWT validation for documented integration.
OllamaWhen using Ollama embeddingsLedgerMatch needs embeddings. Use EMBEDDING_PROVIDER=openai + OPENAI_API_KEY as alternative.

Docker Compose layout

When you run docker-compose up, the stack includes:

  • payment-reconciler-db — Payment Reconciler PostgreSQL
  • ledger-match-db — LedgerMatch PostgreSQL
  • ledger-match — LedgerMatch service (built from ../ledger-match-service)
  • ollama — Pulls mxbai-embed-large for embeddings
  • redis — BullMQ and cache
  • keycloak + keycloak-db — Auth (optional for dev)
  • payment-reconciler — The API (runs migrations, seed, start:dev)

The payment-reconciler container starts automatically and runs migrations, Keycloak realm setup, seed, and the dev server. For local development without the full container, you can run only the dependencies (DB, Redis, LedgerMatch, Keycloak) and run the API locally with npm run start:dev. See Development.

API Reference

For API base URL and authentication, see API Reference Overview.