Salesforce Developer Experience project is a structure or a directory of a configuration files. In this tutorial, we will learn how to create Salesforce DX project in Mac Terminal by cloning sfdx-dreamhouse.

Create Salesforce DX Project

To create Salesforce DX project, use a command like force:project:create, this command creates a skeleton to your Salesforce DX project.

As shown in above code, tutoriakart.com is the project name. Once the project is created successfully, we must create sample configuration file like sfdx-project.jsonconfig/project-scratch-def.json and .forceignore.

  • sfdx-project.json file enables the configuration parameter to set Source API version and name space.
  • project-scratch-def.json is used to create Scratch Org from the command line.
  • .forceingnore is used to untrack certain files and folders when pushing files from local system to Scratch Orgs.
Create project in Salesforce DX

Create SFDX project from existing source (GitHub)

This is the second method of creating Salesforce DX project form existing source like Git and GitHub. In this method we create Salesforce DX project in Mac Terminal by cloning sfdx-dreamhouse. Follow the steps:

  • Open terminal in Mac or Command Prompt in your Windows to create unique directory.
  •  tutorialkart_sfdxproject is the directory name.

Cloning Sfdx-dreamhouse project

Use the following command to clone the app repository

Now the repository pulls every source code into our local system(Mac) as shown below.

Create Salesforce DX project from existing source

Creating a project in Salesforce Developer experience is simple as shown and in our next step we should create Scratch Orgs, Push source metadata to Scratch Org and open the Scratch Org.