How sining1989/wboard works
Project Type and Purpose
• This is a native desktop full-stack application written in C++/Qt (Qt 5.9.5) targeting Windows (VS2017).
• Purpose: an interactive whiteboard teaching tool (“WBoard”) with four major UIs—presentation board, web browser, document viewer, and desktop annotation.
High-Level File Structure Analysis
• Top-level: WBoard.sln, README.md, .vcxproj files.
• WBoard/Resources: static assets (fonts, images, CSS, HTML templates, config).
• WBoard/UI: Qt Designer .ui forms.
• WBoard/Source: core C++ code, subdivided into layers/modules:
• adaptors (import/export/PDF thumbnailing)
• api (widget & library APIs for plugins or JS widgets)
• board, document, desktop, web, gui, tools, network, podcast, pdf-merger, pdf
• core (application controller, persistence, document manager, settings, download manager, etc.)
• domain (graphics items, undo/redo commands)
• frameworks (utility functions, platform abstractions)
• globals (global constants)
• third-party (OpenSSL, QuaZip)
• TSResource: translation files.
Key Architecture Insights from README
• Four distinct UI modes mapped to four controllers/modules.
• Heavy use of Qt widget hierarchies, graphics or scene-graph domain objects.
• Import/export pipelines for documents, PDF, images, web content.
• Persistence to local file system (WBSceneCache, PersistenceManager).
• Networking for auto-save, file download, widget messaging (XMLHttpRequest API).
Main Components
A. UI Layer
• Source: WBoard/UI + gui/, web/browser/, document/, desktop/
B. Core Application
• WBApplicationController, DisplayManager, DocumentManager, PersistenceManager, DownloadManager
C. Domain Model
• GraphicsScene & items, Undo/Redo commands (domain/)
D. Adaptors & APIs
• ImportAdaptor, ExportAdaptor, ThumbnailAdaptor (adaptors/)
• Widget & Library APIs (api/)
E. Networking
• HTTP downloader, AutoSaver, XMLHttpRequest server (network/)
F. PDF Handling
• PDF renderer, merger components (pdf/, pdf-merger/)
G. Podcast/Media
• PodcastController, VideoEncoder, WaveRecorder (podcast/)
H. Framework Utilities
• CryptoUtils, FileSystemUtils, PlatformUtils, StringUtils (frameworks/)
I. Third-Party Libraries
• Qt5 Widgets & WebKit
• OpenSSL (security, network)
• QuaZip (ZIP/PDF)
J. Resources & Configuration
• Static assets (fonts, images, style.qss, HTML templates, config files)
Interactions and Data Flows
• UI Layer → Core Application: user events → application logic
• Core → Domain: create/manipulate GraphicsScene & items
• Core → PersistenceManager: save/load whiteboard files
• Core ↔ Network: fetch remote resources, auto-save sync
• Core ↔ Adaptors/APIs: import/export pipelines, plugin/widget messages
• Core ↔ PDF & Podcast modules: export sessions to PDF, record video/audio
• All modules → Frameworks & Third-Party libs for utility functions, crypto, zip, rendering
Architectural Patterns & Principles
• MVC/MVP-style separation: UI (View) / Core (Controller) / Domain (Model)
• Adapter pattern for import/export and plugin APIs
• Command pattern for undo/redo in domain
• Layered architecture: UI → Core → Domain → Frameworks → OS/Third-Party
• Single application instance enforcement via QtSingleApplication
Final Advice
• Four main user work-flows (board, web, doc, desktop) to show how the same core services are reused.
• Review with domain experts to ensure completeness of key interactions.