Skip to content

mnoella/forum-anonyme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anonymous Forum

A microservices-based anonymous messaging platform built with Docker and modern web technologies. This project demonstrates DevOps best practices through containerization and orchestration.

Overview

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.

Architecture

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) │      │
│                          └──────────────┘      │
│                                                  │
└──────────────────────────────────────────────────┘

Quick Start

Prerequisites

  • Docker & Docker Compose installed
  • Node.js 20+ (for local development)

Run with Docker Compose

docker-compose up -d

Access the application:

Local Development

# API
cd api
npm install
npm run start:dev

# Thread
cd thread
npm install
npm run dev

# Sender
cd sender
npm install
npm start

Technology Stack

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

Security Features

  • 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)

Features

✅ Post anonymous messages with pseudonym
✅ Real-time message display
✅ Unique pseudonym validation
✅ Persistent data storage
✅ Responsive UI
✅ Containerized deployment

DevOps Implementation

  • 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

Project Structure

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

Learning Outcomes

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

About

This project was developed as part of a Containerization module exam, implementing DevOps best practices for a microservices application.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors