An open API service indexing awesome lists of open source software.

https://github.com/fanyicharllson/microservices-initial

Microservices for an online shop using spring boot
https://github.com/fanyicharllson/microservices-initial

java kafka microservices mongodb mysql spring spring-boot

Last synced: 3 months ago
JSON representation

Microservices for an online shop using spring boot

Awesome Lists containing this project

README

          

# Microservices Online Shop

Welcome to the **Microservices Online Shop** project!
This repository contains a modular and scalable online shop backend built with **Spring Boot** using the microservices architecture pattern.

## Overview

This project demonstrates how to build an e-commerce backend using multiple independently deployable microservices. Each service is responsible for specific business capabilities and communicates with others using REST APIs (and optionally messaging for advanced scenarios).

**Key Microservices (Typical Examples):**
- **User Service**: Handles registration, authentication, profile management.
- **Product Service**: Manages product catalog, details, inventory.
- **Order Service**: Processes customer orders, maintains order history.
- **Payment Service**: Integrates payment gateways, manages transactions.
- **Cart Service**: Handles shopping cart operations.
- **Notification Service**: Sends emails, SMS, or push notifications.

## Features

- Modular microservices for common online shop features
- RESTful APIs built with Spring Boot
- Centralized configuration and discovery (Spring Cloud support)
- Secure authentication and authorization (JWT, OAuth, etc.)
- Database integration (JPA/Hibernate)
- Container-ready (Docker support)
- Easy local development

## Architecture

![Microservices Architecture Diagram](https://raw.githubusercontent.com/fanyicharllson/microservices-online-shop/main/docs/architecture-diagram.png)
*Update diagram if available, or remove line if not present.*

Each service runs independently and communicates over HTTP (or messaging). Common patterns like API Gateway, service discovery, centralized logging, and monitoring can be implemented for production deployments.

## Getting Started

### Prerequisites

- Java 17+
- Maven or Gradle
- Docker (optional, for containerized deployment)
- Git

### Clone the Repository

```bash
git clone https://github.com/fanyicharllson/microservices-online-shop.git
cd microservices-online-shop
```

### Build and Run

Each microservice is located in its own directory (e.g., `/user-service`, `/product-service`, etc.).

To build and run a service:
```bash
cd user-service
./mvnw spring-boot:run
```
Repeat for other services as needed.

#### Docker Compose (optional)

If you have a `docker-compose.yml` file, run all services together:
```bash
docker-compose up --build
```

## API Documentation

Each service exposes endpoints via REST.
Use tools like [Swagger/OpenAPI](https://swagger.io/) for auto-generated documentation.
Check `/swagger-ui.html` on each service (if enabled).

## Contributing

Contributions are welcome!
Please open issues and pull requests as needed.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Author

**Fanyicharllson**

---