gRPC SDK
TypeScript SDK for custom Conduit modules and trusted server-side gRPC clients.
The gRPC SDK (@conduitplatform/grpc-sdk) is the TypeScript toolkit for custom module authors and trusted server-side processes that talk to Conduit over gRPC. Application web and mobile clients use the Client API with user bearer tokens instead.
For AI agents
Do not import the gRPC SDK in browser bundles or call it from user-facing request handlers. End-user apps use REST on the router (CLIENT_BASE_URL). See Client vs Admin API.
When to use
| Use case | Surface |
|---|---|
| Build a custom Conduit module in TypeScript | gRPC SDK (ConduitModule, route/schema helpers) |
| Server worker calling database, storage, communications from a module | grpcSdk clients inside module code |
| Provision schemas, config, admin tasks | Admin API or MCP — not grpc-sdk from app runtime |
| End-user CRUD, auth, chat | Client API |
Installation
npm install @conduitplatform/grpc-sdkWhat the SDK provides
- Module lifecycle —
ConduitModulebase class, initialization hooks, health integration - Service clients — typed
grpcSdkaccessors to database, storage, authentication, communications, and other modules - Schema helpers —
ConduitSchemaand model constructors for module-owned collections - Route registration — register Client API or Admin API routes from module code via
RoutingManager
Usage sketch
Custom module entry
import { ConduitModule } from "@conduitplatform/grpc-sdk";
class MyModule extends ConduitModule {
async initialize() {
// Register routes, subscribe to events, wire grpcSdk clients
}
}Schema definition
import { ConduitSchema } from "@conduitplatform/grpc-sdk";
const OrderSchema = new ConduitSchema("Order", {
total: { type: "Number", required: true },
status: { type: "String", default: "pending" },
});Client API route from a module
this.routeManager.registerRoute({
path: "/my-module/health",
method: "GET",
handler: async (_req, res) => {
res.json({ ok: true });
},
});For exhaustive types and APIs, use the package source and TypeScript definitions in the Conduit monorepo.
v0.17 notes
admin,commons, andcorepackages merged intopackages/core. Depend on@conduitplatform/grpc-sdkand documentedpackages/corepaths only — see Migration v0.16 → v0.17.- Communications — legacy client names (
grpcSdk.email,grpcSdk.sms,grpcSdk.pushNotifications) route to the communications module automatically.
Other languages
Conduit modules can be implemented in any gRPC-compatible language:
- Use proto definitions from the Conduit repository (
packages/commonsprotofiles) - Implement the module service interfaces for your runtime
- Register with core over gRPC
TypeScript teams typically use this SDK; other languages use generated stubs from the same protos.
Related
| Topic | Doc |
|---|---|
| Platform architecture | /docs/learn/architecture |
| Client vs Admin boundary | /docs/learn/client-vs-admin-api |
| Custom modules overview | /docs/modules |
| Communications (grpcSdk sending) | /docs/modules/communications |