Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 2.66 KB

README.md

File metadata and controls

73 lines (47 loc) · 2.66 KB

Go Microservices Project 🚀

Welcome to the Go Microservices Project! This repository contains a collection of microservices built with Go for practice. The project demonstrates a microservices architecture built with Go, Docker, and RabbitMQ. Each service is self-contained and serves a specific purpose in the larger architecture. Navigate to each service to learn more!

Microservices Image

Services Overview 🧩

  • Broker Service - This is the gateway/entry point to our system. Clients interact with this service and the request is forwarded to the respective service through HTTP request or through a rabbit MQ queue.
  • Authentication Service - The authentication service connects to a postgres database and just authenticate the credentials received with the credentials saved in the database.
  • Logger Service - The logger service is used to log important request data to a postgres database that is connected to.
  • Listener Service - The listener is a dedicated service for setting up the rabbit queues and binds the routing key to the queues. It also redirects the message to respective services.
  • Payment Service - The payment service is a experimental service used to learn how to intergrate the stripe card payment into the system.

Tech Stack 🛠️

  • Go: Backend services.
  • gRPC: Service communication.
  • Docker: Containerization.
  • RabbitMQ: Message broker.

Explore the services by visiting their directories for more details.

Getting Started 🛠️

To get started with the entire project, follow these steps:

  1. Clone the repository

    git clone https://github.com/EmilioCliff/microservices-go

This next step require you to have docker compose installed and to get API keys from your Stripe Account

  1. Create .env files

    At the root directory of the payment service create an .env file and fill the values below.

    STRIPE_SECRET_KEY=
    STRIPE_PUBLISHABLE_KEY=
    WEBHOOK=
    PORT=5000
    

You'll need to create a random user in the authentication postgres db.

  1. Run the services

    docker compose up
  2. Making Request We now cd into the frontend and start the sever with the following command

       cd ./front-end/front-end/cmd/web
       go run main.go
    

    We then go to localhost:8082

    With everything set up we can now start testing our services...😄

Remarks 🤝

Happy Coding

License 📝

This project is licensed under the MIT License.