How openboard-org/openboard works
Main components (modules) as shown in the file tree
• Core Layer (src/core): Contains the central application logic, board controller, document management, persistence, settings, idle timer, and overall application lifecycle (UBApplication, UBBoardController, etc.).
• GUI Layer (src/gui & src/customWidgets): Manages the user interface, including palettes, toolbars, dialogs, custom widgets, and the main window (UBMainWindow). Web tools and tools for interactive whiteboard functions reside here.
• Adaptor & API Layers (src/adaptors and src/api): Provide import/export functionalities (e.g., for PDF, images, various document formats) and integration with web widgets and external content. They also expose OpenBoard’s widget APIs (UBWidgetMessageAPI, UBW3CWidgetAPI).
• Document and Board Modules (src/document and src/board): Handle board documents, their rendering and manipulation on the interactive whiteboard.
• Network and Resources (src/network, resources directory): Enable tasks like content downloading, online publishing, and podcast-related functionalities (the podcast module under src/podcast, with subdirectories for different OS/media support).
• PDF and Multimedia Support (src/pdf, src/pdf-merger, src/podcast components): These modules handle PDF rendering/merging and multimedia encoding/decoding via adapters for FFmpeg, QuickTime, or Windows Media.
• Platform-Specific and Build Infrastructure: The project uses CMake (with cmake directories and CMakeLists.txt in most modules) to configure builds across Windows, macOS, and Linux. There are also dedicated release scripts (in release_scripts) for packaging across platforms.
Relationships and interactions
• The Core layer acts as the backbone, initiating and coordinating interactions between the GUI, Domain, and API layers.
• The GUI components relay user inputs to the Core, which in turn updates the Domain (graphics items, board content) and persists changes via the Document modules.
• Adaptors and API modules interface with external systems (importing/exporting documents, widgets integration, network requests) and interact with the Core to integrate these functionalities.
• The PDF and multimedia modules are connected both to the presentation layer (to display PDFs or video) and to the adaptor layers (to handle file conversion or encoding).
Important architectural patterns/design principles
• Layered architecture: Clearly separate the presentation (GUI), business logic (Core & Domain), and integration layers (Adaptors/API).
• Modular design: Each module (e.g., domain, core, network, podcasts) is encapsulated in its directory with dedicated CMake projects, promoting separation of concerns.
• Cross-platform design: There are platform-specific implementations (for example, in src/frameworks and in the release_scripts) and conditional compilations via CMake to support Windows, macOS, and Linux.
• Plugin/extensibility mechanism: The Web Widget support and the “plugins” directory indicate a system that supports dynamic widget integration while keeping core functionality independent.
Relevant technologies, frameworks, and libraries
• C++ and Qt (versions 5 and 6) are the primary language and GUI framework.
• CMake is used across the project for building on different platforms.
• External dependencies (via cmake/Dependency* files) such as FFmpeg, OpenSSL, Poppler, QuaZip, and others, which are integrated through our dependency management scripts.
• The file tree also shows support for multimedia, network, and PDF libraries.
– GUI → Core (user input processing)
– Core ←→ Domain (managing board state and undo/redo)
– Core → Adaptors/API (import/export and external communications)
• Optionally, include a section indicating the build and deployment tools (CMake, release_scripts) and OS-specific folders, to show cross-platform support.
• Detail any external dependencies by listing them on the periphery (e.g., Qt, FFmpeg, Poppler).