How shubhtr/grpc-typescript-complete works
Project Type: This is a microservices-based application that uses gRPC for communication between client and server components, with two main services: Greeter and User Service.
Main Components
a. Client Layer:
• A "gRPC Client" component containing:
• Greeter Client Service
• User Client Service
• Proto-generated client stubs (highlight the proto folder)
• Different user operations (GetUser, CreateUsers, GetUsers)
b. Server Layer:
• A "gRPC Server" component containing:
• Greeter Service Implementation
• User Service Implementation
• Proto-generated server stubs
• Connection to the database (from db.ts)
c. Protocol Buffer Definitions:
• helloworld.proto
• user.proto
Component Relationships
• Proto files feeding into both client and server through build scripts
• Database connection from the server
Specific Implementation Details
• Blue: Client-side components
• Green: Server-side components
• Yellow: Proto definitions
• Purple: Database
• Gray: Build/compilation processes
[Proto Definitions Layer]
• ↓ ↓
• (build scripts)
• ↓ ↓
[Client Layer] ←→ [Server Layer] → [Database]
Additional Elements
a. Technology Stack Indicators:
• TypeScript
• gRPC
• Node.js
• Protocol Buffers
b. Service Definitions:
• User Service:
• GetUser
• CreateUsers
• GetUsers
• Greeter Service:
• SayHello
Implementation Notes
• Notes about the proto compilation process
• TypeScript compilation flow
Architectural Patterns to Highlight
• Service-oriented architecture (SOA)
• RPC communication pattern
• Clear separation between client and server
• Protocol Buffer contract-first approach