How jamessimone/apex-rollup works
Project type and purpose
• This is an open-source Salesforce package (“Apex Rollup”) delivered as an SFDX project.
• Purpose: Provide a metadata-driven engine for custom rollup summaries across any SObject, invoked by Apex triggers, Flows, LWC buttons, or scheduled jobs, with extensible plugins and asynchronous processing.
File structure
• Top level:
• .github, workflows & config → CI/CD and lint rules
• scripts → build, conversion, test helpers
• extra-tests → supplemental Apex tests and sample metadata
• plugins → optional RollupLogger, RollupCallback, ExtraCodeCoverage
• rollup-namespaced → namespaced SFDX packaging variations
• rollup/
– app → LWC components, flexipage, permission sets (UI layer)
– core → Apex “engine” classes under classes/, custom metadata under customMetadata/, CMDT-defined objects under objects/, supporting DWL mappings
• Key patterns:
• “core” contains engine logic (Rollup.cls and sub-classes)
• “app” houses UI entry points (quick-action LWC, permission sets)
• triggers call Rollup.runFromTrigger() in core
• flows use @Invocable methods in core
• custom metadata types (Rollup__mdt, RollupOrderBy__mdt, RollupControl__mdt, RollupPluginParameter__mdt) define behavior
README for additional insights
• Execution contexts: Apex triggers, Change Data Capture triggers, Flows, Scheduled jobs, LWC quick action
• Architectural features: metadata-driven configuration, plugin interface, asynchronous processing (Queueable/Batchable), full-recalc UI
Detail requirements
• Key invocation points and data-flow loops.
• Engine’s dependency on Custom Metadata for runtime behavior.
• How plugins hook into the engine.
• Do not oversimplify—include separate circles for major engine classes (e.g., RollupAsyncProcessor, RollupScheduler) if desired for clarity.