E-commerce com microsserviços | Digital Innovation One
Project developed to use microservices in an e-commerce environment.
- ⚙ Settings
- 💻 Technologies
- 🚀 How to run
Docker, postgresql, and jdk must be installed. To the postgresql create the user: admin and password: admin, port: 5432 to the localhost (port: 5433 to docker). Then create the database with name checkout and payment.
- Java
- Spring Boot
- Spring Cloud Stream (framework for building highly scalable event-driven microservices connected with shared messaging systems)
- Schema Registry (to ensure compatibility between microservice communication)
- PostgreSQL
- Docker
- Apache ZooKeeper (manage all brokers in kafka)
- Apache Kafka (distributed platform of messaging and streaming. Broker: instances of kafka)
- Apache Avro (data serialization)
Cloning the repository
# Cloning repository
git clone https://github.com/antoniosergiojr/ecommerce_digital_innovation_one.git
Running web project
# Accessing web project
cd ecommerce_digital_innovation_one
# Running web project
In the terminal access ecommerce-checkout-api/docker and run docker-compose up --build --force-recreate to build and docker-compose down to destroy.
Run docker ps to check.
run ecommerce-checkout-api and ecommerce-payment-api in your IDE.
Open ecommerce-checkout-frontend/cart.html in your browser, fill in the fields and click buy.
Notes:
-> Access http://localhost:8080/v1/checkout/ in the postman ou insomnia to make a request (POST) in JSON format. To this alter in the class CheckoutResource
@ModelAttribute to @RequestBody.
-> Schema Registry API: http://localhost:8081/subjects/streaming.ecommerce.checkout.created-value/versions/latest