How missingems/mooligan works
Main Components
• Main Application: Represented by the “Mooligan” folder, which contains the primary app entry point, UI runners (e.g., MooliganApp.swift), resources (Assets, LaunchScreen storyboard), and tests.
• Core Modules:
– Featurist: Under “Core/Featurist,” this likely provides generic feature-handling mechanisms or utilities for integrating modular features (with its own app entry, resources, sources, and tests).
– Networking: Under “Core/Networking,” which handles API clients for card data, set information, and querying Magic: The Gathering data. It includes subdirectories for card details, common utilities, query implementations, and mocks for testing.
• Features:
– Browse, CardDetail, and Query: Each feature is organized under its own directory in “Features” and includes sources (feature-specific UI and business logic), resources (assets, storyboards), runners, and tests. These modules implement specific functionalities such as browsing cards/decks, showing detailed card information, and handling search queries.
• Project Management & Build System:
– Tuist Configuration: There are Tuist directories in several modules (e.g., Core/DesignComponents/Tuist, Features/**/Tuist) and at the top level (“Tuist”). This indicates that Tuist is used to orchestrate project generation and dependency management.
Relationships and Interactions
• The Main Application (Mooligan) aggregates and integrates the different feature modules (Browse, CardDetail, Query) and leverages the shared Core modules.
• Feature modules use the shared DesignComponents for common UI patterns and rely on Networking to fetch and process card and deck data.
• Within Networking, submodules for CardDetail, Query, and Sets indicate specialized API clients that supply data to respective feature modules.
• DesignComponents serve as the “UI kit” ensuring a consistent look and feel, while Featurist might help in dynamically including multiple features.
• Tuist configurations exist at multiple levels to set up projects, define dependencies, and streamline module integration.
Architectural Patterns & Design Principles
• Modularity: The project is split into several loosely coupled modules (Core, Features, Mooligan) to enhance reusability and separation of concerns.
• Layering: There is a clear separation among User Interface (via DesignComponents & feature-specific UI code), Business Logic (within Features or shared Featurist), and Data Access (Networking) layers.
• Testing: Each module includes its own tests, which indicates an emphasis on unit testing and modular testability.
• Project Generation: Use of Tuist indicates an automated, standardized build and dependency setup.