This repository contains a model of a microservices-based blog application built using C# and Docker Compose. The purpose of this model is to showcase the architectural design and components of a typical microservices application.
- Overview
- Services
- Technologies Used
- Prerequisites
- Installation
- Running the Application
- Endpoints
- License
The microservices blog app model demonstrates the separation of concerns and modular architecture commonly found in microservices-based applications. It consists of multiple services, each responsible for a specific functionality, which work together to provide the overall blog application.
The microservices blog app model consists of the following services:
- Authentication Service: Responsible for user authentication and authorization.
- Post Service: Handles the creation, retrieval, and management of blog posts.
- Comment Service: Manages the comments associated with blog posts.
The application is built using the following technologies:
- Docker: Containerization platform for packaging the application components.
- MongoDB: A NoSQL database used to store blog posts, comments, and user information.
- .NET 6: A cross-platform framework for building microservices and APIs.
- Nginx: A web server used as a reverse proxy to handle routing and load balancing between microservices.
- RabbitMQ: A message broker used for asynchronous communication between microservices.
- gRPC: A high-performance, open-source framework for remote procedure call (RPC) communication.
To run this model locally, you need to have the following software installed on your system:
- .NET Core SDK (version 6.0 or higher)
- Docker
- MongoDB
To get started with the blog microservices app, follow these steps:
- Install Docker on your machine if you haven't already.
- Clone this repository to your local machine.
- Navigate to the project directory.
To run the application, execute the following commands in the project directory:
- Build the Docker images for the microservices:
docker-compose build
- Start the Docker containers:
docker-compose up
- Once the services are up and running, you can interact with the blog application using the provided endpoints.
Each service is implemented as a separate microservice and can communicate with each other through well-defined APIs.
-
Test Authentication Service:
-
Test Post Service:
-
Test Comment Service:
This project is licensed under the MIT License. You are free to modify and use the codebase as per the terms of this license.