<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-a-modern-grpc-powered-microservice-using-node-js-typescript-and-connect-buf-mte1gefdl" -->

---
title: Building a modern gRPC-powered microservice using...
description: A step-by-step walkthrough from Dopt describing how they built an internal gRPC-powered microservice using Node.js, TypeScript, Connect, and Buf's tooling....
canonical: https://daily.dev/posts/building-a-modern-grpc-powered-microservice-using-node-js-typescript-and-connect-buf-mte1gefdl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect · Buf | daily.dev
og:description: A step-by-step walkthrough from Dopt describing how they built an internal gRPC-powered microservice using Node.js, TypeScript, Connect, and Buf's tooling....
og:url: https://daily.dev/posts/building-a-modern-grpc-powered-microservice-using-node-js-typescript-and-connect-buf-mte1gefdl
og:image: https://api.daily.dev/og/posts/mTe1geFdl.png
og:image:alt: Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect · Buf
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect · Buf

**[Buf Blog](https://daily.dev/sources/buf)** · 17 min read · 0 upvotes · 0 comments

## Summary

A step-by-step walkthrough from Dopt describing how they built an internal gRPC-powered microservice using Node.js, TypeScript, Connect, and Buf's tooling. Covers setting up a pnpm/turborepo monorepo, defining Protobuf schemas and codegen with Buf, building a Fastify-based service, adding a typed client, writing tests with vitest, and wiring up a Postgres database via Prisma. Includes context on why the team chose gRPC and Connect over REST for internal APIs, and a brief discussion of microservices vs monolith tradeoffs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://buf.build/blog/grpc-microservice-with-connect>

## Questions this post answers

### How do I build a gRPC API in Node.js and TypeScript using Connect and Buf?

Use Buf's CLI to define Protobuf schemas and generate TypeScript code, then implement the service with Connect on top of Fastify. A typical setup includes a definition package holding .proto files and generated code, a service package implementing the RPCs, a client package for typed requests, and a test package using vitest. Connect provides first-class TypeScript support for gRPC, unlike most gRPC tooling which targets Java or Go.

_daily.dev surfaces practical Node.js and gRPC tutorials for engineers wiring up new internal services._

### Why would a team choose gRPC with Connect instead of REST for internal Node.js microservices?

Connect makes gRPC's schema-first approach practical in TypeScript, an ecosystem most gRPC tooling ignores in favor of Java or Go. One team found a code-first approach to generating OpenAPI specs painful when building public REST APIs with Fastify and Typebox, and preferred defining Protobuf schemas upfront for internal services where they had more freedom over API design.

_engineers weighing REST versus gRPC for internal services can track real-world tradeoffs on daily.dev._

### Should I start a new backend project with microservices or a monolith?

Start with a monolith, then break out microservices only once a real need is identified, following Martin Fowler's Monolith First approach. One team built their initial product as a monolith to iterate quickly with early customers, later extracting a microservice for analytics because its data was loosely coupled to other services and its storage needs were likely to diverge from the rest of the system.

_developers deciding between monolith and microservice architecture can follow these debates on daily.dev._

## Similar posts on daily.dev

- [gRPC vs REST Is the Wrong Question · Buf](https://daily.dev/posts/grpc-vs-rest-is-the-wrong-question-buf-xe2qehlxz) · Buf Blog · 109 upvotes · 4 comments
- [The modern Protobuf workflow · Buf](https://daily.dev/posts/the-modern-protobuf-workflow-buf-c2m7gywhe) · Buf Blog · 1 upvotes · 0 comments
- [From RPC to gRPC: Understanding Remote Procedure Calls, Protocol Buffers, and Modern Distributed Systems Communication](https://daily.dev/posts/from-rpc-to-grpc-understanding-remote-procedure-calls-protocol-buffers-and-modern-distributed-sys-hdfydjpc0) · freeCodeCamp · 1 upvotes · 0 comments
- [ConnectRPC: Generate Typed SDKs from Your GraphQL API](https://daily.dev/posts/connectrpc-generate-typed-sdks-from-your-graphql-api-cgx6z8ayk) · WunderGraph · 9 upvotes · 0 comments
- [Building Production-Ready tRPC APIs: The TypeScript Alternative to Apollo Federation](https://daily.dev/posts/building-production-ready-trpc-apis-the-typescript-alternative-to-apollo-federation-1sae4hwcq) · InfoQ · 2 upvotes · 0 comments

---

Tags: [#nodejs](https://daily.dev/tags/nodejs), [#typescript](https://daily.dev/tags/typescript), [#microservices](https://daily.dev/tags/microservices), [#grpc](https://daily.dev/tags/grpc), [#prisma](https://daily.dev/tags/prisma)

[View this post on daily.dev](https://daily.dev/posts/building-a-modern-grpc-powered-microservice-using-node-js-typescript-and-connect-buf-mte1gefdl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect · Buf","url":"https://daily.dev/posts/building-a-modern-grpc-powered-microservice-using-node-js-typescript-and-connect-buf-mte1gefdl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-a-modern-grpc-powered-microservice-using-node-js-typescript-and-connect-buf-mte1gefdl"},"datePublished":"2026-08-23T07:20:14.196Z","dateModified":"2026-08-23T07:21:46.399Z","description":"A step-by-step walkthrough from Dopt describing how they built an internal gRPC-powered microservice using Node.js, TypeScript, Connect, and Buf's tooling....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9b3320afaf355ce6c2c20463f7332842?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9b3320afaf355ce6c2c20463f7332842?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Buf Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Buf Blog","logo":"https://media.daily.dev/image/upload/s--2YBgo_Nm--/f_auto,q_auto/v1787469605/logos/buf?_a=BAMAMicg0","url":"https://daily.dev/sources/buf"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-a-modern-grpc-powered-microservice-using-node-js-typescript-and-connect-buf-mte1gefdl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"nodejs,typescript,microservices,grpc,prisma","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Buf Blog","item":"https://daily.dev/sources/buf"},{"@type":"ListItem","position":3,"name":"Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect · Buf"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/building-a-modern-grpc-powered-microservice-using-node-js-typescript-and-connect-buf-mte1gefdl#faq","mainEntity":[{"@type":"Question","name":"How do I build a gRPC API in Node.js and TypeScript using Connect and Buf?","acceptedAnswer":{"@type":"Answer","text":"Use Buf's CLI to define Protobuf schemas and generate TypeScript code, then implement the service with Connect on top of Fastify. A typical setup includes a definition package holding .proto files and generated code, a service package implementing the RPCs, a client package for typed requests, and a test package using vitest. Connect provides first-class TypeScript support for gRPC, unlike most gRPC tooling which targets Java or Go. daily.dev surfaces practical Node.js and gRPC tutorials for engineers wiring up new internal services."}},{"@type":"Question","name":"Why would a team choose gRPC with Connect instead of REST for internal Node.js microservices?","acceptedAnswer":{"@type":"Answer","text":"Connect makes gRPC's schema-first approach practical in TypeScript, an ecosystem most gRPC tooling ignores in favor of Java or Go. One team found a code-first approach to generating OpenAPI specs painful when building public REST APIs with Fastify and Typebox, and preferred defining Protobuf schemas upfront for internal services where they had more freedom over API design. engineers weighing REST versus gRPC for internal services can track real-world tradeoffs on daily.dev."}},{"@type":"Question","name":"Should I start a new backend project with microservices or a monolith?","acceptedAnswer":{"@type":"Answer","text":"Start with a monolith, then break out microservices only once a real need is identified, following Martin Fowler's Monolith First approach. One team built their initial product as a monolith to iterate quickly with early customers, later extracting a microservice for analytics because its data was loosely coupled to other services and its storage needs were likely to diverge from the rest of the system. developers deciding between monolith and microservice architecture can follow these debates on daily.dev."}}]}
```

