tRPC

快速移动,打破一切。使端到端类型安全API变得简单。

README

tRPC

tRPC

快速移动,打破一切。
使端到端类型安全API变得简单。

codecov MIT License Discord
Twitter Twitter

Demo

上面的客户端没有从服务器导入任何代码,只有其类型声明。


简介


tRPC允许您轻松构建和使用成熟的类型安全的API,而无需模式或代码生成。

特征


- ✅  Well-tested and production ready.
- 🧙‍♂️  Full static typesafety & autocompletion on the client, for inputs, outputs, and errors.
- 🐎  Snappy DX - No code generation, run-time bloat, or build pipeline.
- 🍃  Light - tRPC has zero deps and a tiny client-side footprint.
- 🐻  Easy to add to your existing brownfield project.
- 🔋  Batteries included - React.js/Next.js/Express.js/Fastify adapters. _(But tRPC is not tied to React, and there are many community adapters for other libraries)_
- 🥃  Subscriptions support.
- ⚡️  Request batching - requests made at the same time can be automatically combined into one
- 👀  Quite a few examples in the ./examples-folder

快速开始


有几个示例您可以使用它来玩转tRPC或引导新项目。例如,如果您想要Next.js app,可以使用全栈Next.js示例:

全栈Next.js示例快速入门

  1. ```sh
  2. # yarn
  3. yarn create next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
  4. # npm
  5. npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
  6. ```

👉 完整文档参阅 tRPC.io. 👈

Star 历史


tRPC 正在迅速增长!


Star History Chart

核心团队


你想贡献吗?首先,阅读 <a href="https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md">Contributing Guidelines</a> 在打开问题或PR之前,您需要了解分支策略和本地开发环境。如果您需要更多指导或想问更多问题,请随时写信给我们 <a href="https://trpc.io/discord">Discord</a>!



Alex / KATT
👋 Hi, I'm Alex and I am the creator of tRPC, don't hesitate to contact me on Twitter or email if you are curious about tRPC in any way.

项目负责人


领导API设计决策并在开发中发挥最积极作用的人员



Sachin Raja

Alex / KATT

积极贡献者


通过制作PR和审查代码积极帮助改进代码库的人



James Berry

Julius Marminge
Ahmed%20Elsakaan
Ahmed Elsakaan

特别鸣谢



bautistaaa

Theo Browne

赞助商


如果您喜欢与tRPC合作并想支持我,请考虑通过以下方式给予象征性的赞赏 GitHub Sponsors!

此外,如果您的公司使用tRPC并希望支持tRPC的长期维护,请查看赞助级别或[联系](mailto:alex@trpc.io)讨论潜在的伙伴关系。

🥇 金牌赞助商


Cal.com,%20Inc.
Cal.com, Inc.
Render
Render

🥈 白银赞助商


Jason%20Docton
Jason Docton
Ping.gg
Ping.gg
prisma
prisma

🥉 铜牌赞助商


Newfront
Newfront
Dr.%20B
Dr. B
Ryan
Ryan
Snaplet
Snaplet
Echobind
Echobind
Flylance
Flylance
Interval
Interval

😻 个人


J%C3%B6kull%20S%C3%B3lberg%20Au%C3%B0unsson
Jökull Sólberg Auðunsson
Ethan%20Clark
Ethan Clark
nihinihi01
nihinihi01
Sam%20Holmes
Sam Holmes
Max%20Greenwald
Max Greenwald
Memory-Lane-Games
Memory-Lane-Games
Beier%20(Bill)
Beier (Bill)
Timothy%20Cole
Timothy Cole
Lucas%20Viana
Lucas Viana
Faraz%20Patankar
Faraz Patankar
Theo%20Browne
Theo Browne
PatrickJS
PatrickJS
Ron%20Mizrahi
Ron Mizrahi
Illarion%20Koperski
Illarion Koperski
aslaker
aslaker
Hampus%20Kraft
Hampus Kraft
Luis%20Matheus
Luis Matheus
Micha%C5%82%20Kowieski
Michał Kowieski
Daniel%20Yogel
Daniel Yogel
Dmitry%20Maykov
Dmitry Maykov
SchlagerKhan
SchlagerKhan
Christian
Christian
Chris%20Bradley
Chris Bradley
Jan%20Zimmek
Jan Zimmek
Jared%20Wyce
Jared Wyce
Mateo%20Carriqu%C3%AD
Mateo Carriquí
Ahmed%20Elsakaan
Ahmed Elsakaan
Svend%20Aage%20Roperos%20Nielsen
Svend Aage Roperos Nielsen
Isaac%20Way
Isaac Way
Lori%20Karikari
Lori Karikari
Francis%20Provost
Francis Provost
Martin
Martin
Fanvue
Fanvue
Malcolm%20Still
Malcolm Still
Ivan%20Buncic
Ivan Buncic
Thomas%20Ballinger
Thomas Ballinger
Lars%20Karbo
Lars Karbo
Omar%20L%C3%B3pez
Omar López
Simon%20Flack
Simon Flack
Jirka%20Svoboda
Jirka Svoboda
Wyatt%20Schulte
Wyatt Schulte
Andrew%20Brown
Andrew Brown
_P
_P
Joseph%20Lozano
Joseph Lozano
Jonas%20Strassel
Jonas Strassel

所有贡献者 ✨


tRPC由KATT开发, 最初基于colinhacks的概念。


A table of avatars from the project's contributors


Powered by Vercel