Welcome to the Content Platform project, a system designed to facilitate communication between microservices through a loosely coupled microservice communication messaging system. This project leverages RabbitMQ and MassTransit for messaging and employs a vertical slice architecture built on ASP.NET Core Web API.
The Content Platform system comprises two main services:
-
Newsletter.Api
- Create Article: Allows you to create a new article.
- Get Article: Fetch the details of an existing article using its ID.
-
Newsletter.Reporting.Api
- Aggregating Data: Gathers data about newsletters and events related to specific articles.
A contract project is utilized to represent the messages being transmitted over RabbitMQ.
To get started with using the Content Platform, follow the steps below:
Ensure you have the following installed:
Clone the repository to your local machine and navigate to the project directory:
git clone https://github.com/EziamakaNV/ContentPlatform.git
cd ContentPlatform
To facilitate the orchestration of the Docker containers during development, Docker Compose is used. The necessary files are included in the project repository.
In the project root directory, execute the following command to build and run the services:
docker-compose up --build
Access the service's Swagger documentation at Newsletter.Api Swagger to test the endpoints.
Make a POST request to api/articles
to create a new article. Upon successful creation, the article ID will be returned.
Use the GET endpoint api/articles/{Id}
with the returned article ID to fetch the details of the article.
Access the service's Swagger documentation at Newsletter.Reporting.Api Swagger to test the endpoints.
Using the article ID obtained from the Newsletter.Api service, you can fetch detailed information about the events related to that article.
To test the functionalities of the services, use the Swagger UI to perform the following operations:
-
Newsletter.Api
- Create an article and note down the returned ID.
- Use the ID to get the article details.
-
Newsletter.Reporting.Api
- Use the ID obtained from the Newsletter.Api service to get details about the events concerning that article.