# chd000125/msa-studylog architecture

> Architecture diagram of the GitHub repository chd000125/msa-studylog, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chd000125/msa-studylog
- Repository: https://github.com/chd000125/msa-studylog

## Overview

##### Project type and purpose
- This is a full-stack, microservice-based web application (“StudyLog”) offering study group recruitment, management, real-time chat, and a community board.
- The README confirms a five-service MSA: API Gateway, Eureka (discovery), Auth, User, Group, Board services, plus a React/Vite front end.

##### File structure
- Top-level folders:
- server – Eureka discovery server
- gateway – Spring Boot API gateway with custom filters (CORS, JWT)
- auth – authentication service (signup/login/email verification/JWT)
- client – user‐service (user CRUD, admin, scheduled account deletion)
- – study‐group service (scheduling, WebSocket chat, curriculum, TODOs)
- board – free board service (posts, comments, tags, Elasticsearch indexing)
- front – React/Vite SPA (Redux, React Router, API clients)
- Each service is a standalone Spring Boot app with its own build.gradle, src/main/java, application.properties, and JPA repositories.
- Board uses Elasticsearch; Redis is in the tech stack (likely caching or session store); each service uses MySQL via JPA.

##### README for additional insights
- Confirms ports and roles: gateway-9090, user-8921, auth-8922, group-8787, board-8123.
- Highlights Dockerized Elasticsearch, Redis, MySQL.
- Mentions Swagger for API docs, WebSocket for real-time chat.

## Diagram (Mermaid)

```mermaid
flowchart TB
    Frontend["SPA (React/Vite)"]:::frontend
    Gateway["API Gateway\n(port 9090)"]:::frontend
    Eureka["Eureka Discovery\n(port 8761)"]:::infra
    Auth["Auth Service\n(port 8922)"]:::service
    User["User Service\n(port 8921)"]:::service
    Group["Group Service\n(port 8787)"]:::service
    Board["Board Service\n(port 8123)"]:::service

    MySQLAuth[(MySQL Auth)]:::db
    MySQLUser[(MySQL User)]:::db
    MySQLGroup[(MySQL Group)]:::db
    MySQLBoard[(MySQL Board)]:::db
    Redis[(Redis Cache)]:::infra
    ES[(Elasticsearch)]:::infra

    Frontend -->|"HTTP/WS"| Gateway
    Gateway -->|"Service Discovery"| Eureka
    Gateway -->|"REST API Calls"| Auth
    Gateway -->|"REST API Calls"| User
    Gateway -->|"REST API Calls"| Group
    Gateway -->|"REST API Calls"| Board

    Auth -->|"Cache / Token Store"| Redis
    Auth -->|"CRUD"| MySQLAuth
    User -->|"CRUD"| MySQLUser
    Group -->|"CRUD / Chat"| MySQLGroup
    Board -->|"CRUD"| MySQLBoard
    Board -->|“Async Index”| ES

    click Eureka "https://github.com/chd000125/msa-studylog/blob/main/server/src/main/java/com/example/eurekaServer/EurekaServerApplication.java"
    click Gateway "https://github.com/chd000125/msa-studylog/tree/main/gateway/src/main/java/com/example/gateway"
    click Auth "https://github.com/chd000125/msa-studylog/tree/main/auth/src/main/java/com/studylog/auth"
    click User "https://github.com/chd000125/msa-studylog/tree/main/client/src/main/java/com/studylog/users"
    click Group "https://github.com/chd000125/msa-studylog/tree/main/group/src/main/java/com/example/studygroupservice"
    click Board "https://github.com/chd000125/msa-studylog/tree/main/board/src/main/java/com/example/lastdance"
    click Frontend "https://github.com/chd000125/msa-studylog/tree/main/front/src"

    classDef frontend fill:#ADD8E6,stroke:#036,stroke-width:2px
    classDef service fill:#90EE90,stroke:#063,stroke-width:2px
    classDef infra fill:#FFA500,stroke:#a60,stroke-width:2px
    classDef db fill:#F5DEB3,stroke:#a65,stroke-width:2px
```
