A mono repo using turborepo, that demonstrates how to setup a trpc client and server setup. Built two years ago so probably needs to be updated.
- Mono Repo Setup with parallel build & test via turborepo.
- tRPC setup with two APIs and a React client.
- Shared auth package.
- TypeScript setup.
-
Clone the Repository
git clone https://github.com/drobati/trpc-monorepo.git cd trpc-monorepo
-
Install
npm install
-
Run
npm run build npm run dev
- This starts the server on
http://localhost:8000
.
- This starts the server on
-
RPCs Endpoints
- auth/login: Sign in as a user
- message/getMessages: Get messages
- message/addMessage: Add a new message
npm run format
npm run lint
npm run test
The usual
- Fork the repository.
- Create a new branch for your feature:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add a new feature"
- Push to your branch:
git push origin feature-name
- Open a Pull Request.
This project is licensed under the MIT License.