How zbrateam/zebra works
Based on analyzing the file tree and the README, Zebra is an iOS/macOS package manager for jailbroken devices that interfaces with the APT/dpkg system. The project is built using Xcode (with both an .xcodeproj and an .xcworkspace), and it follows an MVC-inspired structure through its Controllers, Views (under UI and Tabs), Models, and supporting Helpers/Utilities/Extensions. In addition, there are helper subprojects (under “Catalyst Helper”, “Relaunch”, and “Supersling”) that likely serve as auxiliary binaries or modules to support launching, updating, or other package operations. The extensive asset catalog, localization resources, and organization of UI elements (multiple Tabs for Home, Browse, Packages, Sources, etc.) further indicate the project’s complexity in presenting a rich user interface for package management.
• Application Entry Points: Include the App Delegate (ZBAppDelegate, BaseSceneDelegate, PackageSceneDelegate) which kickstarts the app, and scene delegates that handle UI scene life cycle.
• Controllers and Business Logic: Include Controllers for app management, HTTP requests, notifications, device commands, and plain utilities (like job queues and source refresh controllers). This layer mediates between the UI and the underlying logic.
• Models: Include the Model folder components that represent package and source data structures, filters, and JSON parsing modules.
• Helper Binaries/Secondary Modules: Highlight the separate modules such as “Catalyst Helper”, “Relaunch”, and “Supersling”. These are likely helper executables or libraries used for tasks that might require separate privileges or context (for example, safely relaunching or interfacing with underlying package management systems during installation or updates).
• Build and Configuration: Incorporate build configuration elements like Makefiles, the Xcode project structure, and GitHub workflows to indicate the build and deployment processes.
Relationships and Data Flow
• Interaction between Controllers and Models (for fetching package data, updating filters, etc.).
• How Controllers interact with the HTTP/Network layer to fetch data from remote sources or updates.
• Communication flows with external systems (the APT/dpkg system) and how the helpers (e.g., Relaunch, Supersling) work as separate processes that may get invoked by the main app.
• Integration points such as notifications (ZBNotificationManager) that broadcast events across the system.
• Dependency on configuration and build tools (Makefiles, project settings) which are used during development and deployment.
Architectural Patterns/Design Principles
• MVC/MVVM Separation: Clearly delineate the controllers, views, and models even if some logic resides in utility classes.
• Modularity: Show how helper modules (Catalyst Helper, Relaunch, Supersling) run side-by-side with the main app, perhaps in a microservices-like or modular helper architecture.
• Code Reuse and Extensions: Capture the use of numerous extensions and utility modules that add common functionality to built-in classes.
Incorporate Technology, Frameworks, and External Dependencies
• That this is an iOS/macOS app built using Xcode with Swift and objective-C interop (look at .swift, .h, .m, .mm files).
• Mention Theos and Procursus for different build targets (jailbroken iOS devices and macOS builds).
• Integration with APT/dpkg under the hood for package management.