Skip to content

mkosir/trpc-fe-boilerplate-vite

Repository files navigation

tRPC Frontend Boilerplate Heisenberg

CI

Minimal tRPC frontend Vite boilerplate for projects with separate backend and frontend repositories. Easily consume fully typesafe APIs.

Monorepos are great, but sometimes the architecture requires separating the backend and frontend into distinct repositories.

Why use this?

This boilerplate is ideal when you want to separate:

  • Domain/business logic – expose only what needs to be exposed through the API.
  • Developer responsibilities – for larger teams/companies.
  • CI/CD pipelines – manage PRs, issues, and deployments independently.

Running

Easily set up a local development environment

  • Clone the repo
  • Run npm install
  • Run npm run dev
  • Use the tRPC API package in your app 🚀

Import tRPC API

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

  1. Install the npm package:
    npm install trpc-api-boilerplate
    (currently set as the default option)

  2. Run the script:
    npm run trpc-api-import
    (uncomment this line)

Example Backend Repo

About

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

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •