Salesforce Apex, LWC and Java Flow AnalyzerGuides › Apex class diagram

How to generate a class diagram from Salesforce Apex

Reading a Salesforce codebase one .cls file at a time hides the big picture. The fastest way to understand it is a class diagram — an architecture map of every class and component and how they connect. Here's how to generate one straight from a local project folder, with no server, build step, or upload.

Open Salesforce Apex, LWC and Java Flow Analyzer →

Generate the diagram in 3 steps

  1. Open Salesforce Apex, LWC and Java Flow Analyzer and click Open Folder. Pick your project root (for example an SFDX project), or just drag in individual .cls, .js, or .html files.
  2. Let it index. The source is scanned locally in the background and an architecture map is built automatically — Apex, LWC, LWC-child and HTML nodes are color-coded so the structure reads at a glance.
  3. Explore the map. Pan and zoom, collapse nodes, expand referenced "ghost" classes on demand, and open any class's source in a syntax-highlighted modal. You can also copy the underlying Mermaid definition.
Salesforce Apex, LWC and Java Flow Analyzer architecture map showing Apex classes and an LWC component connected by labeled dependency edges

Why an architecture map beats reading files

No build step required: Salesforce Apex, LWC and Java Flow Analyzer parses the source in the browser, so you can point it at a checkout and have a diagram in seconds — handy for onboarding, reviews, and impact analysis.

Frequently asked questions

How do I generate a class diagram from Salesforce Apex?
Open Salesforce Apex, LWC and Java Flow Analyzer, click Open Folder and choose your project root (or drop .cls files). It scans locally and builds an interactive architecture map of your classes and their relationships — no server, build step, or upload.
Can I create a UML-style diagram of Apex and LWC together?
Yes. Apex, LWC, LWC-child and HTML render as color-coded nodes in one diagram, including cross-language links like an LWC's @salesforce/apex import pointing at the Apex class it calls.
Is my Salesforce code uploaded anywhere?
No. Files are read locally via the File System Access API and parsed in the browser — nothing is sent to a server.

Related guides

Open Salesforce Apex, LWC and Java Flow Analyzer →