How kevinohara80/sfdc-trigger-framework works
Project type and purpose
• This is an open-source Salesforce Apex library (“SFDC trigger framework”) intended to simplify and standardize writing Apex triggers.
• It provides a single base class, TriggerHandler, which you inherit from in your own trigger handlers. It uses a Template Method pattern to invoke context-specific override methods, and it provides recursion control (“max loop count”) and a bypass API.
File structure
• Top-level:
• package.json – npm distribution manifest
• pmd.xml / .codeclimate.yml – static analysis configuration
• README.md – project description and usage
• src/package.xml – Salesforce metadata descriptor for deployment
• src/classes:
• TriggerHandler.cls (+ metadata) – core base class
• TriggerHandler_Test.cls (+ metadata) – unit tests
• No frontend or external microservices; this is a pure Apex library to be deployed into a Salesforce org.
README for architecture insights
• Describes the Template Method flow: base class watches for Trigger contexts, calls override methods in subclasses.
• Highlights two cross-cutting concerns: recursion prevention (max loop count) and the bypass API.