generating-experience-react-site

Installation
SKILL.md

Digital Experience Site for React Web Applications

Create and configure Digital Experience Sites that host React web applications on Salesforce. This skill generates the minimum necessary site infrastructure — Network, CustomSite, DigitalExperienceConfig, DigitalExperienceBundle, and the sfdc_cms__site content type — so a React app can be served from Salesforce.

React sites differ from standard LWR sites: they don't need routes, views, theme layouts, or branding sets. The site acts as a thin container (appContainer: true) that delegates rendering to the React application referenced by appSpace.

Required Properties

Resolve all five properties before generating any metadata. Each has a fallback chain — work through each option in order until a value is found.

Property Format How to Resolve
siteName UpperCamelCase (e.g., MyCommunity) Ask user or derive from context
siteUrlPathPrefix kebab-case (e.g., my-community) User-provided, or convert siteName to kebab-case
appNamespace String namespace in sfdx-project.jsonsf data query -q "SELECT NamespacePrefix FROM Organization" --target-org ${usernameOrAlias} → default c
appDevName String webApplication metadata in the project → sf data query -q "SELECT DeveloperName FROM WebApplication" --target-org ${usernameOrAlias} → default to siteName
enableGuestAccess Boolean Ask user whether unauthenticated guest users can access site APIs → default false

The appNamespace and appDevName properties connect the site to the correct React application. Getting these wrong means the site deploys but shows a blank page, so take care to resolve them from real project data.

Generation Workflow

Related skills

More from forcedotcom/afv-library

Installs
2
GitHub Stars
290
First Seen
Mar 26, 2026