Home - j-fischer/rflib GitHub Wiki

Reliability Force Library (RFLIB)

Build Status GitHub GitHub package.json version codecov

RFLIB helps developers create clean, production-ready Salesforce code with a high level of operational supportability. Inspired by Dan Appleman's logging design patterns, RFLIB provides robust tools for logging, diagnostics, and feature toggling, ensuring better visibility and control for both development and production environments.

Why Choose RFLIB?

RFLIB reduces the learning curve for building enterprise-grade Salesforce applications by providing:

  • Out-of-the-box solutions for common development challenges
  • Production-ready patterns that scale with your org
  • Comprehensive monitoring and debugging capabilities
  • Minimal configuration required to get started

Quick Links


Key Features

Logging Framework

  • Multi-environment Support: Logs from Apex, Lightning Components (LWC/Aura), Flows, and OmniStudio.
  • Advanced Log Management: Features include batched logging, log aggregation, and platform event-based reporting.
  • Log Archiving: Store logs in Big Objects for querying beyond Salesforce’s 72-hour limit.
  • Integrated Dashboards: Real-time and historical log review with filtering capabilities.
  • Log Aggregation: Use the observability feature to see error counts on daily and weekly basis, helping you identify when to take action and which errors to prioritize before reviewing the entire set of log messages. 

Feature Switches

  • Hierarchical Configuration: Manage switches at user, profile, public group, or global levels.
  • Toggle Features: Deploy features hidden from users, enable A/B testing, or deactivate integrations during outages.
  • Support Across Salesforce Tools: Compatible with Apex, LWC, Aura, Flows, and Validation Rules.

Trigger Framework

  • Decoupled Design: Manage triggers with configurable activation, error handling, and recursion tracking.
  • Custom Metadata Driven: Configure triggers and handlers dynamically without code changes.

HTTP Mocking Framework

  • Seamless Testing: Simulate HTTP responses in Salesforce for integration testing without external dependencies.
  • Customizable Behavior: Configure mock endpoints and payloads via Custom Metadata.
  • Use Cases: Ideal for web service integrations development while the web service endpoint is developed in parallel.

Retryable Actions

  • Asynchronous Processing: Handle failing actions with up to 8 retry attempts.
  • Use Cases: Ideal for web service integrations or other critical asynchronous operations.

Application Events

  • Business Insights: Track feature adoption, integration performance, and other key activities.
  • Dashboards: Analyze trends and operational metrics in real-time.

Installation

The easiest way to add RFLIB is via an unlocked package:

Install Using Browser

Click here to install RFLIB

Install via SFDX CLI

sf package install --package <latest_package_ID> -w 10 -o <your_org_alias> -w 10

For advanced setups, clone the repository and deploy using:

sf project deploy start -o <your_org_alias>

Getting Started

For New Users (Recommended Learning Path)

Step 1: Install and Set Up

  1. Install RFLIB using the unlocked package
  2. Review Global Config Settings to learn about the highest level of configuration settings

Step 2: Start with Logging

  1. Getting Started with Logging - Learn how to instrument your code with logging
  2. Logger Settings - Configure logging for your environment and users
  3. Ops Center Log Monitor - Monitor your logs

Step 3: Add Advanced Features

  1. Feature Switches - Control feature rollouts
  2. Application Events - Track business metrics

Step 4: Explore Specialized Features (as needed)

Quick Reference


Support

For assistance, please refer to our Wiki or contact us via GitHub issues.

Happy Coding!