Skip to content

⚒️ Minimal tRPC frontend boilerplate for separate BE-FE repositories. Easily consume fully typesafe APIs.

License

Notifications You must be signed in to change notification settings

razukc/trpc-fe-boilerplate

 
 

Repository files navigation

tRPC Frontend Boilerplate Heisenberg

CI

Minimal tRPC frontend boilerplate for separate BE-FE repositories. Easily consume fully typesafe APIs.

Monorepos are great, but sometimes we are targeting backend and frontend as separate (mono)repositories:

  • separation/encapsulation of backend and frontend domain (except what must be exposed to both through API).
  • separation of backend and frontend developers (larger teams/companies).
  • separation of backend and frontend CI/CD pipelines, PRs, issues, etc.

... in that case checkout this boilerplate.

Running

Easily set up a local development environment

  • clone repo
  • npm install
  • npm run dev
  • use latest tRPC API in your app 🚀

Import tRPC API

There are 3 ways to import tRPC API types from backend repo:

  1. Install npm package npm i trpc-api-boilerplate - currently set as a default option
  2. Run npm script npm run trpc-api-import and uncomment line
  3. Link backend repo using npm link

Example Repo

Example backend API repository - tRPC API Boilerplate

About

⚒️ Minimal tRPC frontend boilerplate for separate BE-FE repositories. Easily consume fully typesafe APIs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 66.4%
  • JavaScript 32.7%
  • Other 0.9%