---
title: "tRPC Protocol — Definition & Engineering Context"
description: "tRPC is a protocol that allows developers to build end-to-end type-safe APIs without code generation by sharing TypeScript type definitions between the backend server and frontend client."
canonical: https://erpstack.io/glossary/trpc
markdown_url: https://erpstack.io/glossary/trpc.md
publisher: ERPStack
---

# tRPC Protocol

> **Definition:** tRPC is a protocol that allows developers to build end-to-end type-safe APIs without code generation by sharing TypeScript type definitions between the backend server and frontend client.

## In depth

tRPC eliminates API contract drift. By utilizing the TypeScript compiler, tRPC ensures that if a backend query database model changes, the frontend code fails to build. This guarantees that frontend views match backend data properties, eliminating runtime JSON property undefined crashes.

## How ERPStack applies this

We build all custom admin and user dashboards with tRPC, ensuring complete type safety from our database schemas directly to our React views.

## Related reading

- [Drizzle ORM](https://erpstack.io/glossary/drizzle-orm)
- [API-First Development](https://erpstack.io/glossary/api-first)
