# 架构设计

本章节介绍 FastBee 社区版的整体架构和核心组件设计。

## 架构概览

```mermaid
%%{init: {"flowchart": {"htmlLabels": false}}}%%
flowchart LR
  Device["设备<br/>MQTT / GB28181"]
  Broker["MQTT Broker<br/>Netty TCP:1883 WS:8083"]
  SIP["SIP Server<br/>GB/T 28181 UDP:5061"]
  API["REST API<br/>Spring Boot :8080"]
  DB["数据存储<br/>MySQL / Redis"]
  Media["流媒体<br/>ZLMediaKit"]
  Web["Web 控制台<br/>Vue + ElementUI"]
  App["移动端<br/>UniApp"]

  Device -->|MQTT| Broker
  Device -->|SIP| SIP
  SIP --> Media
  Broker --> API
  API --> DB
  Web --> API
  App --> API
  Web --> Media

  classDef endpoint fill:#eef4ff,stroke:#536dfe,color:#1f2937;
  classDef platform fill:#f4efff,stroke:#7c3aed,color:#1f2937;
  classDef storage fill:#ecfeff,stroke:#0891b2,color:#1f2937;
  classDef external fill:#f8fafc,stroke:#94a3b8,color:#1f2937;
  class Device,Web,App endpoint;
  class Broker,SIP,API,Media platform;
  class DB storage;
```

## 详细设计

* [架构概览](https://www.fastbee.cn/doc/open/v2/architecture/overview.md) — 系统分层与组件关系
* [技术栈](https://www.fastbee.cn/doc/open/v2/architecture/technology-stack.md) — 完整技术选型说明
* [MQTT Broker](https://www.fastbee.cn/doc/open/v2/architecture/mqtt-broker.md) — 内置 MQTT Broker 设计
