Backend Module Map
Page Guide
Use CasesFor secondary developers who need to quickly locate backend modules, API groups, and source directories from a business function.
Source LocationThe backend source code is located at `D:\project\gitlab\wumei-smart\springboot`.
Tech StackJava 21, Spring Boot 3.5, MyBatis Plus, Sa-Token, Spring AI, TDengine, IoTDB, RocketMQ, Redisson.
How To UseLocate the Controller by business module first, then trace the Service, Mapper, Domain, SQL, and frontend API.
1. Project Structure
2. Module Responsibilities
| Module | Main Responsibility | Secondary-Development Focus |
|---|---|---|
fastbee-admin | System administration, monitoring, login, Swagger, and basic backend capabilities | Users, roles, menus, logs, system configuration |
fastbee-open-api | Main business APIs of the IoT platform | Products, devices, thing models, rules, scenes, video, schematics, reports, card management |
fastbee-service | Common business services and basic services | Shared business logic, reusable system services |
fastbee-iot-data | Device runtime data, time-series data, and historical data processing | TDengine, IoTDB, real-time data, historical data |
fastbee-protocol | Device protocol encoding/decoding and adaptation | MQTT, TCP, HTTP, Modbus, JT808, and other protocol extensions |
fastbee-server | MQTT/TCP/SIP/ISUP and other server capabilities | Network service startup, sessions, signaling, device connections |
fastbee-record | Recording service, ZLM Hook, and playback capabilities | Cloud recording, recording query, media Hook |
fastbee-notify | Notification channels, templates, logs, and delivery service | Email, SMS, WeChat, DingTalk, HTTP push |
fastbee-ai | AI chat, models, knowledge base, protocol adaptation, NL2SQL | LLM integration, RAG, knowledge base, AI secondary development |
fastbee-plugs | Plug-ins such as Quartz, code generator, OSS, and OAuth | Scheduled tasks, file storage, code generation, SSO |
fastbee-common-extend | Common extension capabilities | Common utilities, shared Controllers |
fastbee-common-media | Common media capabilities | Video playback, shared media service objects |
fastbee-media-api | External media platform integration | Third-party media platforms such as Dahua ICC |
fastbee-mq | Message queue capabilities | RocketMQ or other MQ extensions |
3. Controller Groups
fastbee-open-api is the module with the most business APIs. Controllers are organized by business directory:
| Group | Typical APIs | Business Area |
|---|---|---|
device | /iot/device, /iot/deviceUser, /iot/share | Devices, device users, sharing, assignment |
deviceConfig | /iot/template, /iot/deviceExtValue | Device templates, extended parameters |
deviceLog | /iot/record, /iot/message | Device logs, message records |
protocol | /iot/protocol | Protocol management |
runtime | /iot/runtime | Runtime data |
modbus | /api/modbus, /modbus/config, /modbus/job | Modbus configuration, polling jobs |
gateway | /sub/gateway | Gateways and sub-devices |
ruleEngine | /iot/ruletrigger, /iot/bridge, /iot/alert | Rules, bridging, alerts |
ruleview | /rule/chain, /rule/node, /ruleview/parser | Visual rule editor |
sceneModel | /scene/model, /scene/modelData | Scene models, variables, devices |
sip, media | /sip/*, /common/player, /iot/channel | Video, SIP, playback, PTZ, channels |
datacenter | Report and historical-data APIs | Data center, reports |
goview | /goview/project, /goview/projectData | Visualization screens |
firmware | /iot/firmware, /iot/business/firmware/task | OTA firmware and upgrade tasks |
card | IoT card APIs | Card platforms, SIM cards, data plans |
operations | Maintenance and work-order APIs | Operations closed loop |
translate | /app/language, /app/preferences | Multi-language, preference configuration |
wechat, socialUser | WeChat, social users | Mini programs, official accounts, binding |
4. AI Module APIs
| Controller | API Prefix | Purpose |
|---|---|---|
AiChatController | /ai/chat | AI chat |
AiChatRecordController | /ai/chatRecord | Chat records |
AiProviderController | /ai/provider | Model providers |
AiModelController | /ai/model | Model configuration |
AiKnowledgeController | /ai/knowledge | Knowledge base |
AiKnowledgeDocumentController | /ai/knowledge/document | Knowledge documents |
AiKnowledgeVersionController | /ai/knowledge/version | Knowledge base versions |
AiProtocolAdaptationController | /ai/protocol/adaptation | Protocol adaptation |
AiProtocolKnowledgeController | /ai/protocol/knowledge | Protocol knowledge |
AiNl2SqlController | /ai/nl2sql | Natural-language query |
AiCodebaseGuideKnowledgeController | /ai/knowledge/codebase | Source-code knowledge base |
5. Secondary-Development Locating Flow
Take "adding a field to device runtime status" as an example:
- Locate the page in the frontend first:
vue3/src/views/iot/device. - Find the request wrapper:
vue3/src/api/iot. - Locate the Controller by API path:
/iot/deviceor/iot/runtimeinfastbee-open-api. - Enter the Service from the Controller and confirm the business logic and permissions.
- Check the Mapper and Domain to confirm the database fields.
- Modify the SQL upgrade script.
- Update the OpenAPI types and the frontend page.
- Add documentation for the field and its acceptance criteria.
6. Common Secondary-Development Notes
- Do not bypass permission annotations or data-scope handling.
- For multi-tenant features, confirm the data scope of
create_by, organization, user, and role. - For device data links, distinguish real-time data, historical data, event logs, and command logs.
- Do not hardcode protocol parsing into Controllers; put it in the protocol module or service layer first.
- For high-frequency device data, pay attention to caching, batch writes, and time-series database performance.
- After frontend API changes, update the OpenAPI types and integration Mocks.
- After modifying menu or button permissions, synchronize role authorization.

