https://github.com/sagarmaheshwary/microservices-user-service
https://github.com/sagarmaheshwary/microservices-user-service
docker grpc microservice microservices nestjs nodejs postgres prometheus typeorm
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sagarmaheshwary/microservices-user-service
- Owner: SagarMaheshwary
- License: mit
- Created: 2024-03-20T14:55:03.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-13T16:33:15.000Z (5 months ago)
- Last Synced: 2025-02-13T17:34:04.622Z (5 months ago)
- Topics: docker, grpc, microservice, microservices, nestjs, nodejs, postgres, prometheus, typeorm
- Language: TypeScript
- Homepage:
- Size: 989 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# MICROSERVICES - USER SERVICE
User Service for the [Microservices](https://github.com/SagarMaheshwary/microservices) project.
### TECHNOLOGIES
- NestJS (Typescript)
- gRPC – Serves as the main server for inter-service communication
- PostgreSQL – Stores user data
- TypeORM – ORM (Object-Relational Mapper) for PostgreSQL
- Prometheus Client – Exports default and custom metrics for Prometheus server monitoring### SETUP
Follow the instructions in the [README](https://github.com/SagarMaheshwary/microservices?tab=readme-ov-file#setup) of the main microservices repository to run this service along with others using Docker Compose.
### APIs (gRPC)
Proto files are located in the **src/proto** directory.
| SERVICE | RPC | DESCRIPTION |
| ----------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
| UserService | Store | Create user |
| UserService | FindById | Find user by id |
| UserService | FindByCredential | Find user by email and verify the given password, used by authentication service for user login |
| Health | Check | Custom service health check implementation, similar to [grpc-golang](https://google.golang.org/grpc/health/grpc_health_v1). |### APIs (REST)
| API | METHOD | BODY | Headers | Description |
| -------- | ------ | ---- | ------- | --------------------------- |
| /metrics | GET | - | - | Prometheus metrics endpoint |