Installation
Deploy via Button
Deploy Trigger Lib to your Salesforce org using the deploy button:

Copy and Deploy
Clone the repository and deploy the force-app directory:
git clone https://github.com/beyond-the-cloud-dev/trigger-lib.git
cd trigger-lib
sf project deploy start -d force-app -o your-org-aliasThe examples directory holds a reference orchestrator, handlers and a Contact trigger. It is a separate package directory and is not deployed with the library. Deploy it on its own when you want to try the framework:
sf project deploy start -d examples -o your-org-aliasWhat Gets Deployed
Framework
TriggerOrchestrator- entry point and execution engineTriggerHandler- theInsertRecord,UpdateRecord,DeleteRecordandUndeleteRecordAPIs, theFieldSelectionAPI, andTriggerHandlerExceptionBeforeInsert,AfterInsert,BeforeUpdate,AfterUpdate,BeforeDelete,AfterDelete,AfterUndelete- per-context handler interfaces
Custom metadata types
TriggerObject__mdt- one row per object, withObjectAPIName__candBypass__cTriggerHandler__mdt- one row per handler class, withApexClassName__c,TriggerObject__candBypass__c
No records of either type are required. With none present, every handler runs and no SOQL is consumed.
Bundled dependency
SOQLfrom SOQL Lib, used for parent record enrichment. It lives inforce-app/main/default/dependencies/soql-lib.
SOQL Lib already in your org?
If your org already contains the SOQL class from SOQL Lib, skip the dependencies/soql-lib folder during deployment to avoid overwriting it. Trigger Lib only needs the SOQL.of, with, byIds, systemMode, withoutSharing and toMap methods.
Unlocked Package
An unlocked package with the btcdev namespace is not published yet. Use one of the deployment options above.
