How companion-thecube/core works
Project type and purpose
• This is a full-stack, embedded C++ “core” application for a Raspberry-Pi-based desktop companion (“Companion, TheCube”) that integrates:
• A local 3D GUI (SFML/OpenGL)
• A built-in HTTP/REST server serving a web UI
• A modular decision engine (NLP, scheduling, personality)
• App management (native, Docker, Python)
• Audio I/O (speech in/out)
• Hardware drivers (Bluetooth, Wi-Fi, IMU, NFC, mmWave)
• Persistence (SQLite) + telemetry + localization
File structure
• Top-level folders:
• src/api → REST endpoints, authentication, builder
• src/decisionEngine → intent registry, triggers, scheduler, transcriber, personality, remote API
• src/gui → 3D scene graph, mesh loader, shaders, event handler, menus
• src/audio → audio capture & playback
• src/apps → app lifecycle & APIs (native/Docker/Python)
• src/hardware → low-level drivers & peripheral manager
• src/database → SQLite wrappers (cubeDB, db)
• src/logger, src/telemetry → logging & telemetry pipelines
• src/settings, src/utils, src/config.cpp → configuration loader, util functions
• Static web UI assets in http/
• CMakeLists.txt, .env example, install-deps.sh, tests/ and benchmarks/
Insights from README
• Uses cpp-httplib for HTTP server, SFML/OpenGL for GUI, SQLite for persistence, GoogleTest for unit tests, GetText for i18n
• Reads .env for HTTP address/port and IPC socket
• Provides both local GUI and remote web UI