https://github.com/chrishrb/blog-microservice
A modern, scalable blog platform built with a microservices architecture using Go. This is a learning project designed to demonstrate microservices concepts and best practices.
https://github.com/chrishrb/blog-microservice
go kafka microservice observability
Last synced: 17 days ago
JSON representation
A modern, scalable blog platform built with a microservices architecture using Go. This is a learning project designed to demonstrate microservices concepts and best practices.
- Host: GitHub
- URL: https://github.com/chrishrb/blog-microservice
- Owner: chrishrb
- License: mit
- Created: 2025-05-22T15:00:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-23T06:20:02.000Z (about 1 year ago)
- Last Synced: 2025-12-18T10:55:45.636Z (6 months ago)
- Topics: go, kafka, microservice, observability
- Language: Go
- Homepage:
- Size: 159 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Blog Microservice Platform
A modern, scalable blog platform built with a microservices architecture using Go. **This is a learning project** designed to demonstrate microservices concepts and best practices.
## ๐ Overview
This project implements a complete blog platform with separate services for user management, post handling, and notifications. Each service is independently deployable and communicates through Kafka messaging to ensure reliability and scalability. The platform is built as an educational resource to explore and understand microservice architecture patterns.
## ๐๏ธ Architecture
The platform consists of the following microservices:
- **User Service**: Handles user registration, authentication, and profile management
- **Post Service**: Manages blog posts and comments
- **Notification Service**: Sends email notifications for account verification, password resets, etc.
### Communication
Services communicate asynchronously via Kafka for event-driven operations and directly via HTTP for synchronous API requests.
## โจ Features
- **User Management**
- Registration and account verification
- Authentication with JWT
- Password reset functionality
- Role-based access control
- **Blog Content Management**
- Create, read, update, and delete blog posts
- Comment management
- **Notification System**
- Email notifications
- Customizable templates
## ๐ป Tech Stack
- **Backend**: Go
- **Message Broker**: Kafka
- **API Documentation**: OpenAPI/Swagger
- **Containerization**: Docker
- **Observability**: OpenTelemetry, Jaeger
## ๐ฆ Getting Started
### Prerequisites
- Docker and Docker Compose
- Go 1.21 or higher
### Installation
1. Clone the repository:
```bash
git clone https://github.com/chrishrb/blog-microservice.git
cd blog-microservice
```
2. Start the services using Docker Compose:
```bash
docker-compose up -d
```
3. Access the services:
- User Service API: http://localhost:9410
- Post Service API: http://localhost:9411
- Notification Service: http://localhost:9412
- Swagger UI: http://localhost:8081
- Kafka UI: http://localhost:8082
- Mailpit (Email testing): http://localhost:8025
- Jaeger UI (Tracing): http://localhost:16686
## ๐ API Documentation
The API is documented using OpenAPI/Swagger. You can access the documentation via Swagger UI at http://localhost:8081 after starting the services.
## ๐จโ๐ป Development
### Project Structure
```
blog-microservice/
โโโ user-service/ # User management service
โโโ post-service/ # Post and comment management service
โโโ notification-service/ # Notification delivery service
โโโ internal/ # Shared code between services
โโโ config/ # Configuration files
โโโ docker-compose.yaml # Docker Compose configuration
```
### Building the Services
Build all services:
```bash
make build
```
## ๐งช Testing
Run the tests with:
```bash
make test
```
## ๐ License
This project is licensed under the MIT License - see the LICENSE file for details.