ECommerceWebhook is a lightweight microservice designed for managing webhooks in an e-commerce system. It listens for specific events and notifies pre-registered URLs via HTTP POST requests. The application follows a clean and maintainable hexagonal architecture.
To run this application, you need:
- .NET 8 (tested with version 8.0.12)
- Docker (optional for containerization)
git clone https://github.com/bartekbiz/ECommerceWebhook.git
cd ECommerceWebhook
dotnet run --project ECommerceWebhook.Api
dotnet run --project ECommerceWebhook.Api --environment Production
docker build -t ecommerce-webhook .
docker run -p 8080:8080 ecommerce-webhook
The application will be accessible at http://localhost:8080
.
This project includes Swagger (OpenAPI) documentation for easy API exploration. To use is follow the steps:
- Start the application.
- Navigate to: http://localhost:8080/swagger
The solution includes unit tests and you can run them using:
dotnet test
This project follows Hexagonal Architecture (Ports and Adapters) for maintainable and scalable development.
Solution
├── ECommerceWebhook.Api (input adapter)
│ └── Controllers
├── ECommerceWebhook.Application (business logic)
│ └── Services
├── ECommerceWebhook.Domain (domain model and ports)
│ └── Entities
│ └── Ports
├── ECommerceWebhook.Infrastructure (output adapters)
│ └── Repositories
│ └── Notifiers
└── ECommerceWebhook.Tests
This project is licensed under the MIT License. See the LICENSE file for more details.