ReserveWorks Source Edition — installation

Prerequisites
Use Salesforce CLI (sf), Python 3.10+, and a Salesforce administrator with
metadata deployment permissions. VS Code is optional. No Node/npm dependency
installation is needed to deploy this download.

Use a NEW Developer Edition org or clean sandbox with Apex and Lightning.
The current documented financial scope is single-currency CAD. Confirm the
currency in Setup > Company Information before entering financial data.
Do not run the schema bootstrap against an existing ReserveWorks installation:
it temporarily replaces the app Administrator permission set. Installing over
existing components also requires an access/data migration plan and backup.

1. Extract the ZIP and open a terminal in its reserveworks-source folder.
   All commands below work in Bash or PowerShell and should be run one at a time.
   Stop if any command fails; do not proceed after a failed deployment.

2. Authenticate to YOUR destination org (do not use the publisher's org).
   Developer Edition:
   sf org login web --alias rw-download --instance-url https://login.salesforce.com
   Sandbox: use https://test.salesforce.com instead.
   sf org display --target-org rw-download
   Confirm the displayed org ID and username are your intended destination.

3. Verify the source manifest and prepare a temporary schema stage OUTSIDE
   the extracted project. Use an unused sibling directory name:
   python scripts/build/make_manifest.py force-app/main/default --verify manifest/package.xml
   python scripts/build/make_schema_bootstrap.py --out ../reserveworks-schema-bootstrap

4. Deploy the schema stage, then grant the deploying user field access:
   sf project deploy start --source-dir ../reserveworks-schema-bootstrap/force-app/main/default --target-org rw-download --test-level NoTestRun --wait 20
   sf org assign permset --name ReserveWorks_Administrator --target-org rw-download

5. Deploy the complete app and run its tests:
   sf project deploy start --manifest manifest/package.xml --target-org rw-download --test-level RunLocalTests --wait 30
   If still running after the wait, use the job ID shown by the CLI:
   sf project deploy report --job-id YOUR_JOB_ID --target-org rw-download --wait 30
   Confirm Succeeded and zero failed tests. A failed deployment is not an install.
   Restore the full app permission set assignment and open the app:
   sf org assign permset --name ReserveWorks_Administrator --target-org rw-download
   sf org open --target-org rw-download --path /lightning/app/c__ReserveWorks

6. Complete administrator setup before staff use:
   - Review sample pricing rules/settings through Setup > Custom Metadata Types.
   - Assign ReserveWorks_Engineer or ReserveWorks_Proposal_User as appropriate.
     ReserveWorks_Administrator grants broad app data privileges; limit its use.
   - Ensure Lightning Experience User is enabled for intended users.
   - Assign the installed ReserveWorks page layouts to operator profiles.
     Document_Request Layout includes Files; Funding_Scenario Layout includes
     Year 1 Annual Contribution. Permission sets do not assign page layouts.
   - Corporation, Proposal, Study Project and Client Team Member use Private
     sharing. Staff need explicit active Client Team Member access in addition
     to their role permission set. Review record ownership and other access.
   - Test one client visible / another client hidden with an ordinary staff
     user, then test membership revocation. Do not use an admin for this check.
   Read docs/administrator-guide.md and docs/user-guide.md for workflows.

Keeping your changes
Recipients own their deployed source and customizations. Keep it in version
control and back up records. This distribution has no automatic upgrades;
compare and test future source releases before deployment. The included
metadata does not import client records or demo transactions.

Validation scope
This download is checked for archive integrity, complete source inventory,
schema bootstrap generation and local metadata conversion. Historical app
tests are documented in the development repository; a fresh org installation
of this exact download has not been performed. Run the full deployment tests
above in your clean development org before considering any live deployment.
