@salesforce/webapp-template-app-react-sample-b2x-experimental 1.69.0 → 1.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/CHANGELOG.md +16 -0
- package/dist/force-app/main/default/README.md +88 -0
- package/dist/force-app/main/default/webapplications/appreactsampleb2x/README.md +35 -0
- package/dist/force-app/main/default/webapplications/appreactsampleb2x/package.json +3 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# appreactsampleb2x
|
|
2
|
+
|
|
3
|
+
B2X (Business-to-Consumer) sample app — property listings, site container, and Experience Cloud deployment.
|
|
4
|
+
|
|
5
|
+
## In this monorepo
|
|
6
|
+
|
|
7
|
+
This package is a **template app** in the webapps monorepo. It is built by applying feature patches to the base React app; the output is written to `dist/`.
|
|
8
|
+
|
|
9
|
+
### Build
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
nx run appreactsampleb2x:build
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Produces an SFDX project in `dist/` with the web app at `dist/force-app/main/default/webapplications/appreactsampleb2x/`.
|
|
16
|
+
|
|
17
|
+
### Dev server
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
nx run appreactsampleb2x:dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Starts the Vite dev server from the built output in `dist/`.
|
|
24
|
+
|
|
25
|
+
### Watch
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
nx run appreactsampleb2x:watch
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Re-applies patches automatically when source files change.
|
|
32
|
+
|
|
33
|
+
### Test
|
|
34
|
+
|
|
35
|
+
This package has no dedicated test target. To run tests, build first, then run them from the built web app:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
nx run appreactsampleb2x:build
|
|
39
|
+
cd dist/force-app/main/default/webapplications/appreactsampleb2x && npm install && npm test
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Clean
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run clean
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Removes the `dist/` directory.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
For standalone run, deploy, and test instructions (e.g. after publishing or extracting `dist/`), see the [web app README](dist/force-app/main/default/webapplications/appreactsampleb2x/README.md).
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.71.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.70.0...v1.71.0) (2026-03-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.70.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.69.0...v1.70.0) (2026-03-04)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [1.69.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.68.1...v1.69.0) (2026-03-04)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# App React Sample B2X
|
|
2
|
+
|
|
3
|
+
A B2X (Business-to-Consumer) sample React web app for Salesforce Experience Cloud. Demonstrates property listings, maintenance requests, and a dashboard with an app shell designed for external-facing deployment. Built with React, Vite, TypeScript, and Tailwind/shadcn.
|
|
4
|
+
|
|
5
|
+
## What's included
|
|
6
|
+
|
|
7
|
+
| Path | Description |
|
|
8
|
+
| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `force-app/main/default/webapplications/appreactsampleb2x/` | React web app (source, config, tests) |
|
|
10
|
+
| `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 |
|
|
11
|
+
| `force-app/main/default/layouts/` | Page layouts for each custom object |
|
|
12
|
+
| `force-app/main/default/permissionsets/` | `Property_Management_Access` permission set |
|
|
13
|
+
| `force-app/main/default/classes/` | Apex classes — `MaintenanceRequestListAction`, `MaintenanceRequestUpdatePriorityAction` |
|
|
14
|
+
| `force-app/main/default/cspTrustedSites/` | CSP trusted sites for external resources (Google Fonts, Pexels, Unsplash, GitHub Avatars) |
|
|
15
|
+
| `force-app/main/default/data/` | Sample data (JSON) for all objects, importable via `sf data import tree` |
|
|
16
|
+
| `force-app/main/default/digitalExperienceConfigs/` | Experience Cloud site configuration |
|
|
17
|
+
| `force-app/main/default/digitalExperiences/` | Experience Cloud site definition |
|
|
18
|
+
| `force-app/main/default/networks/` | Experience Cloud network |
|
|
19
|
+
| `force-app/main/default/sites/` | Salesforce site |
|
|
20
|
+
|
|
21
|
+
## Getting started
|
|
22
|
+
|
|
23
|
+
Navigate to the web app and install dependencies:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd force-app/main/default/webapplications/appreactsampleb2x
|
|
27
|
+
npm install
|
|
28
|
+
npm run dev
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Opens at http://localhost:5173 by default. For build and test instructions, see the [web app README](force-app/main/default/webapplications/appreactsampleb2x/README.md).
|
|
32
|
+
|
|
33
|
+
## Deploy
|
|
34
|
+
|
|
35
|
+
### Deploy everything (metadata + Experience Cloud site + web app)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd force-app/main/default/webapplications/appreactsampleb2x && npm install && npm run build && cd -
|
|
39
|
+
sf project deploy start --source-dir force-app --target-org <alias>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Deploy the web app only
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd force-app/main/default/webapplications/appreactsampleb2x && npm install && npm run build && cd -
|
|
46
|
+
sf project deploy start --source-dir force-app/main/default/webapplications --target-org <alias>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Deploy metadata only (objects, layouts, permission sets, Apex classes)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
sf project deploy start \
|
|
53
|
+
--source-dir force-app/main/default/objects \
|
|
54
|
+
--source-dir force-app/main/default/layouts \
|
|
55
|
+
--source-dir force-app/main/default/permissionsets \
|
|
56
|
+
--source-dir force-app/main/default/classes \
|
|
57
|
+
--target-org <alias>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Deploy Experience Cloud site only
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
sf project deploy start \
|
|
64
|
+
--source-dir force-app/main/default/digitalExperienceConfigs \
|
|
65
|
+
--source-dir force-app/main/default/digitalExperiences \
|
|
66
|
+
--source-dir force-app/main/default/networks \
|
|
67
|
+
--source-dir force-app/main/default/sites \
|
|
68
|
+
--target-org <alias>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Replace `<alias>` with your target org alias.
|
|
72
|
+
|
|
73
|
+
## Import sample data
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
sf data import tree --plan force-app/main/default/data/data-plan.json --target-org <alias>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Configure Your Salesforce DX Project
|
|
80
|
+
|
|
81
|
+
The `sfdx-project.json` file contains useful configuration information for your project. See [Salesforce DX Project Configuration](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm) in the _Salesforce DX Developer Guide_ for details about this file.
|
|
82
|
+
|
|
83
|
+
## Read All About It
|
|
84
|
+
|
|
85
|
+
- [Salesforce Extensions Documentation](https://developer.salesforce.com/tools/vscode/)
|
|
86
|
+
- [Salesforce CLI Setup Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm)
|
|
87
|
+
- [Salesforce DX Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm)
|
|
88
|
+
- [Salesforce CLI Command Reference](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# App React Sample B2X
|
|
2
|
+
|
|
3
|
+
A sample B2X (Business-to-Consumer) React web app with an app shell for Salesforce Experience Cloud. Includes property listings, maintenance requests, and a dashboard. Built with React, Vite, TypeScript, and Tailwind/shadcn.
|
|
4
|
+
|
|
5
|
+
For project-level details (metadata, deploy, sample data), see the [project README](../../../../../../README.md).
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Run (development)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm run dev
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Starts the Vite dev server (default: http://localhost:5173).
|
|
20
|
+
|
|
21
|
+
## Build
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run build
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Writes the production bundle to `dist/` inside the web app folder.
|
|
28
|
+
|
|
29
|
+
## Test
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm test
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Runs the unit test suite (Vitest).
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/sdk-data": "^1.
|
|
19
|
-
"@salesforce/webapp-experimental": "^1.
|
|
18
|
+
"@salesforce/sdk-data": "^1.71.0",
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.71.0",
|
|
20
20
|
"@tailwindcss/vite": "^4.1.17",
|
|
21
21
|
"@tanstack/react-form": "^1.28.4",
|
|
22
22
|
"@types/leaflet": "^1.9.21",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
44
44
|
"@graphql-tools/utils": "^11.0.0",
|
|
45
45
|
"@playwright/test": "^1.49.0",
|
|
46
|
-
"@salesforce/vite-plugin-webapp-experimental": "^1.
|
|
46
|
+
"@salesforce/vite-plugin-webapp-experimental": "^1.71.0",
|
|
47
47
|
"@testing-library/jest-dom": "^6.6.3",
|
|
48
48
|
"@testing-library/react": "^16.1.0",
|
|
49
49
|
"@testing-library/user-event": "^14.5.2",
|
package/dist/package.json
CHANGED
package/package.json
CHANGED