rigmas / microservices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

SIMPLE E-COMMERCE
This is prototype of e-commerce microservices backend system.
This microservices backend system built with Go programming language with graphQL as a gateway server and gRPC as a services.

System design and usecase diagram of this backend system is provided on docs folder.

Tech stack: Go, graphQL, gRPC

Getting Started

Prerequisites:

  1. Make sure you have Make in your local environment to run app using Makefile
  2. Make sure you have docker in your local environment
  3. Make sure you're not using port 8989 and 9000 on your other application while running this project

How to Run

  1. Move to base directory project on top of all services (align with docker-compose.yml)
  2. If you have Make run command make up, if not run command docker-compose up --build
  3. Wait until docker image has built
  4. Run example request from e-commerce.postman_collection.json on your postman app or open your chrome browser with this url http://localhost:8989/ then copy the example request into graphql playground schema query
  5. To stop this application, run command make down or docker-compose down

How to Test

This project is consists of unit tests, to run the test you have to install mockery first. See https://github.com/vektra/mockery.
Then, you can go into unit test files *_test.go on your vscode and click on run package tests

Results:

  1. Gateway

    gateway

  2. Customer

    customer

  3. Product

    product

  4. Order

    order

About


Languages

Language:Go 93.2%Language:Dockerfile 6.4%Language:Makefile 0.4%