How min-trees/toomeet works
Project Type and Purpose
• This is a full‑blown, Spring Boot–based microservices application (“Student Social Network”) for Thu Dau Mot University.
• It follows a microservices architecture: separate, independently deployable services (User, Post, Chat, Group, Notification, Socket, Search, plus an API Gateway and a Config repo).
File Structure Analysis
• Top‐level directories correspond one‑to‑one with services:
• Config (centralized application configuration)
• Gateway (API Gateway)
• User (user management & auth)
• Post (posts, comments, reactions)
• Chat (real‑time messaging domain logic)
• (community/group management)
• Notification (notification creation & persistence)
• Socket (WebSocket endpoint, event listeners)
• Search (search functionality)
• Each service is a Spring Boot project (pom.xml, src/main/java, src/main/resources).
• Inter‐service communication is both synchronous (REST calls) and asynchronous (RabbitMQ).
• Dockerfiles at each service + docker-compose (in Post) + Docker Swarm for orchestration.
Key Architecture Insights from README
• API Gateway: authentication, rate limiting, routing.
• User Service: primary source of truth for user data and JWT generation/validation.
• Inter‑service communication: RabbitMQ for events (Saga pattern for transactional consistency), direct REST for queries.
• Real‑time features: Socket service handles WebSocket connections, listens on RabbitMQ events for chat, notifications, group updates.
• Deployment: Docker Swarm, service discovery via built‑in DNS, monitored by Portainer.