DEV Community

Andrea Mucci
Andrea Mucci

Posted on

Microservices E-commerce Boutique Tutorial — Part 1

Welcome to the Minos Framework tutorial.
The idea of ​​this tutorial is to create an Online E-commerce Boutique with Minos cloud-native microservices.
The project consists of an application of 9-tier microservices. The final result will be an API REST that will allow you to perform the basic operations of an e-commerce.
Ecommerce Architecture View
What is Minos
Minos is a framework that helps you create reactive microservices in Python. Internally, it leverages Event Sourcing, CQRS and a message-driven architecture to fulfill the commitments of an asynchronous environment.
Requirements

  • python 3.9+
  • Poetry
  • Docker and docker-compose

Installation
install the minos-cli

$:(venv)> pip install minos-cli

Create the Project

$:(venv)> minos new project myboutique

The cli will ask you:

  • the name of the project ( myboutique )
  • the description of the project ( My fantastic online boutique )
  • The version ( 0.1.0 ), is not necessary to modify this information during the quickstart

With this, the project structure is created, now we will configure the database and the broker message.
Go to the myboutique folder and let’s start by configuring the database.

$:(venv)> minos set database postgres

The CLI will ask:

  • where do we want to deploy our project? for this project we will use docker-compose
  • Where will be PostgreSQL database hosted? we have two options self-hosted and remote.
    • Self-Hosted: which mean that we install a POD in our kubernetes, which is our case.
    • Remote: this option would be if we already have a PostgreSQL instance in our laptop or in a remote server. Select self-hosted option.

Now we will continue by configuring the broker service

$:(venv)> minos set broker kafka

the CLI will ask if we want to use a self-hosted or a remote Kafka broker, we choose self-hosted option.

Deploy the project
before we start creating the microservices, we have to test our project and deploy the project.

$:(venv)> docker-compose up

after some time, we will see the required services already up.
Now, finally, we can create the first Microservice.

If you found this article interesting, then remember to leave a star in the Minos repository

Top comments (0)