How baumannkev/spv-final works
Project Type and Purpose
• The repository contains two major codebases. One is a Unity application (in the “Unity” folder), and the other is a Microsoft Project add-in (“msproject-addin”).
• The Unity project appears to be a front-end application developed with the Unity engine. Its structure (Assets/Scenes, Assets/Scripts, Prefabs, Plugins, etc.) points toward a complex interactive application with UI components and task management modules (see “CriticalPathManager”, “FileManager”, “LayoutManager”). It also integrates Firebase (see FirebaseManager.cs and XML importers), likely to manage task or project data via cloud services.
• The “msproject-addin” system is a separate .NET-based add-in for Microsoft Project. It contains Excel/Project ribbon customization (MyRibbon.cs, MyRibbon.Designer.cs, SignInForm) and uses Google API libraries (protos, FirebaseAuthHelper, OAuthHelper, etc.). This part is designed to integrate or extend functionality within Microsoft Project (likely synchronizing or managing tasks with the Unity application’s backend).
Analyzing the File Structure
• Unity Application:
– Assets directory holds game objects (Prefabs), scenes, plugins (like FilePicker.jslib for WebGL), and scripts that are organized by functionality (CriticalPathManager, FileManager/API, LayoutManager, etc.).
– There are also asset directories for supporting materials (Textures/Images, Materials, TextMesh Pro assets, WebGLTemplates), suggesting different deployment targets (for example, a WebGL build exists in “WebGLBuild”).
• msproject-addin:
– Contains a dedicated codebase with a nested “SPV-Project-Add-In” project. The source files include UI components (Ribbon customization, SignInForm) as well as integration logic (FirebaseAuthHelper, OAuthHelper) and many external dependencies (evidenced by the large “packages” folder with Google APIs, gRPC, and Protobuf definitions).
– The “protos” subfolder indicates use of protocol buffers to define communication formats between different services or components (likely interacting with Google Cloud or Firebase backends).
Key Components and Their Responsibilities
a. Unity Application (Front-end Client):
• UI and Scene Management – Managed by scenes and prefabs (SampleScene, various button prefabs) that build the visual interface.
• Task and File Management – Managed by modules under “Assets/Scripts/FileManager” (including XMLFileImporter and XMLTaskLoader) and “LayoutManager/Tasks” (modules for task visualization and layout).
• Business Logic – “CriticalPathManager” contains application-specific logic (possibly project-related task dependencies).
• External Communication – The “API” folder under FileManager suggests integration with Firebase (FirebaseManager.cs, FirebaseTaskData, etc.) to store or retrieve cloud-based data.
• Deployment – The WebGLBuild folder with index.html suggests a version of the Unity app is built for browser execution.
b. Microsoft Project Add-in Component:
• Ribbon and UI Integration – Files like MyRibbon.cs, MyRibbon.Designer.cs, and SignInForm represent the add-in’s customization to Microsoft Project’s UI.
• Authentication and Cloud Integration – FirebaseAuthHelper.cs and OAuthHelper.cs indicate that the add-in facilitates authentication (likely via Firebase or Google services) for syncing data.
• Protocol Buffers and External Libraries – The “protos” directory along with many Google and gRPC NuGet packages reveal that the add-in communicates with external services (e.g., Google Cloud or Firebase) using standard protocols.
Relationships and Data Flow
• The Unity client likely uses its FileManager scripts to load tasks, import XML, and communicate with Firebase (i.e., sending/receiving task data).
• The msproject-addin integrates with Microsoft Project’s interface (via Ribbon customization and a dedicated SignInForm) to either push or pull similar task/project information. Both components rely on an external service (Firebase/Google Cloud) to make sure data is shared, synchronized, and authenticated.
• WebGL build provides an alternative deployment of the Unity client which could interact with the same backend services.
Architectural Patterns/Design Principles
• Modularity: Both codebases are clearly modularized. The Unity project is organized by functionality (file handling, layout, critical path management) and the add-in separates presentation (UI forms, ribbon components) from its integration/authentication logic.
• Separation of Concerns: The front-end (Unity) handles interaction and visualization, while the back-end integration (via Firebase and Google Cloud-based services) is encapsulated in dedicated API modules in the FileManager and add-in’s libraries (via OAuth, Firebase libraries).
• External Service Integration: Use of Firebase API in Unity scripts and extensive use of Google API packages in the add-in highlight the dependence on a cloud-based service for storage, authentication, and perhaps real-time data synchronization.
Summary and Advice
• Interactions with the Firebase/Google Cloud services, as they are a central integration point shared by both the Unity project and the MS Project add-in component.
• External libraries (especially for the add-in) that are key for bridging authentication and data exchange.
• Do not hesitate to break out components further if needed; the goal is to have a detailed map of how the Unity client, the add-in, and the cloud service interact.