# hrgd-cdc/hg-cdc-team architecture

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

- Interactive diagram: https://gitdiagram.com/hrgd-cdc/hg-cdc-team
- Repository: https://github.com/hrgd-cdc/hg-cdc-team

## Overview

CDC (씨다씨) is a location-aware community application for sharing posts, interacting through comments and likes, and managing user accounts. The user workflow runs from the React routes and screens through hooks and an HTTP client to NestJS controllers and domain services, which persist users and posts and can upload images to Azure Blob Storage. The source excerpts support the main auth and post flows; the README also documents an AI location service, but its implementation details are not shown.

Main entry points: [`frontend/src/api/axios.jsx`](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/api/axios.jsx) (HTTP client), [`frontend/src/pages/Post/PostDetail/PostDetail.jsx`](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/pages/Post/PostDetail/PostDetail.jsx) (Post detail), [`frontend/src/App.jsx`](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/App.jsx) (Route shell), [`backend/src/auth/auth.service.ts`](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/auth/auth.service.ts) (Auth service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Route shell<br/>[App.jsx]"]
  node_authpages["Account screens"]
  node_authhook["Auth state<br/>[useAuth.jsx]"]
  node_postpages["Post screens"]
  node_postdetail["Post detail<br/>[PostDetail.jsx]"]
  node_posthook["Post state<br/>[usePost.jsx]"]
  node_commenthook["Comment state<br/>[useComment.jsx]"]
  node_likehook["Like state<br/>[useLike.jsx]"]
  node_mapview["Map view<br/>[KaKaoMap.jsx]"]
  node_http["HTTP client<br/>[axios.jsx]"]
end

subgraph group_api["Backend API"]
  node_authapi["Auth routes<br/>[auth.controller.ts]"]
  node_authservice["Auth service<br/>[auth.service.ts]"]
  node_postapi["Post routes<br/>[post.controller.ts]"]
  node_commentapi["Comment routes"]
  node_likeapi["Like routes<br/>[like.controller.ts]"]
end

subgraph group_domain["Community domain"]
  node_postservice["Post service<br/>[post.service.ts]"]
  node_commentservice["Comment service<br/>[comment.service.ts]"]
  node_likeservice["Like service<br/>[like.service.ts]"]
  node_userstore[("User records<br/>[user.entity.ts]")]
  node_poststore[("Post records<br/>[post.entity.ts]")]
  node_commentstore[("Comment records<br/>[comment.entity.ts]")]
  node_likestore[("Like records<br/>[like.entity.ts]")]
end

subgraph group_integrations["External services"]
  node_blobservice["Blob uploads"]
  node_azureblob[("Azure Blob")]
  node_ai["AI location service<br/>[app.py]"]
end

node_visitor(("User"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_authpages
node_app -->|"routes to"| node_postpages
node_authpages -->|"uses"| node_authhook
node_authhook -->|"requests"| node_http
node_postpages -->|"uses"| node_posthook
node_postdetail -->|"loads posts"| node_posthook
node_postdetail -->|"manages comments"| node_commenthook
node_postdetail -->|"toggles likes"| node_likehook
node_postdetail -->|"renders"| node_mapview
node_posthook -->|"requests"| node_http
node_commenthook -->|"requests"| node_http
node_likehook -->|"requests"| node_http
node_http -->|"calls auth routes"| node_authapi
node_http -->|"calls post routes"| node_postapi
node_http -->|"calls comment routes"| node_commentapi
node_http -->|"calls like routes"| node_likeapi
node_authapi -->|"delegates"| node_authservice
node_authservice -->|"reads and writes"| node_userstore
node_authservice -->|"uploads profile image"| node_blobservice
node_postapi -->|"delegates"| node_postservice
node_postservice -->|"reads and writes"| node_poststore
node_postservice -->|"uploads post image"| node_blobservice
node_commentapi -->|"delegates"| node_commentservice
node_commentservice -->|"reads and writes"| node_commentstore
node_likeapi -->|"delegates"| node_likeservice
node_likeservice -->|"reads and writes"| node_likestore
node_blobservice -->|"stores files"| node_azureblob
node_visitor -.->|"queries location"| node_ai

click node_app "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/App.jsx"
click node_authpages "https://github.com/hrgd-cdc/hg-cdc-team/tree/main/frontend/src/pages/Auth"
click node_authhook "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/hooks/useAuth.jsx"
click node_postpages "https://github.com/hrgd-cdc/hg-cdc-team/tree/main/frontend/src/pages/Post"
click node_postdetail "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/pages/Post/PostDetail/PostDetail.jsx"
click node_posthook "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/hooks/usePost.jsx"
click node_commenthook "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/hooks/useComment.jsx"
click node_likehook "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/hooks/useLike.jsx"
click node_mapview "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/components/KaKaoMap/KaKaoMap.jsx"
click node_http "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/api/axios.jsx"
click node_authapi "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/auth/auth.controller.ts"
click node_authservice "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/auth/auth.service.ts"
click node_postapi "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/post/post.controller.ts"
click node_postservice "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/post/post.service.ts"
click node_commentapi "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/comment/comment.controller.ts"
click node_commentservice "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/comment/comment.service.ts"
click node_likeapi "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/like/like.controller.ts"
click node_likeservice "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/like/like.service.ts"
click node_userstore "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/auth/entities/user.entity.ts"
click node_poststore "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/post/entities/post.entity.ts"
click node_commentstore "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/comment/entities/comment.entity.ts"
click node_likestore "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/like/entities/like.entity.ts"
click node_blobservice "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/file/file.azure.service.ts"
click node_ai "https://github.com/hrgd-cdc/hg-cdc-team/blob/main/ai/app.py"

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_app,node_authpages,node_authhook,node_postpages,node_postdetail,node_posthook,node_commenthook,node_likehook,node_mapview,node_http,node_visitor toneBlue
class node_authapi,node_authservice,node_postapi,node_commentapi,node_likeapi toneAmber
class node_postservice,node_commentservice,node_likeservice,node_userstore,node_poststore,node_commentstore,node_likestore toneMint
class node_blobservice,node_azureblob,node_ai toneRose
```

## Components

### Web application

- [Route shell](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Account screens](https://github.com/hrgd-cdc/hg-cdc-team/tree/main/frontend/src/pages/Auth): `frontend/src/pages/Auth`
- [Auth state](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/hooks/useAuth.jsx): `frontend/src/hooks/useAuth.jsx`
- [Post screens](https://github.com/hrgd-cdc/hg-cdc-team/tree/main/frontend/src/pages/Post): `frontend/src/pages/Post`
- [Post detail](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/pages/Post/PostDetail/PostDetail.jsx): `frontend/src/pages/Post/PostDetail/PostDetail.jsx`
- [Post state](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/hooks/usePost.jsx): `frontend/src/hooks/usePost.jsx`
- [Comment state](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/hooks/useComment.jsx): `frontend/src/hooks/useComment.jsx`
- [Like state](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/hooks/useLike.jsx): `frontend/src/hooks/useLike.jsx`
- [Map view](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/components/KaKaoMap/KaKaoMap.jsx): `frontend/src/components/KaKaoMap/KaKaoMap.jsx`
- [HTTP client](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/frontend/src/api/axios.jsx): `frontend/src/api/axios.jsx`

### Backend API

- [Auth routes](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/auth/auth.controller.ts): `backend/src/auth/auth.controller.ts`
- [Auth service](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/auth/auth.service.ts): `backend/src/auth/auth.service.ts`
- [Post routes](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/post/post.controller.ts): `backend/src/post/post.controller.ts`
- [Comment routes](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/comment/comment.controller.ts): `backend/src/comment/comment.controller.ts`
- [Like routes](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/like/like.controller.ts): `backend/src/like/like.controller.ts`

### Community domain

- [Post service](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/post/post.service.ts): `backend/src/post/post.service.ts`
- [Comment service](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/comment/comment.service.ts): `backend/src/comment/comment.service.ts`
- [Like service](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/like/like.service.ts): `backend/src/like/like.service.ts`
- [User records](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/auth/entities/user.entity.ts): `backend/src/auth/entities/user.entity.ts`
- [Post records](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/post/entities/post.entity.ts): `backend/src/post/entities/post.entity.ts`
- [Comment records](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/comment/entities/comment.entity.ts): `backend/src/comment/entities/comment.entity.ts`
- [Like records](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/like/entities/like.entity.ts): `backend/src/like/entities/like.entity.ts`

### External services

- [Blob uploads](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/backend/src/file/file.azure.service.ts): `backend/src/file/file.azure.service.ts`
- **Azure Blob**
- [AI location service](https://github.com/hrgd-cdc/hg-cdc-team/blob/main/ai/app.py): `ai/app.py`

### Other components

- **User**

## Connections

- User → Route shell: uses (evidence: `frontend/src/App.jsx`)
- Route shell → Account screens: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Post screens: routes to (evidence: `frontend/src/App.jsx`)
- Account screens → Auth state: uses (evidence: `frontend/src/pages/Auth/Signup/Signup.jsx`)
- Auth state → HTTP client: requests (evidence: `frontend/src/hooks/useAuth.jsx`)
- Post screens → Post state: uses (evidence: `frontend/src/pages/Post/PostCreate/PostCreate.jsx`)
- Post detail → Post state: loads posts (evidence: `frontend/src/pages/Post/PostDetail/PostDetail.jsx`)
- Post detail → Comment state: manages comments (evidence: `frontend/src/pages/Post/PostDetail/PostDetail.jsx`)
- Post detail → Like state: toggles likes (evidence: `frontend/src/pages/Post/PostDetail/PostDetail.jsx`)
- Post detail → Map view: renders (evidence: `frontend/src/components/KaKaoMap/KaKaoMap.jsx`)
- Post state → HTTP client: requests (evidence: `frontend/src/hooks/usePost.jsx`)
- Comment state → HTTP client: requests (evidence: `frontend/src/hooks/useComment.jsx`)
- Like state → HTTP client: requests (evidence: `frontend/src/hooks/useLike.jsx`)
- HTTP client → Auth routes: calls auth routes
- HTTP client → Post routes: calls post routes
- HTTP client → Comment routes: calls comment routes
- HTTP client → Like routes: calls like routes
- Auth routes → Auth service: delegates (evidence: `backend/src/auth/auth.controller.ts`)
- Auth service → User records: reads and writes (evidence: `backend/src/auth/auth.service.ts`)
- Auth service → Blob uploads: uploads profile image (evidence: `backend/src/auth/auth.service.ts`)
- Post routes → Post service: delegates (evidence: `backend/src/post/post.controller.ts`)
- Post service → Post records: reads and writes (evidence: `backend/src/post/post.service.ts`)
- Post service → Blob uploads: uploads post image (evidence: `backend/src/post/post.service.ts`)
- Comment routes → Comment service: delegates (evidence: `backend/src/comment/comment.controller.ts`)
- Comment service → Comment records: reads and writes (evidence: `backend/src/comment/comment.service.ts`)
- Like routes → Like service: delegates (evidence: `backend/src/like/like.controller.ts`)
- Like service → Like records: reads and writes (evidence: `backend/src/like/like.service.ts`)
- Blob uploads → Azure Blob: stores files (evidence: `backend/src/file/file.azure.service.ts`)
- User → AI location service: queries location (evidence: `README.md`)
