# fan-mon/frontend architecture

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

- Interactive diagram: https://gitdiagram.com/fan-mon/frontend
- Repository: https://github.com/fan-mon/frontend

## Overview

Fanmon is a React-based entertainment app for fans, artists, and management teams. Users enter through the routed app, then use social features, shop for merchandise, or join one-to-one video fan meetings; management has separate artist, team, goods, and dashboard workflows. The README documents these product areas. Edges are limited to relationships shown in excerpts, the source index, or README; backend behavior is represented as an external service because its implementation is not in this tree.

Main entry points: [`src/App.js`](https://github.com/fan-mon/frontend/blob/dev/src/App.js) (Routed application), [`src/pages/shop/cart/CartList.jsx`](https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/cart/CartList.jsx) (Shopping cart), [`src/pages/shop/buy/Buying.jsx`](https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/buy/Buying.jsx) (Checkout and payment), [`src/pages/meetingroom/StayRoom.jsx`](https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/StayRoom.jsx) (Meeting waiting room)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and community"]
  node_app["Routed application<br/>[App.js]"]
  node_auth["Account access<br/>[Login.jsx]"]
  node_home["Fan home<br/>[Main.jsx]"]
  node_boards["Community boards<br/>[ArtistBoard.jsx]"]
  node_boardpage["Board selection<br/>[BoardPage.jsx]"]
  node_chat["Chat experience<br/>[ChatPage.js]"]
  node_chatroom["Chat room view<br/>[ChatRoom.jsx]"]
  node_subscription["Chat subscriptions<br/>[subscription.js]"]
  node_api["API client<br/>[apiClient.js]"]
end

subgraph group_management["Management"]
  node_managementui["Management dashboard<br/>[DashBoard.jsx]"]
  node_artistmgmt["Artist management<br/>[ArtistDetail.jsx]"]
  node_teammgmt["Team management<br/>[TeamDetail.jsx]"]
  node_goodsadmin["Goods management<br/>[GoodsForm.jsx]"]
end

subgraph group_commerce["Merchandise shop"]
  node_catalog["Goods catalog<br/>[GoodsList.jsx]"]
  node_goodsdetail["Goods details<br/>[GoodsDetail.jsx]"]
  node_cart["Shopping cart<br/>[CartList.jsx]"]
  node_checkout["Checkout and payment<br/>[Buying.jsx]"]
  node_orderresult["Purchase result<br/>[Bought.jsx]"]
end

subgraph group_meetings["Video meetings"]
  node_roomlist["Meeting room list<br/>[StayRoomList.jsx]"]
  node_roomcreate["Create meeting room<br/>[CreateRoom.jsx]"]
  node_waitingroom["Meeting waiting room<br/>[StayRoom.jsx]"]
  node_meeting["Live video meeting<br/>[MeetingRoom.jsx]"]
  node_rtc["WebRTC support<br/>[webRTC.js]"]
end

node_visitor(("Fan or member"))
node_backend["Backend API"]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_boardpage
node_app -->|"routes to"| node_chat
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_cart
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_managementui
node_app -.->|"routes to"| node_roomcreate
node_boardpage -->|"renders"| node_boards
node_chat -->|"renders"| node_chatroom
node_chatroom -->|"loads artist data"| node_subscription
node_visitor -->|"signs in"| node_auth
node_visitor -->|"uses boards"| node_boards
node_visitor -->|"chats"| node_chat
node_visitor -->|"browses goods"| node_catalog
node_catalog -->|"opens details"| node_goodsdetail
node_goodsdetail -.->|"adds to cart"| node_cart
node_cart -->|"starts payment"| node_checkout
node_checkout -.->|"completes purchase"| node_orderresult
node_visitor -->|"manages operations"| node_managementui
node_managementui -->|"fetches metrics"| node_backend
node_artistmgmt -->|"manages artists"| node_backend
node_teammgmt -->|"manages teams"| node_backend
node_goodsadmin -->|"manages goods"| node_backend
node_boards -->|"loads and posts"| node_backend
node_cart -->|"reads and updates cart"| node_backend
node_checkout -->|"saves purchase"| node_backend
node_visitor -->|"joins fan meeting"| node_roomlist
node_roomlist -.->|"selects room"| node_waitingroom
node_roomcreate -->|"creates room"| node_backend
node_waitingroom -->|"loads room details"| node_backend
node_waitingroom -.->|"enters meeting"| node_meeting
node_meeting -->|"uses WebRTC"| node_rtc
node_api -->|"configures API access"| node_backend

click node_app "https://github.com/fan-mon/frontend/blob/dev/src/App.js"
click node_auth "https://github.com/fan-mon/frontend/blob/dev/src/pages/user/Login.jsx"
click node_home "https://github.com/fan-mon/frontend/blob/dev/src/pages/user/Main.jsx"
click node_boards "https://github.com/fan-mon/frontend/blob/dev/src/pages/board/ArtistBoard.jsx"
click node_boardpage "https://github.com/fan-mon/frontend/blob/dev/src/pages/board/BoardPage.jsx"
click node_chat "https://github.com/fan-mon/frontend/blob/dev/src/pages/chat/ChatPage.js"
click node_chatroom "https://github.com/fan-mon/frontend/blob/dev/src/pages/chat/ChatRoom.jsx"
click node_subscription "https://github.com/fan-mon/frontend/blob/dev/src/pages/chat/chatAPI/subscription.js"
click node_managementui "https://github.com/fan-mon/frontend/blob/dev/src/pages/management/DashBoard.jsx"
click node_artistmgmt "https://github.com/fan-mon/frontend/blob/dev/src/pages/management/artist/ArtistDetail.jsx"
click node_teammgmt "https://github.com/fan-mon/frontend/blob/dev/src/pages/management/team/TeamDetail.jsx"
click node_goodsadmin "https://github.com/fan-mon/frontend/blob/dev/src/pages/management/goods/GoodsForm.jsx"
click node_catalog "https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/goods/GoodsList.jsx"
click node_goodsdetail "https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/goods/GoodsDetail.jsx"
click node_cart "https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/cart/CartList.jsx"
click node_checkout "https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/buy/Buying.jsx"
click node_orderresult "https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/buy/Bought.jsx"
click node_roomlist "https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/StayRoomList.jsx"
click node_roomcreate "https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/CreateRoom.jsx"
click node_waitingroom "https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/StayRoom.jsx"
click node_meeting "https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/MeetingRoom.jsx"
click node_rtc "https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/js/webRTC.js"
click node_api "https://github.com/fan-mon/frontend/blob/dev/src/apiClient.js"

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_auth,node_home,node_boards,node_boardpage,node_chat,node_chatroom,node_subscription,node_api toneBlue
class node_managementui,node_artistmgmt,node_teammgmt,node_goodsadmin toneAmber
class node_catalog,node_goodsdetail,node_cart,node_checkout,node_orderresult,node_backend toneMint
class node_roomlist,node_roomcreate,node_waitingroom,node_meeting,node_rtc toneRose
class node_visitor toneIndigo
```

## Components

### App and community

- [Routed application](https://github.com/fan-mon/frontend/blob/dev/src/App.js): `src/App.js`
- [Account access](https://github.com/fan-mon/frontend/blob/dev/src/pages/user/Login.jsx): `src/pages/user/Login.jsx`
- [Fan home](https://github.com/fan-mon/frontend/blob/dev/src/pages/user/Main.jsx): `src/pages/user/Main.jsx`
- [Community boards](https://github.com/fan-mon/frontend/blob/dev/src/pages/board/ArtistBoard.jsx): `src/pages/board/ArtistBoard.jsx`
- [Board selection](https://github.com/fan-mon/frontend/blob/dev/src/pages/board/BoardPage.jsx): `src/pages/board/BoardPage.jsx`
- [Chat experience](https://github.com/fan-mon/frontend/blob/dev/src/pages/chat/ChatPage.js): `src/pages/chat/ChatPage.js`
- [Chat room view](https://github.com/fan-mon/frontend/blob/dev/src/pages/chat/ChatRoom.jsx): `src/pages/chat/ChatRoom.jsx`
- [Chat subscriptions](https://github.com/fan-mon/frontend/blob/dev/src/pages/chat/chatAPI/subscription.js): `src/pages/chat/chatAPI/subscription.js`
- [API client](https://github.com/fan-mon/frontend/blob/dev/src/apiClient.js): `src/apiClient.js`

### Management

- [Management dashboard](https://github.com/fan-mon/frontend/blob/dev/src/pages/management/DashBoard.jsx): `src/pages/management/DashBoard.jsx`
- [Artist management](https://github.com/fan-mon/frontend/blob/dev/src/pages/management/artist/ArtistDetail.jsx): `src/pages/management/artist/ArtistDetail.jsx`
- [Team management](https://github.com/fan-mon/frontend/blob/dev/src/pages/management/team/TeamDetail.jsx): `src/pages/management/team/TeamDetail.jsx`
- [Goods management](https://github.com/fan-mon/frontend/blob/dev/src/pages/management/goods/GoodsForm.jsx): `src/pages/management/goods/GoodsForm.jsx`

### Merchandise shop

- [Goods catalog](https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/goods/GoodsList.jsx): `src/pages/shop/goods/GoodsList.jsx`
- [Goods details](https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/goods/GoodsDetail.jsx): `src/pages/shop/goods/GoodsDetail.jsx`
- [Shopping cart](https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/cart/CartList.jsx): `src/pages/shop/cart/CartList.jsx`
- [Checkout and payment](https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/buy/Buying.jsx): `src/pages/shop/buy/Buying.jsx`
- [Purchase result](https://github.com/fan-mon/frontend/blob/dev/src/pages/shop/buy/Bought.jsx): `src/pages/shop/buy/Bought.jsx`

### Video meetings

- [Meeting room list](https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/StayRoomList.jsx): `src/pages/meetingroom/StayRoomList.jsx`
- [Create meeting room](https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/CreateRoom.jsx): `src/pages/meetingroom/CreateRoom.jsx`
- [Meeting waiting room](https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/StayRoom.jsx): `src/pages/meetingroom/StayRoom.jsx`
- [Live video meeting](https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/MeetingRoom.jsx): `src/pages/meetingroom/MeetingRoom.jsx`
- [WebRTC support](https://github.com/fan-mon/frontend/blob/dev/src/pages/meetingroom/js/webRTC.js): `src/pages/meetingroom/js/webRTC.js`

### Other components

- **Fan or member**
- **Backend API**

## Connections

- Fan or member → Routed application: opens (evidence: `src/App.js`)
- Routed application → Account access: routes to (evidence: `src/App.js`)
- Routed application → Fan home: routes to (evidence: `src/App.js`)
- Routed application → Board selection: routes to (evidence: `src/App.js`)
- Routed application → Chat experience: routes to (evidence: `src/App.js`)
- Routed application → Goods catalog: routes to (evidence: `src/App.js`)
- Routed application → Shopping cart: routes to (evidence: `src/App.js`)
- Routed application → Checkout and payment: routes to (evidence: `src/App.js`)
- Routed application → Management dashboard: routes to (evidence: `src/App.js`)
- Routed application → Create meeting room: routes to (evidence: `src/App.js`)
- Board selection → Community boards: renders (evidence: `src/pages/board/BoardPage.jsx`)
- Chat experience → Chat room view: renders (evidence: `src/pages/chat/ChatPage.js`)
- Chat room view → Chat subscriptions: loads artist data (evidence: `src/pages/chat/ChatRoom.jsx`)
- Fan or member → Account access: signs in
- Fan or member → Community boards: uses boards
- Fan or member → Chat experience: chats
- Fan or member → Goods catalog: browses goods
- Goods catalog → Goods details: opens details (evidence: `src/pages/shop/goods/GoodsList.jsx`)
- Goods details → Shopping cart: adds to cart
- Shopping cart → Checkout and payment: starts payment (evidence: `src/pages/shop/cart/CartList.jsx`)
- Checkout and payment → Purchase result: completes purchase
- Fan or member → Management dashboard: manages operations
- Management dashboard → Backend API: fetches metrics (evidence: `src/pages/management/DashBoard.jsx`)
- Artist management → Backend API: manages artists (evidence: `src/pages/management/artist/ArtistDetail.jsx`)
- Team management → Backend API: manages teams (evidence: `src/pages/management/team/TeamDetail.jsx`)
- Goods management → Backend API: manages goods (evidence: `src/pages/management/goods/GoodsForm.jsx`)
- Community boards → Backend API: loads and posts (evidence: `src/pages/board/ArtistBoard.jsx`)
- Shopping cart → Backend API: reads and updates cart (evidence: `src/pages/shop/cart/CartList.jsx`)
- Checkout and payment → Backend API: saves purchase (evidence: `src/pages/shop/buy/Buying.jsx`)
- Fan or member → Meeting room list: joins fan meeting
- Meeting room list → Meeting waiting room: selects room
- Create meeting room → Backend API: creates room (evidence: `src/pages/meetingroom/CreateRoom.jsx`)
- Meeting waiting room → Backend API: loads room details (evidence: `src/pages/meetingroom/StayRoom.jsx`)
- Meeting waiting room → Live video meeting: enters meeting
- Live video meeting → WebRTC support: uses WebRTC (evidence: `src/pages/meetingroom/MeetingRoom.jsx`)
- API client → Backend API: configures API access (evidence: `src/apiClient.js`)
