https://github.com/productdevbook/silgi
The fastest end-to-end type-safe RPC framework for TypeScript — compiled pipelines, single package, every runtime
https://github.com/productdevbook/silgi
api express fastify h3 hono nextjs nitro nuxt openapi rpc sveltekit tanstack-query type-safe typescript websocket
Last synced: 18 days ago
JSON representation
The fastest end-to-end type-safe RPC framework for TypeScript — compiled pipelines, single package, every runtime
- Host: GitHub
- URL: https://github.com/productdevbook/silgi
- Owner: productdevbook
- License: mit
- Created: 2026-03-18T04:55:46.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-25T20:06:05.000Z (18 days ago)
- Last Synced: 2026-04-25T20:16:01.780Z (18 days ago)
- Topics: api, express, fastify, h3, hono, nextjs, nitro, nuxt, openapi, rpc, sveltekit, tanstack-query, type-safe, typescript, websocket
- Language: TypeScript
- Homepage: https://silgi.dev
- Size: 5.23 MB
- Stars: 13
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
End-to-end type-safe RPC framework for TypeScript. Single package — server, client, 15 plugins, 14 adapters. Full docs at [silgi.dev](https://silgi.dev).
## Install
```bash
pnpm add silgi
# or: npm install silgi / yarn add silgi / bun add silgi
```
Requires Node.js `>=24`.
## Minimal example
```ts
import { silgi } from 'silgi'
const k = silgi({
context: (req) => ({ now: Date.now() }),
})
const hello = k.$resolve(({ ctx }) => ({ message: 'hi', at: ctx.now }))
const router = k.router({ hello })
export default k.handler(router)
```
Export `handler` from any Fetch-compatible runtime (Next.js App Router,
SvelteKit, Remix, Astro, SolidStart, Hono, srvx, Bun, Deno, Cloudflare
Workers, AWS Lambda via the hono adapter, …). Dedicated adapters for
Express, Nitro, NestJS, and Node's raw `http` live under
`silgi/express`, `silgi/nextjs`, `silgi/sveltekit`, etc.
Run a standalone server:
```ts
await k.serve(router, { port: 3000 })
```
## Documentation
- **[silgi.dev](https://silgi.dev)** — user guide, recipes, API reference.
- [`CONTRIBUTING.md`](./CONTRIBUTING.md) — dev setup, commands, PR checklist.
- [`ARCHITECTURE.md`](./ARCHITECTURE.md) — request pipeline, module layout, performance invariants.
- [`SECURITY.md`](./SECURITY.md) — threat model, reporting policy, security features.
- [`docs/rfcs/0001-de-magic.md`](./docs/rfcs/0001-de-magic.md) — the
refactor that removed module-global mutable state, explicit schema
converter injection, and per-instance context bridges.
## Credits
- [oRPC](https://github.com/unnoq/orpc) — Pipeline architecture, client proxy, error handling, contract-first workflow
- [tRPC](https://github.com/trpc/trpc) — Router/procedure model, end-to-end type inference
- [Elysia](https://github.com/elysiajs/elysia) — Sucrose-style static handler analysis
## License
MIT