finds.dev← search

// the find

trailheadapps/apex-recipes

★ 1,081 · Apex · CC0-1.0 · updated Jun 2026

A library of concise, meaningful examples of Apex code for common use cases following best practices.

An official Salesforce-maintained collection of Apex code examples covering async patterns, SOQL/SOSL, triggers, platform events, callouts, encryption, and more. Each recipe is a self-contained class with a corresponding test — this is the reference implementation Salesforce themselves point developers to when they ask 'how do I do X in Apex?'. Squarely aimed at Salesforce developers from junior to mid-level.

The metadata-driven trigger framework (MetadataTriggerHandler + Custom Metadata) is the standout — it's a legitimate pattern for managing trigger dispatch without code deployments, and seeing it implemented correctly is rare. Test coverage is real: 95%+ codecov badge and the tests actually assert behavior rather than just bumping coverage numbers. The DataWeave-in-Apex section covers a feature most Apex devs ignore entirely, with working CSV↔JSON transform examples. CI pipeline is solid — scratch org creation, push, permset assignment, and data import all automated, so the examples are verified to actually deploy.

The recipes are self-contained by design, which means they don't show how these patterns compose in a real application — you get the puzzle pieces but not the assembled picture, which is where real Salesforce projects fall apart. The LDV (Large Data Volumes) section is thin: one class covering batch basics, nothing on chunking strategies, skinny tables, or the async SOQL patterns that actually matter when you have 10M+ records. No examples of named credential external credential types (the new post-Winter '23 model) — the callout recipes still use legacy named creds. The app UI (LWC components) is purely a recipe browser shell; it doesn't demonstrate LWC best practices like wire adapters with error handling or component communication patterns.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →