Skip to content

Microservices framework

Proto is the single source of truth

Connectum provides a TypeScript service runtime for proto contracts, request middleware, security, observability, and operations.

Docs
1.3.x
Compatibility
Runtime matrix

Fits your stack

Build on ConnectRPC and Protobuf.

ConnectRPC supplies the RPC layer. Connectum adds a shared server lifecycle and optional modules for security, telemetry and events.

  • ConnectRPC
  • gRPC
  • Kubernetes
  • Istio
  • OpenTelemetry
  • RabbitMQ
  • Kafka
  • NATS
  • Redis
  • AMQP
  • Redpanda
  • TypeScript
  • Bun
  • Node.js
  • pnpm

See what Connectum owns → · Runtime requirements and limits →

From contract to handler

Implement your contract in TypeScript.

Define the API in Protobuf, generate its types and implement the handlers as ordinary functions. Register services, middleware and protocols with createServer().

server.ts
typescript
import { createServer } from '@connectum/core';
import { Healthcheck } from '@connectum/healthcheck';
import { createDefaultInterceptors } from '@connectum/interceptors';
import { Reflection } from '@connectum/reflection';
import { greeterService } from './services/greeterService.ts';
const server = createServer({
  services: [greeterService],
  port: 5000,
  protocols: [Healthcheck({ httpEnabled: true }), Reflection()],
  interceptors: createDefaultInterceptors(),
  shutdown: { autoShutdown: true },
});
await server.start();
Monolith1 process
Monolith: 1 processProfile, Users and Avatars share a process. Both calls are in-process. This is an illustration, not live redeployment.Process 01LocallocallocalPProfileserviceUUsersserviceAAvatarsserviceMonolith: 1 processProfile, Users and Avatars share a process. Both calls are in-process. This is an illustration, not live redeployment.Process 01LocallocallocalProfileserviceUsersserviceAvatarsservice

Illustrative deployment diagrams, not live redeployment. Profile calls Users and Avatars. Local and remote are relative to Profile: its process is blue, and remote processes are amber. Each process also has a Local or Remote label. Select a deployment to pause on its complete diagram. Local calls run in-process; remote calls use configured direct RPC transports.

Service calls

Same code.
Different deployments.

Keep your Protobuf contracts and service handlers. Run services together as a monolith, separately as microservices, or in a hybrid deployment.

A generated catalog supplies the types for ctx.call(). Local registration and configured remote resolvers choose where each call runs.

These diagrams illustrate routing; endpoints, credentials and process deployment remain your configuration.

Start by goal

Choose your next step.

One service lifecycle

Add capabilities through explicit modules.

Use the same startup and shutdown model across services, with only the modules each service needs. Your application keeps its database, business logic and dependency wiring.

  1. 01DefineProto contracts and generated types
  2. 02RunServer lifecycle and transport
  3. 03ProtectConfigured validation, auth and resilience
  4. 04ObserveTraces, metrics, and logs
  5. 05OperateHealth, shutdown, and deployment

For a small RPC endpoint, or when your existing setup already covers these needs, ConnectRPC alone may be enough. Decide whether Connectum fits your service.

Explore modules

Find modules by capability.

Choose a capability, then open its Guide or generated API.

Foundation

Foundation

@connectum/core

Server lifecycle, service registration, configuration, TLS, and in-process clients.

createServer · defineService · createCatalogClient

Foundation

@connectum/interceptors

Error handling, validation, timeouts, resilience, and method-scoped middleware.

createDefaultInterceptors · createMethodFilterInterceptor

Security

Security

@connectum/auth

JWT, gateway, session, internal-service authentication, and authorization.

createJwtAuthInterceptor · createAuthzInterceptor · requireAuthContext

Communication

Communication

@connectum/events

Proto-first publish and subscribe with middleware, retries, and dead-letter handling.

createEventBus · MemoryAdapter · createBroadcastSubscribers

Operations

Operations

@connectum/otel

OpenTelemetry tracing, metrics, logging, providers, and client/server instrumentation.

createOtelInterceptor · initProvider · getLogger

Operations

@connectum/healthcheck

gRPC health protocol, HTTP probes, readiness state, and Kubernetes integration.

Healthcheck · healthcheckManager · ServingStatus

Tooling and testing

Tooling and testing

@connectum/cli

Service scaffolding, service generation, version inspection, and reflection-based proto sync.

connectum init · connectum generate service · connectum proto sync

Tooling and testing

@connectum/testing

Supported test servers, local transports, parity helpers, collectors, and assertions.

createTestServer · withTestServer · createLocalClient

Tooling and testing

@connectum/test-fixtures

Low-level mock factories and protobuf descriptor fixtures for advanced test tooling.

createMockRequest · createFakeService · createMockStream

Understand module boundaries →

Keep moving

From evaluation to operation.