Skip to content

⚒️ Minimal tRPC API boilerplate for separate BE-FE repositories. Easily publish fully typesafe APIs that any frontend can consume.

License

Notifications You must be signed in to change notification settings

razukc/trpc-api-boilerplate

 
 

Repository files navigation

tRPC API Boilerplate Heisenberg

CI npm version

Minimal tRPC API boilerplate for separate BE-FE repositories. Easily publish fully typesafe APIs that any frontend can consume.

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

  • fork & clone repo
  • npm install
  • make changes to tRPC API & push - new package is released 📦
  • npm install trpc-api-boilerplate in any frontend app 🚀

Example Repo

Example frontend app repository - tRPC Frontend Boilerplate

Avoid publishing package?

If for whatever reason publishing a package is not an option:

  • privacy concerns
  • faster development iterations - skip CI
  • ...

Use:

  • Run npm run trpc-api-export and push code changes. In your frontend app run npm run trpc-api-import.
  • npm link

About

⚒️ Minimal tRPC API boilerplate for separate BE-FE repositories. Easily publish fully typesafe APIs that any frontend can consume.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.0%
  • JavaScript 12.3%
  • Shell 1.7%