Skip to main content

Create App, Site & Doctype

How To Create an App

After installing the bench, we can create an app to proceed. Creating a custom app in Frappe (or Frappe Framework) is a straightforward process. Below is a step-by-step manual to create a custom app in Frappe, but first, if you cannot find you bench directory, you can run below command to find it.

bench find

Example output:

image-1739927580296.png

Now go to your directory and execute below command to create a new app:

bench new-app library_management

You will be prompted with details of your app, fill them up and an app that you named will be created in the apps folder.

 

Create a New Site

Each site comes with a database. They may be customized through site specific scripting or Apps may be installed on them. To create a new site, run the following command from the frappe-bench directory:

bench new-site <your-site-name>

This command will create a new database, so you need to enter your MySQL root password. It will also ask to set the password for the Administrator user, just set a password that you won't forget. This will be useful later.

Now, you will have a new folder that you named in the sites directory.

 

Install App on the Site

To install your app on the site, run the following command:

bench --site <your-site-name> install-app <your-app-name>

To confirm if the app was installed, run the following command:

bench --site <your-site-name> list-apps

Note: When you create a new site, the frappe app is installed by default.

 

Login and Create Doctype

To create DocTypes in our app, we must log in to Desk. Go to http://localhost:8000 and it should show you a login page.

Enter Administrator as the user and password that you set while creating the site.