Skip to content

buraksekili/store-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

store-service

CAVEAT: This repo is still under development. Currently, I am working on these tasks. You can follow the development from branches.

store-service is a microservice-based web application.

The purpose of the development of store-service is to gain hands-on experience in microservices architecture.

Installation

$ git clone https://github.com/buraksekili/store-service.git
$ cd store-service/
$ make
$ make containers
$ make run

Endpoints

  • RabbitMQ Management : localhost:15672/
  • Prometheus: localhost:9090/
  • Grafana: localhost:3000/
  • users: localhost:8282
  • products: localhost:8181

The default username and password are admin for Grafana.

The default ports for users and products are defined in .env file. You can change it via .env, if you need.

Local development

make                        : Compiles all services and saves them into `./build` folder.


make containers             : Creates Docker containers for all compiled services under `./build`.


make <service_name>         : Rebuilds <service_name>.

> For example;
    `make users`

make docker_<service_name>  : Creates a new Docker image for <service_name>.

make run                    : Runs all containers and other services defined in docker-compose.yaml file.

For all possible <service_name>, see Makefile.

Architecture

Service Language
users Go users provides REST endpoints to operate CRUD
operations for users of the store.
It emits a message for RabbitMQ after new user created.
This emitted message is forward to email service which is
responsible to sending emails to the newly added users.
products Go products provides REST endpoints to operate
CRUD operations for products and vendors of the store.
emailer Go emailer sends an email to newly added users.
See .env for required configurations for SMTP.
Note: to field is not required, it is just for testing purposes.

Features

HTTP API Examples

Disclaimer

This project is built for educational purposes. It does not assert to be production ready.

Acknowledgments

Inspired by GCP's microservices demo

Highly influenced by Mainflux

About

Microservice based web app

Resources

Stars

Watchers

Forks

Languages