This is a personal project of an Ecommerce web app based on Event-driven architecture for microservices. The main goal is to build all the Backend, service by service and connect them with asynchronous communication using RabbitMQ.
The communication between client and server use RESTful API endpoint, which is handled by an API Gateway that distribute all the requests to each service.
Currently only User and Order services were built, this it a project to improve and showcase my skills.
This backend web application can scale horizontally using Docker Containers, accordingly to each service needs. Each service is independent from other services, with it's own Database.
All endpoints live under the URL /api/(service-name)/ and then generally follow the REST architecture.
You can skip to how to use clicking here-> Endpoints
All requests must be encoded as JSON with the Content-Type: application/json header. Most responses, including errors, are encoded exclusively as JSON as well.
The User object in `` folder has the following fields:
{
"_id": String,
"username": String,
"password": String,
"role": String,
"orders": Array
}
List all Users and their info
List User info by ID.
Add User from Json body request.
{
"username": "viniciusgf",
"password": "passadmin2",
"role": "admin"
}
Edit User info from specific id inside Json body request
{
"id": "6390cac708a259a1a8158a1e",
"username": "newusername",
"password": "newpassword"
}
Delete User by ID.
The Order object in `` folder has the following fields:
{
"_id": String,
"user": String,
"totalPrice": Number,
"products": Array
}
List all orders and their info
List order info by ID.
Add order from Json body request.
{
"user": "vini",
"totalPrice": 2000,
"products": ["TV", "Notebook"]
}
Edit order info from specific id inside Json body request
{
"id": "6390cac708a259a1a8158a1e",
"user": "vinicius",
"totalPrice": 2200,
"products": ["Iphone", "Notebook"]
}
Delete order by ID.