Skip to content

Architecture Overview ​

The current CosmoEdge repository is the complete product runtime, not just a single inference library or backend program.

Overall Structure ​

text
+---------------------------------------------------------------+
| Web Console                                                   |
| Vue 3 | Vite | Element Plus | Vue Flow | ECharts | i18n        |
+-------------------------------+-------------------------------+
                                | HTTP / WebSocket
                                v
+---------------------------------------------------------------+
| C++ Backend Runtime                                           |
| API Router | Services | Flow | Media | Inference | Database    |
+-------------------------------+-------------------------------+
                                |
                                v
+---------------------------------------------------------------+
| Runtime Package                                               |
| cosmo-engine | nginx | SRS | scripts | resources | data | fonts   |
+---------------------------------------------------------------+

Backend Entry ​

EntryPurpose
src/app/main.ccCreates cosmo::app::Application
src/app/application.ccApplication startup shell
src/app/app_init.ccService registration, initialization, network service startup
src/app/AppConstants.hDefault HTTP / WebSocket ports

Primary executable target:

text
cosmo-engine

Service Registry ​

The backend assembles services through cosmo::service::ServiceRegistry.

The startup sequence is split into:

  1. Register infrastructure services.
  2. Register business services.
  3. Initialize services.
  4. Start runtime services such as MQTT, HTTP, WebSocket, device discovery, storage cleanup, and the watchdog.

Main Source Tree ​

DirectoryPurpose
src/apiAPI routing and message handlers
src/appApplication entry point and startup flow
src/dbDAO and database support
src/flowTasks, algorithms, action chains
src/inferModel inference wrappers
src/linkageAlarm linkage
src/mediaVideo decode, encode, frame processing, OSD
src/memMemory pool and device memory abstraction
src/networkHTTP, MQTT, network messages
src/nnInference backend abstraction
src/platformPlatform-specific capabilities
src/serviceService interfaces and implementations
src/utilGeneral utilities
src/webVue 3 frontend

Frontend ​

Frontend path:

text
src/web

Confirmed technology stack:

  • Vue 3
  • Vite 6
  • Vue Router 4
  • Element Plus
  • Axios
  • ECharts
  • Vue I18n
  • Vue Flow

The frontend build output is installed into the release package's web directory.

Inference and Models ​

CosmoEdge selects an inference backend at build time:

  • x86: ONNX Runtime CPU, loading ONNX models directly.
  • Sophon BM1688/CV186X: BMRT with chip-specific model artifacts.
  • Rockchip RK3576/RV1126B: RKNN Runtime with target-specific RKNN models.

VLM on RK3576 uses a separate RKLLM path and requires matching runtime and model resources. Confirm backend support, included assets and VLM availability separately.

Resource directories:

  • data/resource/aiboxresource_bm1688
  • data/resource/aiboxresource_cv186x
  • data/resource/aiboxresource_x86
  • data/resource/aiboxresource_rknn (Rockchip target overlays, combined with base templates)

The current templates cover detection (YOLO v5/v8/v9/v11/v12/v26), classification, keypoints, feature, segmentation (SAM2), object localization (DINO), and vision-language models (Qwen3VL, Qwen3.5). The complete list is subject to the actual files under each data/resource/aiboxresource_*/model_template/ directory.

Engine code: Apache-2.0. Models and dependencies retain their own licenses.

CosmoEdge / Contact

Let’s talk about your edge AI project.

Model deployment, hardware selection or system integration—start with the question you’re working on.

Business & project enquiries

hello@cosmowander.ai
Email us

Installation, usage and open-source questionsVisit community discussions
What should I include?

Share what you know; we can work through the remaining details together.

  • Use case

    What to detect and how events will be used

  • Existing setup

    Existing models, hardware or systems

  • Workload

    Stream count, frequency and latency needs

  • Project stage

    Your project stage and immediate questions