# anandbn/timeline-lwc architecture

> Architecture diagram of the GitHub repository anandbn/timeline-lwc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anandbn/timeline-lwc
- Repository: https://github.com/anandbn/timeline-lwc

## Overview

This Salesforce Lightning component provides an activity timeline for a record, with configurable inclusion of child objects and multiple configurations per object. The main runtime retrieves timeline data, groups and displays entries, and can load record details when an entry expands. Separate configuration UI supports choosing objects, fields, and filters; task/event composition and quick actions add interaction capabilities. The README documents configurable child-object timelines, but the relevant Apex providers and configuration storage are not in the supplied tree, so those relationships are shown only where supported or left unconnected.

Main entry points: [`force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js`](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js) (Timeline configuration UI), [`force-app/main/default/lwc/activityTimeline/activityTimeline.js`](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/activityTimeline/activityTimeline.js) (Activity timeline), [`force-app/main/default/lwc/getQuickActionsForObject/getQuickActionsForObject.js`](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/getQuickActionsForObject/getQuickActionsForObject.js) (Quick actions), [`force-app/main/default/aura/LC_RestApiHelper/LC_RestApiHelperController.js`](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/aura/LC_RestApiHelper/LC_RestApiHelperController.js) (REST request helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_timeline["Timeline runtime"]
  node_timeline["Activity timeline"]
  node_data_provider["Timeline data provider"]
  node_timeline_entries["Timeline entry views<br/>[timelineItem.js]"]
  node_task_entry["Task entry details"]
  node_other_entry["Child-object details"]
  node_date_library["Date formatting<br/>[moment_js.js]"]
end

subgraph group_configuration["Timeline configuration"]
  node_config_ui["Timeline configuration UI"]
  node_child_config["Child-object settings"]
  node_filter_config["Filter criteria<br/>[filterCriteria.js]"]
  node_config_fields["Object field selection"]
end

subgraph group_interactions["Record interactions"]
  node_action_panel["Quick actions"]
  node_task_composer["Task composer<br/>[logATask.js]"]
  node_event_composer["Event composer<br/>[logAnEvent.js]"]
  node_record_search["Record search<br/>[textComboBox.js]"]
end

subgraph group_api["API utilities"]
  node_rest_helper["REST request helper"]
  node_lightning_api["Lightning API bridge"]
  node_jsforce["JSforce client<br/>[jsforce.js]"]
  node_lodash["Lodash utility<br/>[lodash_js.js]"]
end

node_user(("Salesforce user"))

node_user -->|"views record"| node_timeline
node_timeline -->|"loads timeline data"| node_data_provider
node_timeline -->|"loads date library"| node_date_library
node_timeline -.->|"renders entries"| node_timeline_entries
node_task_entry -->|"loads expanded details"| node_data_provider
node_other_entry -->|"loads expanded details"| node_data_provider
node_user -->|"configures timeline"| node_config_ui
node_config_ui -.->|"sets child objects"| node_child_config
node_config_ui -.->|"sets criteria"| node_filter_config
node_config_ui -.->|"chooses fields"| node_config_fields
node_config_ui -->|"configures display"| node_timeline
node_user -.->|"opens actions"| node_action_panel
node_action_panel -->|"requests actions"| node_rest_helper
node_rest_helper -->|"sends REST request"| node_lightning_api
node_user -.->|"logs task"| node_task_composer
node_user -.->|"logs event"| node_event_composer
node_user -.->|"searches records"| node_record_search
node_lightning_api -.->|"uses client"| node_jsforce

click node_timeline "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/activityTimeline/activityTimeline.js"
click node_timeline_entries "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/timelineItem/timelineItem.js"
click node_task_entry "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/timelineItemTask/timelineItemTask.js"
click node_other_entry "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/timelineItemOtherObject/timelineItemOtherObject.js"
click node_date_library "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/staticresources/moment_js.js"
click node_config_ui "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js"
click node_child_config "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/selectChildObject/selectChildObject.js"
click node_filter_config "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/filterCriteria/filterCriteria.js"
click node_config_fields "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js"
click node_action_panel "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/getQuickActionsForObject/getQuickActionsForObject.js"
click node_task_composer "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/logATask/logATask.js"
click node_event_composer "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/logAnEvent/logAnEvent.js"
click node_record_search "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/textComboBox/textComboBox.js"
click node_rest_helper "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/aura/LC_RestApiHelper/LC_RestApiHelperController.js"
click node_lightning_api "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/aura/LC_API/LC_APIController.js"
click node_jsforce "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/staticresources/jsforce.js"
click node_lodash "https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/staticresources/lodash_js.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_timeline,node_data_provider,node_timeline_entries,node_task_entry,node_other_entry,node_date_library,node_user toneBlue
class node_config_ui,node_child_config,node_filter_config,node_config_fields toneAmber
class node_action_panel,node_task_composer,node_event_composer,node_record_search toneMint
class node_rest_helper,node_lightning_api,node_jsforce,node_lodash toneRose
```

## Components

### Timeline runtime

- [Activity timeline](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/activityTimeline/activityTimeline.js): `force-app/main/default/lwc/activityTimeline/activityTimeline.js`
- **Timeline data provider**
- [Timeline entry views](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/timelineItem/timelineItem.js): `force-app/main/default/lwc/timelineItem/timelineItem.js`
- [Task entry details](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/timelineItemTask/timelineItemTask.js): `force-app/main/default/lwc/timelineItemTask/timelineItemTask.js`
- [Child-object details](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/timelineItemOtherObject/timelineItemOtherObject.js): `force-app/main/default/lwc/timelineItemOtherObject/timelineItemOtherObject.js`
- [Date formatting](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/staticresources/moment_js.js): `force-app/main/default/staticresources/moment_js.js`

### Timeline configuration

- [Timeline configuration UI](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js): `force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js`
- [Child-object settings](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/selectChildObject/selectChildObject.js): `force-app/main/default/lwc/selectChildObject/selectChildObject.js`
- [Filter criteria](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/filterCriteria/filterCriteria.js): `force-app/main/default/lwc/filterCriteria/filterCriteria.js`
- [Object field selection](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js): `force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js`

### Record interactions

- [Quick actions](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/getQuickActionsForObject/getQuickActionsForObject.js): `force-app/main/default/lwc/getQuickActionsForObject/getQuickActionsForObject.js`
- [Task composer](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/logATask/logATask.js): `force-app/main/default/lwc/logATask/logATask.js`
- [Event composer](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/logAnEvent/logAnEvent.js): `force-app/main/default/lwc/logAnEvent/logAnEvent.js`
- [Record search](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/lwc/textComboBox/textComboBox.js): `force-app/main/default/lwc/textComboBox/textComboBox.js`

### API utilities

- [REST request helper](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/aura/LC_RestApiHelper/LC_RestApiHelperController.js): `force-app/main/default/aura/LC_RestApiHelper/LC_RestApiHelperController.js`
- [Lightning API bridge](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/aura/LC_API/LC_APIController.js): `force-app/main/default/aura/LC_API/LC_APIController.js`
- [JSforce client](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/staticresources/jsforce.js): `force-app/main/default/staticresources/jsforce.js`
- [Lodash utility](https://github.com/anandbn/timeline-lwc/blob/master/force-app/main/default/staticresources/lodash_js.js): `force-app/main/default/staticresources/lodash_js.js`

### Other components

- **Salesforce user**

## Connections

- Salesforce user → Activity timeline: views record
- Activity timeline → Timeline data provider: loads timeline data (evidence: `force-app/main/default/lwc/activityTimeline/activityTimeline.js`)
- Activity timeline → Date formatting: loads date library (evidence: `force-app/main/default/lwc/activityTimeline/activityTimeline.js`)
- Activity timeline → Timeline entry views: renders entries
- Task entry details → Timeline data provider: loads expanded details (evidence: `force-app/main/default/lwc/timelineItemTask/timelineItemTask.js`)
- Child-object details → Timeline data provider: loads expanded details (evidence: `force-app/main/default/lwc/timelineItemOtherObject/timelineItemOtherObject.js`)
- Salesforce user → Timeline configuration UI: configures timeline
- Timeline configuration UI → Child-object settings: sets child objects
- Timeline configuration UI → Filter criteria: sets criteria
- Timeline configuration UI → Object field selection: chooses fields (evidence: `force-app/main/default/lwc/selectFieldsForConfig/selectFieldsForConfig.js`)
- Timeline configuration UI → Activity timeline: configures display
- Salesforce user → Quick actions: opens actions
- Quick actions → REST request helper: requests actions (evidence: `force-app/main/default/lwc/getQuickActionsForObject/getQuickActionsForObject.js`)
- REST request helper → Lightning API bridge: sends REST request (evidence: `force-app/main/default/aura/LC_RestApiHelper/LC_RestApiHelperController.js`)
- Salesforce user → Task composer: logs task
- Salesforce user → Event composer: logs event
- Salesforce user → Record search: searches records
- Lightning API bridge → JSforce client: uses client
