# seongjongho/hobbytalk architecture

> Architecture diagram of the GitHub repository seongjongho/hobbytalk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/seongjongho/hobbytalk
- Repository: https://github.com/seongjongho/hobbytalk

## Overview

HobbyTalk is an open-chat service for hobby communities, with account authentication, category browsing, room creation and joining, and real-time chat. The main user path is HTTP or WebSocket entry into presentation handlers, followed by application facades/services and persistence or Redis-backed state. The tree and README establish MySQL, Redis, JWT, and WebSocket capabilities; sampled controller and service excerpts show selected calls. Several room, messaging, and authentication internals were not sampled, so their unverified links are dashed and have no evidence path.

Main entry points: [`api/src/main/java/com/jongho/user/application/service/UserService.java`](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/user/application/service/UserService.java) (User services), [`api/src/main/java/com/jongho/openChat/presentation/controller/OpenChatRoomController.java`](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/presentation/controller/OpenChatRoomController.java) (Room API), [`api/src/main/java/com/jongho/openChat/application/facade/OpenChatRoomFacade.java`](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/facade/OpenChatRoomFacade.java) (Room facade), [`api/src/main/java/com/jongho/user/presentation/controller/UserController.java`](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/user/presentation/controller/UserController.java) (User API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Accounts and auth"]
  node_user_api["User API"]
  node_user_facades["User facades"]
  node_user_service["User services<br/>[UserService.java]"]
  node_auth_service["Auth service"]
  node_user_store[("User persistence")]
end

subgraph group_discovery["Category discovery"]
  node_category_api["Category API"]
  node_category_service["Category service"]
  node_category_store[("Category persistence")]
end

subgraph group_rooms["Open chat rooms"]
  node_room_api["Room API"]
  node_room_facade["Room facade"]
  node_room_service["Room service"]
  node_membership["Membership requests"]
  node_room_store[("Room persistence")]
  node_room_redis_service["Room Redis service"]
  node_room_redis[("Room Redis data")]
end

subgraph group_messaging["Realtime messaging"]
  node_ws_handlers["WebSocket handlers"]
  node_ws_facades["WebSocket facades"]
  node_chat_service["Chat services"]
  node_chat_redis_service["Chat Redis service"]
  node_batch["Chat batch processing"]
end

subgraph group_shared["Shared infrastructure"]
  node_redis[("Redis")]
  node_mysql[("MySQL")]
  node_auth_interceptors["Auth interceptors"]
  node_custom_cache["Custom cache"]
end

node_member(("Member"))
node_http(("HTTP client"))
node_chat_client(("Chat participant"))

node_member -->|"uses"| node_http
node_http -->|"sends requests"| node_user_api
node_user_api -->|"delegates to"| node_user_facades
node_user_facades -.->|"coordinates"| node_user_service
node_user_service -.->|"persists users"| node_user_store
node_user_service -.->|"authenticates"| node_auth_service
node_category_api -->|"calls"| node_category_service
node_category_service -->|"queries"| node_category_store
node_http -.->|"browses categories"| node_category_api
node_http -->|"manages rooms"| node_room_api
node_room_api -->|"delegates actions"| node_room_facade
node_room_api -->|"updates notice"| node_room_service
node_room_facade -.->|"coordinates"| node_room_service
node_room_facade -.->|"handles requests"| node_membership
node_room_service -->|"reads and writes"| node_room_store
node_room_redis_service -->|"delegates Redis access"| node_room_redis
node_room_redis -.->|"stores room state"| node_redis
node_room_store -.->|"stores records"| node_mysql
node_chat_client -->|"sends chat messages"| node_ws_handlers
node_ws_handlers -.->|"dispatches"| node_ws_facades
node_ws_facades -.->|"coordinates chat"| node_chat_service
node_chat_service -.->|"uses chat cache"| node_chat_redis_service
node_chat_redis_service -.->|"stores chat state"| node_redis
node_batch -.->|"processes batches"| node_redis
node_auth_interceptors -.->|"guards requests"| node_user_api
node_custom_cache -.->|"caches results"| node_redis

click node_user_api "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/user/presentation/controller/UserController.java"
click node_user_facades "https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/user/application/facade"
click node_user_service "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/user/application/service/UserService.java"
click node_auth_service "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/user/application/service/AuthUserService.java"
click node_user_store "https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/user/infra/repository"
click node_category_api "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/category/presentation/controller/CategoryController.java"
click node_category_service "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/category/application/service/CategoryService.java"
click node_category_store "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/category/infra/repository/CategoryRepository.java"
click node_room_api "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/presentation/controller/OpenChatRoomController.java"
click node_room_facade "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/facade/OpenChatRoomFacade.java"
click node_room_service "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomService.java"
click node_membership "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomMembershipRequestService.java"
click node_room_store "https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/openChat/infra/repository"
click node_room_redis_service "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomRedisService.java"
click node_room_redis "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/infra/cache/OpenChatRoomRedisRepository.java"
click node_ws_handlers "https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/openChat/presentation/handler"
click node_ws_facades "https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/openChat/application/facade"
click node_chat_service "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatService.java"
click node_chat_redis_service "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatRedisService.java"
click node_batch "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/infra/job/OpenChatBatchRunner.java"
click node_auth_interceptors "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/common/interceptor/AuthInterceptor.java"
click node_custom_cache "https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/common/cache/CustomCacheManager.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user_api,node_user_facades,node_user_service,node_auth_service,node_user_store,node_http toneBlue
class node_category_api,node_category_service,node_category_store toneAmber
class node_room_api,node_room_facade,node_room_service,node_membership,node_room_store,node_room_redis_service,node_room_redis toneMint
class node_ws_handlers,node_ws_facades,node_chat_service,node_chat_redis_service,node_batch toneRose
class node_redis,node_mysql,node_auth_interceptors,node_custom_cache,node_member,node_chat_client toneIndigo
```

## Components

### Accounts and auth

- [User API](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/user/presentation/controller/UserController.java): `api/src/main/java/com/jongho/user/presentation/controller/UserController.java`
- [User facades](https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/user/application/facade): `api/src/main/java/com/jongho/user/application/facade`
- [User services](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/user/application/service/UserService.java): `api/src/main/java/com/jongho/user/application/service/UserService.java`
- [Auth service](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/user/application/service/AuthUserService.java): `api/src/main/java/com/jongho/user/application/service/AuthUserService.java`
- [User persistence](https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/user/infra/repository): `api/src/main/java/com/jongho/user/infra/repository`

### Category discovery

- [Category API](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/category/presentation/controller/CategoryController.java): `api/src/main/java/com/jongho/category/presentation/controller/CategoryController.java`
- [Category service](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/category/application/service/CategoryService.java): `api/src/main/java/com/jongho/category/application/service/CategoryService.java`
- [Category persistence](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/category/infra/repository/CategoryRepository.java): `api/src/main/java/com/jongho/category/infra/repository/CategoryRepository.java`

### Open chat rooms

- [Room API](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/presentation/controller/OpenChatRoomController.java): `api/src/main/java/com/jongho/openChat/presentation/controller/OpenChatRoomController.java`
- [Room facade](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/facade/OpenChatRoomFacade.java): `api/src/main/java/com/jongho/openChat/application/facade/OpenChatRoomFacade.java`
- [Room service](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomService.java): `api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomService.java`
- [Membership requests](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomMembershipRequestService.java): `api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomMembershipRequestService.java`
- [Room persistence](https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/openChat/infra/repository): `api/src/main/java/com/jongho/openChat/infra/repository`
- [Room Redis service](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomRedisService.java): `api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomRedisService.java`
- [Room Redis data](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/infra/cache/OpenChatRoomRedisRepository.java): `api/src/main/java/com/jongho/openChat/infra/cache/OpenChatRoomRedisRepository.java`

### Realtime messaging

- [WebSocket handlers](https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/openChat/presentation/handler): `api/src/main/java/com/jongho/openChat/presentation/handler`
- [WebSocket facades](https://github.com/seongjongho/hobbytalk/tree/main/api/src/main/java/com/jongho/openChat/application/facade): `api/src/main/java/com/jongho/openChat/application/facade`
- [Chat services](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatService.java): `api/src/main/java/com/jongho/openChat/application/service/OpenChatService.java`
- [Chat Redis service](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/application/service/OpenChatRedisService.java): `api/src/main/java/com/jongho/openChat/application/service/OpenChatRedisService.java`
- [Chat batch processing](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/openChat/infra/job/OpenChatBatchRunner.java): `api/src/main/java/com/jongho/openChat/infra/job/OpenChatBatchRunner.java`

### Shared infrastructure

- **Redis**
- **MySQL**
- [Auth interceptors](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/common/interceptor/AuthInterceptor.java): `api/src/main/java/com/jongho/common/interceptor/AuthInterceptor.java`
- [Custom cache](https://github.com/seongjongho/hobbytalk/blob/main/api/src/main/java/com/jongho/common/cache/CustomCacheManager.java): `api/src/main/java/com/jongho/common/cache/CustomCacheManager.java`

### Other components

- **Member**
- **HTTP client**
- **Chat participant**

## Connections

- Member → HTTP client: uses
- HTTP client → User API: sends requests
- User API → User facades: delegates to (evidence: `api/src/main/java/com/jongho/user/presentation/controller/UserController.java`)
- User facades → User services: coordinates
- User services → User persistence: persists users
- User services → Auth service: authenticates
- Category API → Category service: calls (evidence: `api/src/main/java/com/jongho/category/presentation/controller/CategoryController.java`)
- Category service → Category persistence: queries (evidence: `api/src/main/java/com/jongho/category/application/service/CategoryService.java`)
- HTTP client → Category API: browses categories
- HTTP client → Room API: manages rooms
- Room API → Room facade: delegates actions (evidence: `api/src/main/java/com/jongho/openChat/presentation/controller/OpenChatRoomController.java`)
- Room API → Room service: updates notice (evidence: `api/src/main/java/com/jongho/openChat/presentation/controller/OpenChatRoomController.java`)
- Room facade → Room service: coordinates
- Room facade → Membership requests: handles requests
- Room service → Room persistence: reads and writes (evidence: `api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomService.java`)
- Room Redis service → Room Redis data: delegates Redis access (evidence: `api/src/main/java/com/jongho/openChat/application/service/OpenChatRoomRedisService.java`)
- Room Redis data → Redis: stores room state
- Room persistence → MySQL: stores records
- Chat participant → WebSocket handlers: sends chat messages
- WebSocket handlers → WebSocket facades: dispatches (evidence: `api/src/main/java/com/jongho/openChat/presentation/handler/WebSocketOpenChatHandler.java`)
- WebSocket facades → Chat services: coordinates chat
- Chat services → Chat Redis service: uses chat cache
- Chat Redis service → Redis: stores chat state
- Chat batch processing → Redis: processes batches
- Auth interceptors → User API: guards requests
- Custom cache → Redis: caches results
