Rename webapp/webapplication to UI bundle across the codebase

Directory renames: webapplications/ → uiBundles/, samples dirs drop -experimental suffix
File renames: *.webapplication-meta.xml → *.uibundle-meta.xml, webapplication.json → ui-bundle.json
XML metadata: <WebApplication> → <UIBundle>
NPM packages: @salesforce/webapp-* → @salesforce/ui-bundle-*
Skill names: *-webapplication-* → *-salesforce-ui-bundle-*
CLI references: sf webapp → sf ui-bundle
Source code: function/variable/type names, import paths, string literals updated
ESLint config: Added .worktrees/** to ignores
CHANGELOG repo URLs preserved
This commit is contained in:
k-j-kim 2026-03-27 17:54:18 -07:00
parent 1101b0929c
commit 445ac2f126
No known key found for this signature in database
GPG Key ID: 40FA25A7DE938B04
857 changed files with 805 additions and 805 deletions

View File

@ -1,6 +1,6 @@
# Syncs React sample packages from npm into samples/:
# - @salesforce/webapp-template-app-react-sample-b2e-experimental
# - @salesforce/webapp-template-app-react-sample-b2x-experimental
# - @salesforce/ui-bundle-template-app-react-sample-b2e
# - @salesforce/ui-bundle-template-app-react-sample-b2x
#
# Opens a single PR when either (or both) npm package versions have changed.
# Same steps as running locally: npm install && npm run sync-react-b2e-sample
@ -37,7 +37,7 @@ jobs:
- name: Get latest B2E npm version
id: npm-version-b2e
run: |
LATEST=$(npm view @salesforce/webapp-template-app-react-sample-b2e-experimental version)
LATEST=$(npm view @salesforce/ui-bundle-template-app-react-sample-b2e version)
if [ -z "$LATEST" ]; then
echo "ERROR: npm view returned empty version for B2E package" >&2
exit 1
@ -47,7 +47,7 @@ jobs:
- name: Read current synced B2E version
id: current-version-b2e
run: |
VERSION_FILE="samples/webapp-template-app-react-sample-b2e-experimental/.version"
VERSION_FILE="samples/ui-bundle-template-app-react-sample-b2e/.version"
if [ -f "$VERSION_FILE" ]; then
CURRENT=$(cat "$VERSION_FILE" | tr -d '[:space:]')
echo "current=$CURRENT" >> $GITHUB_OUTPUT
@ -59,7 +59,7 @@ jobs:
- name: Get latest B2X npm version
id: npm-version-b2x
run: |
LATEST=$(npm view @salesforce/webapp-template-app-react-sample-b2x-experimental version)
LATEST=$(npm view @salesforce/ui-bundle-template-app-react-sample-b2x version)
if [ -z "$LATEST" ]; then
echo "ERROR: npm view returned empty version for 2x package" >&2
exit 1
@ -69,7 +69,7 @@ jobs:
- name: Read current synced B2X version
id: current-version-b2x
run: |
VERSION_FILE="samples/webapp-template-app-react-sample-b2x-experimental/.version"
VERSION_FILE="samples/ui-bundle-template-app-react-sample-b2x/.version"
if [ -f "$VERSION_FILE" ]; then
CURRENT=$(cat "$VERSION_FILE" | tr -d '[:space:]')
echo "current=$CURRENT" >> $GITHUB_OUTPUT
@ -109,11 +109,11 @@ jobs:
- name: Install latest B2E package
if: steps.skip.outputs.skip != 'true' && steps.skip.outputs.b2e_changed == 'true'
run: npm install @salesforce/webapp-template-app-react-sample-b2e-experimental@latest
run: npm install @salesforce/ui-bundle-template-app-react-sample-b2e@latest
- name: Install latest B2X package
if: steps.skip.outputs.skip != 'true' && steps.skip.outputs.b2x_changed == 'true'
run: npm install @salesforce/webapp-template-app-react-sample-b2x-experimental@latest
run: npm install @salesforce/ui-bundle-template-app-react-sample-b2x@latest
- name: Sync B2E sample
if: steps.skip.outputs.skip != 'true'
@ -133,12 +133,12 @@ jobs:
if [ "${{ steps.skip.outputs.b2e_changed }}" = "true" ]; then
PARTS="${PARTS}b2e-${{ steps.npm-version-b2e.outputs.latest }}"
BODY="${BODY}- **B2E** \`@salesforce/webapp-template-app-react-sample-b2e-experimental\`: ${{ steps.current-version-b2e.outputs.current || 'none' }} → ${{ steps.npm-version-b2e.outputs.latest }}"$'\n'
BODY="${BODY}- **B2E** \`@salesforce/ui-bundle-template-app-react-sample-b2e\`: ${{ steps.current-version-b2e.outputs.current || 'none' }} → ${{ steps.npm-version-b2e.outputs.latest }}"$'\n'
fi
if [ "${{ steps.skip.outputs.b2x_changed }}" = "true" ]; then
if [ -n "$PARTS" ]; then PARTS="${PARTS}-"; fi
PARTS="${PARTS}b2x-${{ steps.npm-version-b2x.outputs.latest }}"
BODY="${BODY}- **B2X** \`@salesforce/webapp-template-app-react-sample-b2x-experimental\`: ${{ steps.current-version-b2x.outputs.current || 'none' }} → ${{ steps.npm-version-b2x.outputs.latest }}"$'\n'
BODY="${BODY}- **B2X** \`@salesforce/ui-bundle-template-app-react-sample-b2x\`: ${{ steps.current-version-b2x.outputs.current || 'none' }} → ${{ steps.npm-version-b2x.outputs.latest }}"$'\n'
fi
echo "branch=chore/sync-react-samples-${PARTS}" >> $GITHUB_OUTPUT

View File

@ -1,10 +1,10 @@
{
"@salesforce/webapp-template-app-react-sample-b2e-experimental": "1.107.0",
"@salesforce/webapp-template-app-react-sample-b2x-experimental": "1.107.0",
"@salesforce/webapp-template-base-sfdx-project-experimental": "1.107.0",
"@salesforce/webapp-template-feature-react-file-upload-experimental": "1.107.0",
"@salesforce/webapp-template-feature-react-chart-experimental": "1.107.0",
"@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental": "1.107.0",
"@salesforce/webapp-template-feature-micro-frontend": "1.107.0",
"@salesforce/webapps-features-experimental": "1.107.0"
"@salesforce/ui-bundle-template-app-react-sample-b2e": "1.107.0",
"@salesforce/ui-bundle-template-app-react-sample-b2x": "1.107.0",
"@salesforce/ui-bundle-template-base-sfdx-project": "1.107.0",
"@salesforce/ui-bundle-template-feature-react-file-upload": "1.107.0",
"@salesforce/ui-bundle-template-feature-react-chart": "1.107.0",
"@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client": "1.107.0",
"@salesforce/ui-bundle-template-feature-micro-frontend": "1.107.0",
"@salesforce/ui-bundle-features": "1.107.0"
}

View File

@ -22,7 +22,7 @@
### Features
* consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ ([#81](https://github.com/forcedotcom/afv-library/issues/81)) ([9190b5c](https://github.com/forcedotcom/afv-library/commit/9190b5c97aa6ca3c7c355cac6a7417924bcdcc0f))
* consolidate UI bundle data skills into using-salesforce-ui-bundle-salesforce-data @W-21338965@ ([#81](https://github.com/forcedotcom/afv-library/issues/81)) ([9190b5c](https://github.com/forcedotcom/afv-library/commit/9190b5c97aa6ca3c7c355cac6a7417924bcdcc0f))
@ -37,7 +37,7 @@
### Features
* Add switching-org skill @W-21436488@ ([#74](https://github.com/forcedotcom/afv-library/issues/74)) ([5c40e3b](https://github.com/forcedotcom/afv-library/commit/5c40e3b63ed81e9559a4d64c82f112a94c5c2566))
* syncing webapp skills sync to afv @W-21338965@ ([#57](https://github.com/forcedotcom/afv-library/issues/57)) ([9ba0641](https://github.com/forcedotcom/afv-library/commit/9ba064174a714e487c683b986c3c6e08d478b784))
* syncing UI bundle skills sync to afv @W-21338965@ ([#57](https://github.com/forcedotcom/afv-library/issues/57)) ([9ba0641](https://github.com/forcedotcom/afv-library/commit/9ba064174a714e487c683b986c3c6e08d478b784))

View File

@ -17,7 +17,7 @@ afv-library/
│ ├── generating-flow/
│ └── ...
├── samples/ # Synced sample apps (e.g. from npm)
│ └── webapp-template-app-react-sample-b2e-experimental/
│ └── ui-bundle-template-app-react-sample-b2e/
│ └── ...
├── scripts/
│ └── ...
@ -30,7 +30,7 @@ Browse the repository and copy/paste any rule or skill directly into Agentforce
## Samples
The `samples/` folder contains synced sample apps. For example, `samples/webapp-template-app-react-sample-b2e-experimental/` is kept in sync with the npm package `@salesforce/webapp-template-app-react-sample-b2e-experimental` (nightly and on manual trigger via GitHub Actions). To run the same sync locally from the repo root:
The `samples/` folder contains synced sample apps. For example, `samples/ui-bundle-template-app-react-sample-b2e/` is kept in sync with the npm package `@salesforce/ui-bundle-template-app-react-sample-b2e` (nightly and on manual trigger via GitHub Actions). To run the same sync locally from the repo root:
```bash
npm install

18
package-lock.json generated
View File

@ -9,8 +9,8 @@
"version": "1.5.0",
"license": "CC-BY-NC-4.0",
"devDependencies": {
"@salesforce/webapp-template-app-react-sample-b2e-experimental": "^1.116.6",
"@salesforce/webapp-template-app-react-sample-b2x-experimental": "^1.116.6",
"@salesforce/ui-bundle-template-app-react-sample-b2e": "^1.116.6",
"@salesforce/ui-bundle-template-app-react-sample-b2x": "^1.116.6",
"@types/js-yaml": "^4.0.9",
"js-yaml": "^4.1.1",
"tsx": "^4.21.0"
@ -716,9 +716,9 @@
"node": ">=18.0.0"
}
},
"node_modules/@salesforce/webapp-experimental": {
"node_modules/@salesforce/ui-bundle": {
"version": "1.116.6",
"resolved": "https://registry.npmjs.org/@salesforce/webapp-experimental/-/webapp-experimental-1.116.6.tgz",
"resolved": "https://registry.npmjs.org/@salesforce/ui-bundle/-/webapp-experimental-1.116.6.tgz",
"integrity": "sha512-bbWVK70rv5Y+e26NLyTB2McTZ3MCQFe+NEYZDW/T4FCaAZ3Y57u1HYzgr8p4iWKlu7DU4V1sNTUGjt01mrN0Dg==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.txt",
@ -733,20 +733,20 @@
"node": ">=20.0.0"
}
},
"node_modules/@salesforce/webapp-template-app-react-sample-b2e-experimental": {
"node_modules/@salesforce/ui-bundle-template-app-react-sample-b2e": {
"version": "1.116.6",
"resolved": "https://registry.npmjs.org/@salesforce/webapp-template-app-react-sample-b2e-experimental/-/webapp-template-app-react-sample-b2e-experimental-1.116.6.tgz",
"resolved": "https://registry.npmjs.org/@salesforce/ui-bundle-template-app-react-sample-b2e/-/ui-bundle-template-app-react-sample-b2e-1.116.6.tgz",
"integrity": "sha512-RctkFfBfK+7HLAnP2ERmXG3Nn8apFF4ywh5LlSyOJVUjbQI48kd7PeiCX5v5G4C5Kvqp7wyhhucY0Mk4k8PLEQ==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.txt",
"dependencies": {
"@salesforce/webapp-experimental": "^1.116.6",
"@salesforce/ui-bundle": "^1.116.6",
"sonner": "^1.7.0"
}
},
"node_modules/@salesforce/webapp-template-app-react-sample-b2x-experimental": {
"node_modules/@salesforce/ui-bundle-template-app-react-sample-b2x": {
"version": "1.116.6",
"resolved": "https://registry.npmjs.org/@salesforce/webapp-template-app-react-sample-b2x-experimental/-/webapp-template-app-react-sample-b2x-experimental-1.116.6.tgz",
"resolved": "https://registry.npmjs.org/@salesforce/ui-bundle-template-app-react-sample-b2x/-/ui-bundle-template-app-react-sample-b2x-1.116.6.tgz",
"integrity": "sha512-Ql5l+WRvAIQ0iNTutj3k0GDjHRI7wwAbXjzBRKeCR3Tp0pHEXeoKuqj1AACxCv1APAvTOne4cvzb11eJblDOLA==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.txt"

View File

@ -11,8 +11,8 @@
"registry": "https://registry.npmjs.org"
},
"devDependencies": {
"@salesforce/webapp-template-app-react-sample-b2e-experimental": "^1.116.6",
"@salesforce/webapp-template-app-react-sample-b2x-experimental": "^1.116.6",
"@salesforce/ui-bundle-template-app-react-sample-b2e": "^1.116.6",
"@salesforce/ui-bundle-template-app-react-sample-b2x": "^1.116.6",
"@types/js-yaml": "^4.0.9",
"js-yaml": "^4.1.1",
"tsx": "^4.21.0"

View File

@ -2,9 +2,9 @@
Sample apps and templates synced into this repo for reference and reuse.
## webapp-template-app-react-sample-b2e-experimental
## ui-bundle-template-app-react-sample-b2e
Source is synced from the npm package [@salesforce/webapp-template-app-react-sample-b2e-experimental](https://www.npmjs.com/package/@salesforce/webapp-template-app-react-sample-b2e-experimental). Only the package's source (no `node_modules`) is copied into `samples/webapp-template-app-react-sample-b2e-experimental/`.
Source is synced from the npm package [@salesforce/ui-bundle-template-app-react-sample-b2e](https://www.npmjs.com/package/@salesforce/ui-bundle-template-app-react-sample-b2e). Only the package's source (no `node_modules`) is copied into `samples/ui-bundle-template-app-react-sample-b2e/`.
### How it's updated
@ -16,15 +16,15 @@ Source is synced from the npm package [@salesforce/webapp-template-app-react-sam
npm run sync-react-b2e-sample
```
This installs the package into root `node_modules` and copies its source into `samples/webapp-template-app-react-sample-b2e-experimental/`, and updates `.version` in that folder.
This installs the package into root `node_modules` and copies its source into `samples/ui-bundle-template-app-react-sample-b2e/`, and updates `.version` in that folder.
### Version tracking
The file `samples/webapp-template-app-react-sample-b2e-experimental/.version` stores the last-synced npm version. The Action compares it to the latest on npm and only creates a PR when they differ.
The file `samples/ui-bundle-template-app-react-sample-b2e/.version` stores the last-synced npm version. The Action compares it to the latest on npm and only creates a PR when they differ.
## webapp-template-app-react-sample-b2x-experimental
## ui-bundle-template-app-react-sample-b2x
Source is synced from the npm package [@salesforce/webapp-template-app-react-sample-b2x-experimental](https://www.npmjs.com/package/@salesforce/webapp-template-app-react-sample-b2x-experimental). Only the package's source (no `node_modules`) is copied into `samples/webapp-template-app-react-sample-b2x-experimental/`.
Source is synced from the npm package [@salesforce/ui-bundle-template-app-react-sample-b2x](https://www.npmjs.com/package/@salesforce/ui-bundle-template-app-react-sample-b2x). Only the package's source (no `node_modules`) is copied into `samples/ui-bundle-template-app-react-sample-b2x/`.
### How it's updated
@ -36,11 +36,11 @@ Source is synced from the npm package [@salesforce/webapp-template-app-react-sam
npm run sync-react-b2x-sample
```
This installs the package into root `node_modules` and copies its source into `samples/webapp-template-app-react-sample-b2x-experimental/`, and updates `.version` in that folder.
This installs the package into root `node_modules` and copies its source into `samples/ui-bundle-template-app-react-sample-b2x/`, and updates `.version` in that folder.
### Version tracking
The file `samples/webapp-template-app-react-sample-b2x-experimental/.version` stores the last-synced npm version. The Action compares it to the latest on npm and only creates a PR when they differ.
The file `samples/ui-bundle-template-app-react-sample-b2x/.version` stores the last-synced npm version. The Action compares it to the latest on npm and only creates a PR when they differ.
## native-mobile-rental-tenant-app

View File

@ -1,6 +1,6 @@
# Agent guide: SFDX project with React web app
# Agent guide: SFDX project with React UI bundle
This project is a **Salesforce DX (SFDX) project** containing a **React web application**. The SFDX source path is defined in `sfdx-project.json` (`packageDirectories[].path`); the web app lives under `<sfdx-source>/webapplications/<appName>/`. Use this file when working in this directory.
This project is a **Salesforce DX (SFDX) project** containing a **React UI bundle**. The SFDX source path is defined in `sfdx-project.json` (`packageDirectories[].path`); the UI bundle lives under `<sfdx-source>/uiBundles/<appName>/`. Use this file when working in this directory.
## SFDX Source Path
@ -9,13 +9,13 @@ The source path prefix is **not** always `force-app`. Read `sfdx-project.json` a
## Project layout
- **Project root**: this directory — SFDX project root. Contains `sfdx-project.json`, the SFDX source directory, and (optionally) LWC/Aura.
- **React web app**: `<sfdx-source>/webapplications/<appName>/`
- **React UI bundle**: `<sfdx-source>/uiBundles/<appName>/`
- Replace `<appName>` with the actual app folder name (e.g. `base-react-app`, or the name chosen when the app was generated).
- Entry: `src/App.tsx`
- Routes: `src/routes.tsx`
- API/GraphQL: `src/api/` (e.g. `graphql.ts`, `graphql-operations-types.ts`, `utils/`)
Path convention: **webapplications** (lowercase).
Path convention: **uiBundles** (lowercase).
## Two package.json contexts
@ -30,16 +30,16 @@ Used for SFDX metadata (LWC, Aura, etc.). Scripts here are for the base SFDX tem
| `npm run prettier` | Format supported metadata files |
| `npm run prettier:verify` | Check Prettier |
**One-command setup:** From project root run `node scripts/setup-cli.mjs --target-org <alias>` to run login (if needed), deploy, optional permset/data import, GraphQL schema/codegen, web app build, and optionally the dev server. Use `node scripts/setup-cli.mjs --help` for options (e.g. `--skip-login`, `--skip-data`, `--webapp-name`).
**One-command setup:** From project root run `node scripts/setup-cli.mjs --target-org <alias>` to run login (if needed), deploy, optional permset/data import, GraphQL schema/codegen, UI bundle build, and optionally the dev server. Use `node scripts/setup-cli.mjs --help` for options (e.g. `--skip-login`, `--skip-data`, `--ui-bundle-name`).
Root **does not** run the React app. The root `npm run build` is a no-op for the base SFDX project.
### 2. React web app (where you do most work)
### 2. React UI bundle (where you do most work)
**Always `cd` into the web app directory for dev/build/lint/test:**
**Always `cd` into the UI bundle directory for dev/build/lint/test:**
```bash
cd <sfdx-source>/webapplications/<appName>
cd <sfdx-source>/uiBundles/<appName>
```
| Command | Purpose |
@ -52,29 +52,29 @@ cd <sfdx-source>/webapplications/<appName>
| `npm run graphql:codegen` | Generate GraphQL types |
| `npm run graphql:schema` | Fetch GraphQL schema |
**Before finishing changes:** run `npm run build` and `npm run lint` from the web app directory; both must succeed.
**Before finishing changes:** run `npm run build` and `npm run lint` from the UI bundle directory; both must succeed.
## Agent rules (.a4drules/)
Markdown rules at the project root under **.a4drules/** define platform constraints:
- **`.a4drules/webapp-ui.md`** — Salesforce Web Application UI (scaffold with `sf webapp generate`, no LWC/Aura for new UI).
- **`.a4drules/webapp-data.md`** — Salesforce data access (Data SDK only, supported APIs, GraphQL workflow, `scripts/graphql-search.sh` for schema lookup).
- **`.a4drules/ui-bundle-ui.md`** — Salesforce UI Bundle UI (scaffold with `sf ui-bundle generate`, no LWC/Aura for new UI).
- **`.a4drules/ui-bundle-data.md`** — Salesforce data access (Data SDK only, supported APIs, GraphQL workflow, `scripts/graphql-search.sh` for schema lookup).
When rules refer to "web app directory" or `<sfdx-source>/webapplications/<appName>/`, resolve `<sfdx-source>` from `sfdx-project.json` and use the **actual app folder name** for this project.
When rules refer to "UI bundle directory" or `<sfdx-source>/uiBundles/<appName>/`, resolve `<sfdx-source>` from `sfdx-project.json` and use the **actual app folder name** for this project.
## Deploying
**Deployment order:** Metadata (objects, permission sets) must be deployed before GraphQL schema fetch. After any metadata deployment, re-run `npm run graphql:schema` and `npm run graphql:codegen` from the webapp dir. **One-command setup:** `node scripts/setup-cli.mjs --target-org <alias>` runs deploy → permset → schema → codegen in the correct order.
**Deployment order:** Metadata (objects, permission sets) must be deployed before GraphQL schema fetch. After any metadata deployment, re-run `npm run graphql:schema` and `npm run graphql:codegen` from the UI bundle dir. **One-command setup:** `node scripts/setup-cli.mjs --target-org <alias>` runs deploy → permset → schema → codegen in the correct order.
From **this project root** (resolve the actual SFDX source path from `sfdx-project.json`):
```bash
# Build the React app first (replace <sfdx-source> and <appName> with actual values)
cd <sfdx-source>/webapplications/<appName> && npm i && npm run build && cd -
cd <sfdx-source>/uiBundles/<appName> && npm i && npm run build && cd -
# Deploy web app only (replace <sfdx-source> with actual path, e.g. force-app/main/default)
sf project deploy start --source-dir <sfdx-source>/webapplications --target-org <alias>
# Deploy UI bundle only (replace <sfdx-source> with actual path, e.g. force-app/main/default)
sf project deploy start --source-dir <sfdx-source>/uiBundles --target-org <alias>
# Deploy all metadata (use the top-level package directory, e.g. force-app)
sf project deploy start --source-dir <packageDir> --target-org <alias>
@ -84,4 +84,4 @@ sf project deploy start --source-dir <packageDir> --target-org <alias>
- **UI**: shadcn/ui + Tailwind. Import from `@/components/ui/...`.
- **Entry**: Keep `App.tsx` and routes in `src/`; add features as new routes or sections, don't replace the app shell but you may modify it to match the requested design.
- **Data (Salesforce)**: Follow `.a4drules/webapp-data.md` for all Salesforce data access. Use the Data SDK (`createDataSDK()` + `sdk.graphql` or `sdk.fetch`) — never use `fetch` or `axios` directly. GraphQL is preferred; use `sdk.fetch` when GraphQL is not sufficient.
- **Data (Salesforce)**: Follow `.a4drules/ui-bundle-data.md` for all Salesforce data access. Use the Data SDK (`createDataSDK()` + `sdk.graphql` or `sdk.fetch`) — never use `fetch` or `axios` directly. GraphQL is preferred; use `sdk.fetch` when GraphQL is not sufficient.

View File

@ -1,12 +1,12 @@
# Property Management App
A property management sample React web app for the Salesforce platform. Demonstrates property management, maintenance requests, tenant applications, a dashboard, and an Agentforce conversation client. Built with React, Vite, TypeScript, and Tailwind/shadcn.
A property management sample React UI bundle for the Salesforce platform. Demonstrates property management, maintenance requests, tenant applications, a dashboard, and an Agentforce conversation client. Built with React, Vite, TypeScript, and Tailwind/shadcn.
## What's included
| Path | Description |
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `force-app/main/default/webapplications/propertymanagementapp/` | React web app (source, config, tests) |
| `force-app/main/default/uiBundles/propertymanagementapp/` | React UI bundle (source, config, tests) |
| `force-app/main/default/objects/` | 17 custom objects — Agent\_\_c, Application\_\_c, KPI_Snapshot\_\_c, Lease\_\_c, Maintenance_Request\_\_c, Maintenance_Worker\_\_c, Notification\_\_c, Payment\_\_c, Property\_\_c, Property_Cost\_\_c, Property_Feature\_\_c, Property_Image\_\_c, Property_Listing\_\_c, Property_Management_Company\_\_c, Property_Owner\_\_c, Property_Sale\_\_c, Tenant\_\_c |
| `force-app/main/default/layouts/` | Page layouts for each custom object |
| `force-app/main/default/permissionsets/` | `Property_Management_Access` permission set |
@ -14,30 +14,30 @@ A property management sample React web app for the Salesforce platform. Demonstr
## Getting started
Navigate to the web app and install dependencies:
Navigate to the UI bundle and install dependencies:
```bash
cd force-app/main/default/webapplications/propertymanagementapp
cd force-app/main/default/uiBundles/propertymanagementapp
npm install
npm run dev
```
Opens at http://localhost:5173 by default. For build and test instructions, see the [web app README](force-app/main/default/webapplications/propertymanagementapp/README.md).
Opens at http://localhost:5173 by default. For build and test instructions, see the [UI bundle README](force-app/main/default/uiBundles/propertymanagementapp/README.md).
## Deploy
### Deploy everything (metadata + web app)
```bash
cd force-app/main/default/webapplications/propertymanagementapp && npm install && npm run build && cd -
cd force-app/main/default/uiBundles/propertymanagementapp && npm install && npm run build && cd -
sf project deploy start --source-dir force-app --target-org <alias>
```
### Deploy the web app only
### Deploy the UI bundle only
```bash
cd force-app/main/default/webapplications/propertymanagementapp && npm install && npm run build && cd -
sf project deploy start --source-dir force-app/main/default/webapplications --target-org <alias>
cd force-app/main/default/uiBundles/propertymanagementapp && npm install && npm run build && cd -
sf project deploy start --source-dir force-app/main/default/uiBundles --target-org <alias>
```
### Deploy metadata only (objects, layouts, permission sets)
@ -70,7 +70,7 @@ sf data import tree --plan force-app/main/default/data/data-plan.json --target-o
## Using setup-cli.mjs
When this app is built (e.g. from the monorepo or from a published package), a `setup-cli.mjs` script is included at the project root. It runs the full setup in one go: login (if needed), deploy metadata, assign the `Property_Management_Access` permission set, prepare and import sample data, fetch GraphQL schema and run codegen, build the web app, and optionally start the dev server.
When this app is built (e.g. from the monorepo or from a published package), a `setup-cli.mjs` script is included at the project root. It runs the full setup in one go: login (if needed), deploy metadata, assign the `Property_Management_Access` permission set, prepare and import sample data, fetch GraphQL schema and run codegen, build the UI bundle, and optionally start the dev server.
Run from the **project root** (the directory that contains `force-app/`, `sfdx-project.json`, and `setup-cli.mjs`):
@ -85,7 +85,7 @@ Common options:
| `--skip-login` | Skip browser login (org already authenticated) |
| `--skip-data` | Skip data preparation and import |
| `--skip-graphql` | Skip GraphQL schema fetch and codegen |
| `--skip-webapp-build` | Skip `npm install` and web app build |
| `--skip-ui-bundle-build` | Skip `npm install` and UI bundle build |
| `--skip-dev` | Do not start the dev server at the end |
| `--permset <name>` | Permission set to assign (default: `Property_Management_Access`) |
| `--app <name>` | Web app folder name when multiple exist |

Some files were not shown because too many files have changed in this diff Show More