A microservices-based anonymous messaging platform built with Docker and modern web technologies. This project demonstrates DevOps best practices through containerization and orchestration.
Anonymous Forum is a distributed application that allows users to post messages anonymously without creating an account. The project showcases a complete microservices architecture with isolated services, persistent data storage, and secure inter-service communication.
The application consists of 4 independent services:
- API (NestJS): RESTful backend handling message management and business logic
- Thread (React + Vite): Read-only interface displaying all messages in real-time
- Sender (React): Write interface for composing and submitting messages
- Database (MySQL): Persistent data storage with volume management
┌──────────────────────────────────────────────────┐
│ Docker Compose Network │
├──────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Thread │ │ Sender │ │
│ │ (Port 80) │ │ (Port 8080) │ │
│ └─────────────┘ └─────────────┘ │
│ │ │ │
│ └────────────────┴──────┐ │
│ │ │
│ ┌──────────────┐ │
│ │ API │ │
│ │ (Port 3000) │ │
│ └──────────────┘ │
│ │ │
│ ┌──────────────┐ │
│ │ MySQL │ │
│ │ (Port 3306) │ │
│ └──────────────┘ │
│ │
└──────────────────────────────────────────────────┘
- Docker & Docker Compose installed
- Node.js 20+ (for local development)
docker-compose up -dAccess the application:
- Thread (View messages): http://localhost
- Sender (Write messages): http://localhost:8080
- API (Backend): http://localhost:3000
# API
cd api
npm install
npm run start:dev
# Thread
cd thread
npm install
npm run dev
# Sender
cd sender
npm install
npm start| Service | Technology | Purpose |
|---|---|---|
| API | NestJS, TypeORM | Backend, Message Management |
| Thread | React 19, Vite | Read-only UI |
| Sender | React 19 | Write UI |
| Database | MySQL 8 | Data Persistence |
| Orchestration | Docker Compose | Container Management |
- Network Isolation: Database and API isolated in private network
- Data Persistence: MySQL data persisted via Docker volumes
- CORS Configuration: Controlled cross-origin requests
- Input Validation: Class-validator for DTO validation
- Unique Pseudonyms: Prevents duplicate usernames (409 Conflict)
✅ Post anonymous messages with pseudonym
✅ Real-time message display
✅ Unique pseudonym validation
✅ Persistent data storage
✅ Responsive UI
✅ Containerized deployment
- Dockerfiles: Optimized images for each service (multi-stage builds where applicable)
- Docker Compose: Service orchestration with health checks and dependency management
- Volumes: MySQL data persistence (
/var/lib/mysql) - Networks: Two Docker networks for isolation
internal: API & Database (private)frontend: User-facing services
- Environment Variables: Centralized configuration via
.env - Git Workflow: Conventional Commits with Commitizen
forum-anonyme/
├── api/ # NestJS Backend
│ ├── src/
│ │ └── message/ # Message module
│ └── Dockerfile
├── thread/ # React Vite (View)
│ ├── src/
│ ├── vite.config.js
│ └── Dockerfile
├── sender/ # React (Create)
│ ├── src/
│ └── Dockerfile
├── docker-compose.yml
└── package.json
This project demonstrates:
- Microservices architecture design
- Docker containerization best practices
- Docker Compose orchestration
- Network isolation and security
- Data persistence strategies
- Full-stack application deployment
- DevOps workflow implementation
This project was developed as part of a Containerization module exam, implementing DevOps best practices for a microservices application.