
Generating Ui Bundle Site
- 2.2k installs
- 763 repo stars
- Updated July 24, 2026
- forcedotcom/sf-skills
generating-ui-bundle-site creates Salesforce Digital Experience metadata to host a React UI bundle site.
About
Generating UI Bundle Site creates Digital Experience Site infrastructure hosting React UI bundles on Salesforce. Activation requires uiBundles/*/src/ in the project or tasks involving digitalExperiences, networks, customSite, or guest access configuration. Five properties must resolve before metadata generation: siteName UpperCamelCase, siteUrlPathPrefix lowercase, appNamespace from sfdx-project.json or org query defaulting to c, appDevName from UIBundle metadata or query defaulting to siteName, and enableGuestAccess boolean default false. Workflow step one resolves all properties, step two creates Network, CustomSite, DigitalExperienceConfig, DigitalExperienceBundle, and sfdc_cms__site paths, step three loads full docs templates substituting brace placeholders only, and step four forbids editing non-templated default fields. React sites use appContainer true thin containers without LWR routes or branding sets, linking appSpace to the UIBundle record. Wrong appNamespace or appDevName yields deployed blank pages. Verification checklist confirms five properties, file existence, appSpace match, and sf project deploy validation before deploy.
- Resolves siteName, url prefix, appNamespace, appDevName, guest access.
- Creates Network, CustomSite, DigitalExperienceConfig, and bundle metadata.
- React sites use appContainer true without LWR routes or branding sets.
- Must read full docs templates before populating metadata fields.
- Wrong appSpace linkage causes deployed blank React pages.
Generating Ui Bundle Site by the numbers
- 2,203 all-time installs (skills.sh)
- +7 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #212 of 2,277 Frontend Development skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
generating-ui-bundle-site capabilities & compatibility
- Capabilities
- five property resolution with org queries · metadata directory scaffolding · template driven field population rules · react appcontainer site pattern · pre deploy verification checklist
- Works with
- salesforce
- Use cases
- frontend · ui design · api development
- Runs
- Local or remote
- Pricing
- Paid
What generating-ui-bundle-site says it does
Getting these wrong means the site deploys but shows a blank page
Agents MUST read the full contents of each docs/*.md file referenced in Step 3
npx skills add https://github.com/forcedotcom/sf-skills --skill generating-ui-bundle-siteAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2.2k |
|---|---|
| repo stars | ★ 763 |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 24, 2026 |
| Repository | forcedotcom/sf-skills ↗ |
How do I configure a Salesforce site to publish and host my React UI bundle?
Generate Salesforce Digital Experience Site metadata to host a React UI bundle with resolved appSpace linkage.
Who is it for?
Salesforce projects with uiBundles needing Digital Experience hosting.
Skip if: Skip for standard LWR community sites without React UI bundle hosting.
When should I use this skill?
User creates digitalExperiences, networks metadata, or hosts a UIBundle React app.
What you get
Complete site metadata with correct appSpace, guest settings, and deploy-validated structure.
- sites/{siteName}.site-meta.xml CustomSite bundle
- Deployable Digital Experience React site metadata
Files
Digital Experience Site for React UI Bundles
Create and configure Digital Experience Sites that host React UI bundles 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 UI bundle 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 | All lowercase (e.g., mycommunity) | User-provided, or convert siteName to all lowercase with alphanumeric characters only |
| appNamespace | String | namespace in sfdx-project.json → sf data query -q "SELECT NamespacePrefix FROM Organization" --target-org ${usernameOrAlias} → default c |
| appDevName | String | UIBundle metadata in the project → sf data query -q "SELECT DeveloperName FROM UIBundle" --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
Step 1: Resolve All Required Properties
Determine values for all five properties before constructing anything. Use the resolution strategies in the table above, falling through each option until a value is found.
Step 2: Create the Project Structure
Use available Salesforce metadata schema and field context for Network, CustomSite, DigitalExperienceConfig, and DigitalExperienceBundle to ensure each file uses valid structure.
Create any files and directories that don't already exist, using these paths:
| Metadata Type | Path |
|---|---|
| Network | networks/{siteName}.network-meta.xml |
| CustomSite | sites/{siteName}.site-meta.xml |
| DigitalExperienceConfig | digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml |
| DigitalExperienceBundle | digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml |
| DigitalExperience (sfdc_cms__site) | digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/* |
The DigitalExperience directory contains only _meta.json and content.json. Do not create any directories other than sfdc_cms__site inside the bundle.
Step 3: Populate All Metadata Fields
Use the default templates in the docs below. Values in {braces} are resolved property references — substitute them with the actual values from Step 1.
| Metadata Type | Template Reference |
|---|---|
| Network | configure-metadata-network.md |
| CustomSite | configure-metadata-custom-site.md |
| DigitalExperienceConfig | configure-metadata-digital-experience-config.md |
| DigitalExperienceBundle | configure-metadata-digital-experience-bundle.md |
| DigitalExperience (sfdc_cms__site) | configure-metadata-digital-experience.md |
For URL updates, see update-site-urls.md.
Execution Note for Step 3: Load and use the docs
- Agents MUST read the full contents of each docs/*.md file referenced in Step 3 before attempting to populate metadata fields.
- Use your platform's file-read tool (for example,
read_file) to load these files in full, then perform placeholder substitution for values in{braces}using the resolved properties from Step 1. - Files to load:
docs/configure-metadata-network.mddocs/configure-metadata-custom-site.mddocs/configure-metadata-digital-experience-config.mddocs/configure-metadata-digital-experience-bundle.mddocs/configure-metadata-digital-experience.md- Read entire file contents, replace placeholders (e.g.
{siteName}) with the resolved values, then use the expanded templates to populate the metadata XML/JSON content.
Step 4: Do Not Modify Non-Templated Properties
Do not modify any default property values for Network, CustomSite, DigitalExperience, DigitalExperienceConfig, or DigitalExperienceBundle metadata that are not expressed as variables wrapped in {braces}.
Verification Checklist
Before deploying, confirm:
- [ ] All five required properties are resolved
- [ ] All metadata directories and files exist per the project structure
- [ ] All metadata fields match the Step 3 templates with
{braces}substituted only; no other default property values were added or changed - [ ]
appSpaceincontent.jsonmatches an existingUIBundlemetadata record - [ ] Deployment validates successfully:
sf project deploy validate --metadata Network CustomSite DigitalExperienceConfig DigitalExperienceBundle DigitalExperience --target-org ${usernameOrAlias}Common Workflows
Updating Experience Site URLs
Use when user wants to update or change site URLs (urlPathPrefix).
Steps:
- [ ] Read update-site-urls.md to understand the three-component architecture and URL update workflow
- [ ] Follow the step-by-step workflow in the doc to update URLs consistently across all three components (DigitalExperienceConfig, Network, CustomSite)
Configure Metadata: CustomSite
Purpose
This configuration file creates a net-new, default CustomSite metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing CustomSite record. Use this template only when provisioning a brand-new React site.
File Location
sites/{siteName}.site-meta.xmlDefault Template
<?xml version="1.0" encoding="UTF-8"?>
<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
<active>true</active>
<allowGuestPaymentsApi>false</allowGuestPaymentsApi>
<allowHomePage>false</allowHomePage>
<allowStandardAnswersPages>false</allowStandardAnswersPages>
<allowStandardIdeasPages>false</allowStandardIdeasPages>
<allowStandardLookups>false</allowStandardLookups>
<allowStandardPortalPages>true</allowStandardPortalPages>
<allowStandardSearch>false</allowStandardSearch>
<authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
<bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
<browserXssProtection>true</browserXssProtection>
<cachePublicVisualforcePagesInProxyServers>true</cachePublicVisualforcePagesInProxyServers>
<clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
<contentSniffingProtection>true</contentSniffingProtection>
<enableAuraRequests>true</enableAuraRequests>
<fileNotFoundPage>FileNotFound</fileNotFoundPage>
<genericErrorPage>Exception</genericErrorPage>
<inMaintenancePage>InMaintenance</inMaintenancePage>
<indexPage>CommunitiesLanding</indexPage>
<masterLabel>{siteName}</masterLabel>
<redirectToCustomDomain>false</redirectToCustomDomain>
<referrerPolicyOriginWhenCrossOrigin>true</referrerPolicyOriginWhenCrossOrigin>
<selfRegPage>CommunitiesSelfReg</selfRegPage>
<siteType>ChatterNetwork</siteType>
<urlPathPrefix>{siteUrlPathPrefix}vforcesite</urlPathPrefix>
</CustomSite>Configure Metadata: DigitalExperienceBundle
Purpose
This configuration file creates a net-new, default DigitalExperienceBundle metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing DigitalExperienceBundle record. Use this template only when provisioning a brand-new React site.
File Location
digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xmlDefault Template
<?xml version="1.0" encoding="UTF-8"?>
<DigitalExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<label>{siteName}1</label>
</DigitalExperienceBundle>Configure Metadata: DigitalExperienceConfig
Purpose
This configuration file creates a net-new, default DigitalExperienceConfig metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing DigitalExperienceConfig record. Use this template only when provisioning a brand-new React site.
File Location
digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xmlDefault Template
<?xml version="1.0" encoding="UTF-8"?>
<DigitalExperienceConfig xmlns="http://soap.sforce.com/2006/04/metadata">
<label>{siteName}</label>
<site>
<urlPathPrefix>{siteUrlPathPrefix}</urlPathPrefix>
</site>
<space>site/{siteName}1</space>
</DigitalExperienceConfig>Configure Metadata: DigitalExperience (sfdc_cms__site)
Purpose
These configuration files create net-new, default DigitalExperience content records (sfdc_cms__site type) for a Digital Experience React Site. They are not intended to edit or modify existing DigitalExperience content. Use these templates only when provisioning a brand-new React site.
The appContainer: true field in content.json is what makes this a React site rather than a standard LWR site. The appSpace field should be left empty if the UIBundle metadata record does not already exist. When the UIBundle exists, populate the appSpace value following the format {namespace}__{developerName} to match the deployed UIBundle metadata record.
File Location
The DigitalExperience directory contains only _meta.json and content.json. Do not create any directories other than sfdc_cms__site inside the bundle.
digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/_meta.json
digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/content.jsonDefault Templates
_meta.json
{
"apiName": "{siteName}1",
"path": "",
"type": "sfdc_cms__site"
}content.json
{
"type": "sfdc_cms__site",
"title": "{siteName}",
"urlName": "{siteUrlPathPrefix}",
"contentBody": {
"authenticationType": "AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED",
"appContainer": true,
"appSpace": ""
}
}Note: Leave appSpace empty ("") if the UIBundle does not exist. If the UIBundle metadata record is already deployed, populate it with "{appNamespace}__{appDevName}".
Configure Metadata: Network
Purpose
This configuration file creates a net-new, default Network metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing Network record. Use this template only when provisioning a brand-new React site.
File Location
networks/{siteName}.network-meta.xmlDefault Template
<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://soap.sforce.com/2006/04/metadata">
<allowInternalUserLogin>false</allowInternalUserLogin>
<allowMembersToFlag>false</allowMembersToFlag>
<changePasswordTemplate>unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
<disableReputationRecordConversations>true</disableReputationRecordConversations>
<emailSenderAddress>admin@company.com</emailSenderAddress>
<emailSenderName>{siteName}</emailSenderName>
<embeddedLoginEnabled>false</embeddedLoginEnabled>
<enableApexCDNCaching>true</enableApexCDNCaching>
<enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
<enableDirectMessages>true</enableDirectMessages>
<enableExpFriendlyUrlsAsDefault>false</enableExpFriendlyUrlsAsDefault>
<enableExperienceBundleBasedSnaOverrideEnabled>true</enableExperienceBundleBasedSnaOverrideEnabled>
<enableGuestChatter>{enableGuestAccess}</enableGuestChatter>
<enableGuestFileAccess>false</enableGuestFileAccess>
<enableGuestMemberVisibility>false</enableGuestMemberVisibility>
<enableImageOptimizationCDN>true</enableImageOptimizationCDN>
<enableInvitation>false</enableInvitation>
<enableKnowledgeable>false</enableKnowledgeable>
<enableLWRExperienceConnectedApp>false</enableLWRExperienceConnectedApp>
<enableMemberVisibility>false</enableMemberVisibility>
<enableNicknameDisplay>true</enableNicknameDisplay>
<enablePrivateMessages>false</enablePrivateMessages>
<enableReputation>false</enableReputation>
<enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
<enableSiteAsContainer>true</enableSiteAsContainer>
<enableTalkingAboutStats>true</enableTalkingAboutStats>
<enableTopicAssignmentRules>true</enableTopicAssignmentRules>
<enableTopicSuggestions>false</enableTopicSuggestions>
<enableUpDownVote>false</enableUpDownVote>
<forgotPasswordTemplate>unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
<gatherCustomerSentimentData>false</gatherCustomerSentimentData>
<headlessForgotPasswordTemplate>unfiled$public/CommunityHeadlessForgotPasswordTemplate</headlessForgotPasswordTemplate>
<headlessRegistrationTemplate>unfiled$public/CommunityHeadlessRegistrationTemplate</headlessRegistrationTemplate>
<networkMemberGroups>
<profile>admin</profile>
</networkMemberGroups>
<networkPageOverrides>
<changePasswordPageOverrideSetting>Standard</changePasswordPageOverrideSetting>
<forgotPasswordPageOverrideSetting>Designer</forgotPasswordPageOverrideSetting>
<homePageOverrideSetting>Designer</homePageOverrideSetting>
<loginPageOverrideSetting>Designer</loginPageOverrideSetting>
<selfRegProfilePageOverrideSetting>Designer</selfRegProfilePageOverrideSetting>
</networkPageOverrides>
<newSenderAddress>admin@company.com</newSenderAddress>
<picassoSite>{siteName}1</picassoSite>
<selfRegistration>false</selfRegistration>
<sendWelcomeEmail>true</sendWelcomeEmail>
<site>{siteName}</site>
<siteArchiveStatus>NotArchived</siteArchiveStatus>
<status>Live</status>
<tabs>
<defaultTab>home</defaultTab>
<standardTab>Chatter</standardTab>
</tabs>
<urlPathPrefix>{siteUrlPathPrefix}vforcesite</urlPathPrefix>
<welcomeTemplate>unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
</Network>Updating Experience Site URLs
Experience sites have a three-component architecture with two distinct URL patterns. Understanding this structure is critical when updating site URLs.
Architecture Overview
Every Salesforce Experience Site consists of three components:
1. Network (metadata: Network) - Network configuration 2. ChatterNetwork Site (metadata: CustomSite) - Legacy site and proxy core site services 3. ChatterNetworkPicasso Site (metadata: DigitalExperienceConfig + DigitalExperienceBundle) - Customer-facing pages and content
URL Pattern
These three components use two different URLs:
- Primary URL (ChatterNetworkPicasso): Used for customer-facing pages
- Defined in:
DigitalExperienceConfig→<urlPathPrefix> - Example:
mysite
- Secondary URL (Network + CustomSite): Used for legacy authentication endpoints and other services
- Defined in:
Network→<urlPathPrefix>ANDCustomSite→<urlPathPrefix> - Example:
mysitevforcesite - Must be synchronized - both files must have identical values
By default, Salesforce differentiates these URLs by appending vforcesite suffix to the Network/CustomSite URL.
URL Update Workflow
When updating site URLs, follow this workflow:
Step 1: Discover All URL References
Search for all occurrences of urlPathPrefix across the project metadata files.
For agents: Use the search_files tool with these parameters:
- path:
force-app/main/default - regex:
urlPathPrefix - file_pattern:
*.xml
For humans: Use your IDE's search functionality or command line tools:
# Using grep
grep -r "urlPathPrefix" force-app/main/default --include="*.xml"
# Using VS Code: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac)
# Search for: urlPathPrefix
# Files to include: *.xmlStep 2: Identify URL Groups
Determine which files belong to which URL group:
- Primary URL Group:
DigitalExperienceConfig - Secondary URL Group:
NetworkANDCustomSite
Step 3: Update URLs Consistently
Update the <urlPathPrefix> value in each file:
- DigitalExperienceConfig: Update to new primary URL
- Network: Update to new secondary URL (typically primary URL +
vforcesite) - CustomSite: Update to same value as Network (must be synchronized)
Step 4: Validate Naming Convention
Ensure URL values follow best practices:
- Use lowercase letters only
- Avoid special characters except hyphens where appropriate
- Keep URLs concise and meaningful
Step 5: Verify Consistency
Before deploying, confirm:
- [ ] Primary URL in
DigitalExperienceConfigis set correctly - [ ] Secondary URL in
NetworkmatchesCustomSiteexactly - [ ] URLs are properly differentiated (typically via suffix)
- [ ] All URL values follow naming conventions
Example URL Configuration
ChatterNetworkPicasso Site (Primary):
DigitalExperienceConfig: <urlPathPrefix>bestsupport</urlPathPrefix>
Network + ChatterNetwork Site (Secondary):
Network: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
CustomSite: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>Common Pitfalls to Avoid
❌ Don't update only one or two files - all three must be updated ❌ Don't use different values in Network and CustomSite ❌ Don't use the same URL for both Primary and Secondary groups ❌ Don't skip the discovery step with search_files ✅ Do use search_files to find all occurrences first ✅ Do maintain URL differentiation between the two groups ✅ Do follow lowercase naming conventions
Related skills
Forks & variants (1)
Generating Ui Bundle Site has 1 known copy in the catalog totaling 1.5k installs. They canonicalize to this original listing.
- forcedotcom - 1.5k installs
How it compares
Use generating-ui-bundle-site for new Salesforce React experience site scaffolding instead of manual CustomSite XML authoring.
FAQ
What causes a blank page after deploy?
Incorrect appNamespace or appDevName so appSpace does not match a real UIBundle record.
Must I read doc templates?
Yes. Load each docs/configure-metadata-*.md file fully before substituting placeholders.
Does this include LWR routes?
No. React bundle sites omit routes, views, theme layouts, and branding sets.
Is Generating Ui Bundle Site safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.