Skip to content

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 ​

ModuleMain ResponsibilitySecondary-Development Focus
fastbee-adminSystem administration, monitoring, login, Swagger, and basic backend capabilitiesUsers, roles, menus, logs, system configuration
fastbee-open-apiMain business APIs of the IoT platformProducts, devices, thing models, rules, scenes, video, schematics, reports, card management
fastbee-serviceCommon business services and basic servicesShared business logic, reusable system services
fastbee-iot-dataDevice runtime data, time-series data, and historical data processingTDengine, IoTDB, real-time data, historical data
fastbee-protocolDevice protocol encoding/decoding and adaptationMQTT, TCP, HTTP, Modbus, JT808, and other protocol extensions
fastbee-serverMQTT/TCP/SIP/ISUP and other server capabilitiesNetwork service startup, sessions, signaling, device connections
fastbee-recordRecording service, ZLM Hook, and playback capabilitiesCloud recording, recording query, media Hook
fastbee-notifyNotification channels, templates, logs, and delivery serviceEmail, SMS, WeChat, DingTalk, HTTP push
fastbee-aiAI chat, models, knowledge base, protocol adaptation, NL2SQLLLM integration, RAG, knowledge base, AI secondary development
fastbee-plugsPlug-ins such as Quartz, code generator, OSS, and OAuthScheduled tasks, file storage, code generation, SSO
fastbee-common-extendCommon extension capabilitiesCommon utilities, shared Controllers
fastbee-common-mediaCommon media capabilitiesVideo playback, shared media service objects
fastbee-media-apiExternal media platform integrationThird-party media platforms such as Dahua ICC
fastbee-mqMessage queue capabilitiesRocketMQ or other MQ extensions

3. Controller Groups ​

fastbee-open-api is the module with the most business APIs. Controllers are organized by business directory:

GroupTypical APIsBusiness Area
device/iot/device, /iot/deviceUser, /iot/shareDevices, device users, sharing, assignment
deviceConfig/iot/template, /iot/deviceExtValueDevice templates, extended parameters
deviceLog/iot/record, /iot/messageDevice logs, message records
protocol/iot/protocolProtocol management
runtime/iot/runtimeRuntime data
modbus/api/modbus, /modbus/config, /modbus/jobModbus configuration, polling jobs
gateway/sub/gatewayGateways and sub-devices
ruleEngine/iot/ruletrigger, /iot/bridge, /iot/alertRules, bridging, alerts
ruleview/rule/chain, /rule/node, /ruleview/parserVisual rule editor
sceneModel/scene/model, /scene/modelDataScene models, variables, devices
sip, media/sip/*, /common/player, /iot/channelVideo, SIP, playback, PTZ, channels
datacenterReport and historical-data APIsData center, reports
goview/goview/project, /goview/projectDataVisualization screens
firmware/iot/firmware, /iot/business/firmware/taskOTA firmware and upgrade tasks
cardIoT card APIsCard platforms, SIM cards, data plans
operationsMaintenance and work-order APIsOperations closed loop
translate/app/language, /app/preferencesMulti-language, preference configuration
wechat, socialUserWeChat, social usersMini programs, official accounts, binding

4. AI Module APIs ​

ControllerAPI PrefixPurpose
AiChatController/ai/chatAI chat
AiChatRecordController/ai/chatRecordChat records
AiProviderController/ai/providerModel providers
AiModelController/ai/modelModel configuration
AiKnowledgeController/ai/knowledgeKnowledge base
AiKnowledgeDocumentController/ai/knowledge/documentKnowledge documents
AiKnowledgeVersionController/ai/knowledge/versionKnowledge base versions
AiProtocolAdaptationController/ai/protocol/adaptationProtocol adaptation
AiProtocolKnowledgeController/ai/protocol/knowledgeProtocol knowledge
AiNl2SqlController/ai/nl2sqlNatural-language query
AiCodebaseGuideKnowledgeController/ai/knowledge/codebaseSource-code knowledge base

5. Secondary-Development Locating Flow ​

Take "adding a field to device runtime status" as an example:

  1. Locate the page in the frontend first: vue3/src/views/iot/device.
  2. Find the request wrapper: vue3/src/api/iot.
  3. Locate the Controller by API path: /iot/device or /iot/runtime in fastbee-open-api.
  4. Enter the Service from the Controller and confirm the business logic and permissions.
  5. Check the Mapper and Domain to confirm the database fields.
  6. Modify the SQL upgrade script.
  7. Update the OpenAPI types and the frontend page.
  8. 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.

FastBee | fastbee.cn