BAD ASS SALESFORCE STACK

Make sure you have the following installed on your machine:
npmYou will also need the ability to execute the following bash commands: zip, cp, mv.
There are several options:
bash enumerator (like the one included with git). You may need to install zip binariesYou may also need to tell npm to use bash: npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"
git clone https://github.com/ChuckJonas/bad-ass-salesforce-stack basscd bassnpm installapp: The react Application source Folderforce-app: The Salesforce DX package. Store related metadata hereconfig: configurations for development, build & tests (some configuration files are in root)dist: the build directoryTo do much of anything you'll need to connect with one or more orgs. Use sfdx force:org:list to see a list of orgs you're already authenticated with. Connect to an existing sandbox using sfdx force:auth:web:login -sr [ORG_URL] -a [ALIAS]. You can also create a scratch org using: npm run new-scratch-org.
The starter supports 3 pre-defined "targets". Each target allow us to run different build & dev scripts depending on the context:
dev: to develop against a traditional salesforce org. Developer or Sandbox.scratch: allows development against a "scratch org" using the Salesforce DX flow. Must authenticate with a "hub org"prod: to release your app. Optimizes buildTargets are set in the .npmrc config file. You can use either the alias or the username here:
dev_alias=dev_username
scratch_alias=scratch
prod_alias=john@acme.com
*NOTE: You might want to ignore .npmrc for your repo. Each contributor will manage this configuration separately and committing it could result in another user accidentally deploying to an unintended org. This is especially true if you use the sfdx alias over the username
npm run deploy-dev or npm run deploy-scratch. This step needs to happen whenever the contents of force-app change.npm start/apex/app?local=1 to page query stringwebpack-dev-server compiles and makes your app available @ https//localhost:PORT. It incrementally compiles your app as you make changes & react-hot-loader allows modules to be hot reloaded without refreshing the page.
Updates will only show for you and not impact any other users in that environment (until you deploy).
You can see how this is configured by looking at force-app/main/default/pages/App.page. Basically, we just have two output panels that render conditionally based on the url param local == 1.
This starter offers 1 step build & deploy to each of the 3 targets.
npm run deploy-dev
npm run deploy-scratch
npm run deploy-prod
This diagram outlines the process.

If you want to use this project as a template for your own simply:
rm -r -f .git (WARNING: no going back!)git initnpm run ts-force-generateBefore you start your own project, you'll probably want to rename the page & resource bundle from App to something more specific.
Renaming the page is as simple as navigating to force-app/main/default/pages and renaming the app.page and app.page-meta.xml to whatever you want.
package.json, under the config section, update resource.gitignore to exclude these files$Resource.app in the vf page to properly reference the new resource name**NOTE: If you include other static resources in the force-app/main/default/staticresources folder they will get nuked by default. To prevent this, update the copy-bundle script **
You can change the antd theme less variables by editing /styles/ant-theme-vars.less. Unfortunately, changes here require a webpack restart to show up :(
This project comes equipped with ts-force to allow you typed access to Salesforce Rest API. To use ts-force, you must first generate classes for the SObjects you want to work with.
You can do this by editing ts-force-config.json. Make sure auth: {username: ""} is set to the target org alias you want to use to generate classes. This should be the end user for the app!
For more details on configuration, see the ts-force documentation.
Unfortunately the port isn't currently managed from a single point and must be updated in 2 places:
package.json, under the config section, update PORT constant/force-app/main/default/pages/App.Page, update the "Local Asset" panel: https://localhost:XXXX/app.jsIt is possible to debug right from vscode. To do so:
.vscode/launch.json -> url to reference the url you want to debugnpm startf5 or launch debug locally configurationOvertime, this project has gotten both simpler AND objectively better.
Unfortunately upgrades are currently a very manual process. Over the many different enhancements:
I admit, I haven't done a very good job of documenting these changes very well. My goal of keeping this everything as flexible as possible has also made it impossible to move parts of the configuration to upgradable packages.
I've tried to go back and tag Release to give a sense of breaking changes, but it's very incomplete.
package.json (particularly the scripts & config sections)webpack.config.tstsconfig.jsonFor these files, it's best to first identify any customization of your own and then try to merge them into the latest version from B.A.S.S..
config folder.src has been renamed to app
Features & dependencies have been removed. Examples:
local mode as it no longer has any advantages over using Localhost assets on salesforceawesome-typescript-loader with babelself-signed cert generation script has been removed (manual instructions are in config/cert)
Runtime dependencies have been upgraded to the latest and greatest. Which likely means breaking changes in these libraries:
In most cases you should just be able to continue using your runtime library versions with the latest version of B.A.S.S..
Highly recommend using vscode (typescript code completion, in editor terminal, etc).
plugins:
*
* Editor Config: auto-set formatting options for everyone
* TSlint: green squigglies everywhere!
* Salesforce Extensions for VS Code: gives your code completion on your force-app and ability to excute commands against the CLI
* Jest: run tests on save
Copyright (c) 2017 Charlie Jonas charlie@callaway.cloud
Expanded from react-redux-typescript-webpack-starter
Copyright (c) 2016 Piotr Witek piotrek.witek@gmail.com (http://piotrwitek.github.io/)
$ claude mcp add bad-ass-salesforce-stack \
-- python -m otcore.mcp_server <graph>