Skip to content

Latest commit

 

History

History
97 lines (67 loc) · 2.42 KB

README.md

File metadata and controls

97 lines (67 loc) · 2.42 KB

skyros

This project demonstrates a Go-based microservices architecture using gRPC and REST

Table of Contents

Project Structure

├── docs                        # API Docs
├── init                        # Init Migration for Database
├── orderservice                # Service for handle order
├── productservice              # Service for handle product
├── gatewayservice         # Service for API Gateway
├── skyrosgrpc                  # Package for Grpc Library
├── userservice                 # Service for handle user
├── docker-compose.yml          # Docker compose file for all service
├── Dockerfile-orderservice     # Docker file for orderservice
├── Dockerfile-productservice   # Docker file for productservice
└── Dockerfile-userservice      # Docker file for userservice

Features

  • gRPC Microservices: Each service is defined using protobuf and communicates via gRPC.
  • Modular Structure: Separation of concerns with independent REST and gRPC entry points.
  • Custom Middleware: Custom Echo middleware for request handling.
  • Unit Testing: Mocks and golden files for testing services and APIs.

Technologies Used

Documentation

Documentation using swagger

Go to docs folder, and run this

go run main.go

and open this link to see the api documentation:

API Docs.

Getting Started

Database Migrations

Using CLI version of https://github.com/golang-migrate/migrate

Running

Make sure to set the .env file (see: .env.example).

To start and stop the Services, run:

make service-up
make service-down

Run migration.

make migrate-up

Dummy User

User Seller

"email": "user-seller@example.com",
"password": "password"

User Buyer

"email": "user-buyer@example.com",
"password": "password"