Skip to content

Commit

Permalink
Merge pull request #411 from RubenHalman/docs
Browse files Browse the repository at this point in the history
add Development Setup in docs
  • Loading branch information
VinceFINET authored May 21, 2024
2 parents e29ee85 + 1908c4f commit 71d9a88
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 34 deletions.
File renamed without changes.
57 changes: 23 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,36 @@
<a href="https://github.com/SalesforceLabs/OrgCheck/issues">
<img alt="issues" src="https://img.shields.io/github/issues-raw/SalesforceLabs/OrgCheck?style=flat-square">
</a>
<a href="https://opensource.org/licenses/MIT">
<a href="LICENSE.md">
<img alt="licenses" src="https://img.shields.io/badge/License-MIT-yellow.svg">
</a>
</div>

---

## More information about Org Check:
- Home: https://SalesforceLabs.github.io/OrgCheck/
- Preview: https://SalesforceLabs.github.io/OrgCheck/preview/
- Installation: https://SalesforceLabs.github.io/OrgCheck/installation/
## More about Org Check:
- [Website](https://SalesforceLabs.github.io/OrgCheck/)
- [LinkedIn](https://www.linkedin.com/company/orgchecksfdc/)
- [Twitter](https://www.twitter.com/OrgCheckSFDC)
- [AppExchange](https://sfdc.co/OrgCheck-InstallToday-AppExchange)
- [Installation Guide](https://SalesforceLabs.github.io/OrgCheck/installation/)

## Have valuable feedback?

## Issues or new ideas?
You can log any issues and new ideas in our [tracker](https://github.com/SalesforceLabs/OrgCheck/issues).

You can log any issues and new ideas in our tracker: https://github.com/SalesforceLabs/OrgCheck/issues
## Development Setup

To set up a development environment and deploy Org Check as your own unlocked package, follow the steps outlined in the [Development Setup Guide](docs/development.md).

## License

Org Check is available under the [MIT license](LICENSE.md)


## Some references
- Org Check on the AppExchange: https://sfdc.co/OrgCheck-InstallToday-AppExchange
- Social:
- LinkedIn: https://www.linkedin.com/company/orgchecksfdc/
- Twitter: https://www.twitter.com/OrgCheckSFDC
- 2024:
- Salesforce's Ben blog article (the second one!): https://www.salesforceben.com/salesforce-org-check-free-technical-debt-analysis
- 2023:
- Presentation for Salesforce France Professional Services in a **whole new way** with Jani Souryavongsa https://www.linkedin.com/in/janisouryavongsa)
- Pablo Gonzalez blog: 10 Salesforce Open-source Projects for DevOps Engineers https://www.pablogonzalez.io/top-10-salesforce-open-source-projects-for-devops/#4-orgcheck
- Salesforce Labs Video: Reduce Technical Debt with Org Check https://www.youtube.com/watch?v=gjv6q-AR1m0
- 2022:
- Articles on Medium about technical debt in Salesforce orgs:
- How to contin uously monitor, balance, challenge, and reduce Technical Debt in a Salesforce org? https://medium.com/@vfinet/how-to-continuously-monitor-balance-challenge-and-reduce-technical-debt-in-a-salesforce-org-8809cef4ce4a
- Five concrete actions to reduce technical debt related to Apex Classes — Reduce Technical Debt series https://medium.com/@vfinet/five-concret-actions-to-reduce-technical-debt-related-to-apex-classes-reduce-technical-debt-f71a31e4b30c
- App Review from Ike Wagh: https://www.youtube.com/watch?v=IG4zzqVsO_8
- Salesforce Labs Live! "How to Reduce Technical Debt from your Salesforce Environment (Ep.1)" https://www.youtube.com/watch?v=ZCJ_NH-29I0
- Vincent receives the **Edison Delivery Excellence Award for FY22** (Internal Salesforce price) for developing the Org Check app
- 2021:
- Albanian Dreamin21, Org Check presentation by Sara Sali and Vincent Finet : https://dreamin21.sfalbania.al/schedule/schedule-fullwidth-filterable/
- Unofficial SF blog article: https://unofficialsf.com/from-vincent-finet-analyze-your-org-with-orgcheck/
- Salesforce's Ben blog article: https://www.salesforceben.com/free-ways-to-monitor-your-salesforce-org/
## Useful references
- [Article on Salesforce's Ben: "Free technical debt analysis"](https://www.salesforceben.com/salesforce-org-check-free-technical-debt-analysis)
- [Article on Pablo Gonzalez blog: "10 Salesforce Open-source Projects for DevOps Engineers"](https://www.pablogonzalez.io/top-10-salesforce-open-source-projects-for-devops/#4-orgcheck)
- [Youtube Video: "Reduce Technical Debt with Org Check"](https://www.youtube.com/watch?v=gjv6q-AR1m0)
- [Article on Medium: "How to contin uously monitor, balance, challenge, and reduce Technical Debt in a Salesforce org?"](https://medium.com/@vfinet/how-to-continuously-monitor-balance-challenge-and-reduce-technical-debt-in-a-salesforce-org-8809cef4ce4a)
- [Article on Medium: "Five concrete actions to reduce technical debt related to Apex Classes"](https://medium.com/@vfinet/five-concret-actions-to-reduce-technical-debt-related-to-apex-classes-reduce-technical-debt-f71a31e4b30c)
- [Youtube Video: "Org Check Review by Ike Wagh"](https://www.youtube.com/watch?v=IG4zzqVsO_8)
- [Salesforce Labs Live! "How to Reduce Technical Debt from your Salesforce Environment (Ep.1)"](https://www.youtube.com/watch?v=ZCJ_NH-29I0)
- [Albanian Dreamin21: "Org Check presentation" by Sara Sali and Vincent Finet](https://dreamin21.sfalbania.al/schedule/schedule-fullwidth-filterable/)
- [Article on Unofficial SF: "Analyze your org with Org Check"](https://unofficialsf.com/from-vincent-finet-analyze-your-org-with-orgcheck/)
- [Article on Salesforce's Ben: "Free ways to monitor your Salesforce org"](https://www.salesforceben.com/free-ways-to-monitor-your-salesforce-org/)
134 changes: 134 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Development Setup Guide

This guide will walk you through setting up a developer environment allowing you to deploy Org Check as your own unlocked package.

## Prerequisites

Before you begin, ensure you have the following:

- A development setup with two connected Salesforce orgs
- Salesforce CLI installed

## Step 1: Clone the Org Check Project

First, clone the Org Check project repository from GitHub:

```bash
git clone https://github.com/SalesforceLabs/OrgCheck.git
```
```bash
cd OrgCheck
```


## Step 2: Connect Developer Orgs

You need two developer orgs:

1. **Dev Hub Org**: Enable Unlocked Packages and Second-Generation Managed Packages settings.
2. **Namespace Org**: A single DevHub can link multiple namespaces, but a packaging project must be linked to one Namespace Org.

### Connect Dev Hub Org

Log in to your Dev Hub org and enable the necessary settings.

### Link Namespace in Dev Hub Org

1. Go to **App Launcher**.
2. Search for **Namespace Registries**.
3. Click **Link** and sign in to your Namespace Org.

## Step 3: Update Project Definition

Edit the `sfdx-project.json` file to specify the namespace:

```json
{
"packageDirectories": [
{
"path": "<namespace>",
"default": true,
"package": "<namespace>",
"versionName": "Beryllium",
"versionNumber": "4.3.2.NEXT",
"versionDescription": "Org Check is an easy-to-install and easy-to-use Salesforce application in order to quickly analyze your org and its technical debt."
}
],
"namespace": "<namespace>",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "60.0"
}
```
Replace `<namespace>` with your actual namespace.

## Step 4: Rename the Force-App Folder

Rename the `force-app` folder to match your namespace name.

## Step 5: Adjust VisualForce Page

Update the `OrgCheck_App_VFP.page` to point to your namespace as well:

```html
<apex:page
<script>
Lightning.use('<namespace>:OrgCheck_App_Aura', function() {
$Lightning.createComponent('<namespace>:orgcheckApp', {});
});
</script>
</apex:page>
```
Replace `<namespace>` with your actual namespace.

## Step 6: Create the Package

Create the package using the Salesforce CLI:

```bash
sfdx force:package:create --name <namespace> --packagetype Unlocked --path <namespace> -v <devhubalias>
```

Note the generated **Package Id**.

## Step 7: Create a Package Version

Create a package version with the generated **Package Id**:

```bash
sfdx force:package:version:create -p 0HoDn0000010wBuKAI -x -w 10 -v <devhubalias>
```

Note the **Subscriber Package Version Id** from the output.

## Step 8: Optional - Create a Scratch Org

If you want to use a scratch org, create it using:

```bash
sf force:org:create --definitionfile orgs/dev.json --setalias <scratchorgalias> --targetdevhubusername <devhubalias> --wait 10
```

## Step 9: Deploy the Package

Deploy the package to your org using the **Subscriber Package Version Id**:

```bash
sfdx force:package:install -p 04tDn0000011NpHIAU -u <scratchorgalias> -w 10
```

## Debugging

To debug, go to **Setup** in Salesforce:

1. Navigate to **Visualforce Pages**.
2. Look for `OrgCheck_App_VFP`.
3. Click **Preview** to view the page.

If you encounter any issues, check the following:

- Verify the Visualforce page is correctly pointing to your namespace.
- Ensure the namespace is correctly set in `sfdx-project.json`.

## Conclusion

You should now have a fully working unlocked package of Org Check, using your own namespace. For further assistance, refer to the official documentation or reach out to the community. Happy coding!

0 comments on commit 71d9a88

Please sign in to comment.