Initialize a New Frappe Bench Project
Hello and welcome back to Frappe ERPNext course. In this lecture, we will initialize a new project using Frappe bench and after that we will install ERPNext application into that project. Let's start with installation of a new project.
I am opening my installation guide. To initialize a new project or a new bench instance in Frappe framework, we can run this command: bench init then the bench name or the project name. Here I am using version 13, which is the latest version of Frappe framework. Let's run this command in terminal.
Now we can see the Frappe is cloning from Frappe's GitHub repository, and we are cloning version 13. And it is automatically started all the building processes. If you go up, we can see a link to open this web application in a web server. Let's open this link. Here we can see a 404 Not Found. It is because we didn't create any site to run this application.
Creating a New Site with Frappe Bench
So let's create a site. We can create a site using this command: bench new-site then give a site name. I am giving the name decodi.com. Let's copy this. We can stop the server using Control+C. And now the server is stopped. Let's clear this. Run the command bench new-site decodi.com. This will ask for my MariaDB root password. Let's enter the password which we configured during the MariaDB installation.
The site will create an administrator user. We have to enter a password for admin login. I am entering one password, re-enter one more time. And now we successfully created site and database. We can start the server using the command bench start. Now the server is up. Let's wait for finishing the rebuilding process. Now rebuilding is finished.
Installing the ERPNext Application
Let's go to the link and reload this page. Here we can see the login window of Frappe framework. I'm not logging in right now. Let's install ERPNext into our project. We can install ERPNext using this command: bench get-app erpnext then specify the version. I'm using version 13, and which is the latest ERPNext version. Let's copy this command.
I'm closing the server. Clear this and run the command. Now we successfully installed ERPNext into our project. Let's install ERPNext into our site. So we can install ERPNext into our site using this command: bench site then the site name, which is decodi.com, then using this command install-app then application name. So let's run this. Clear this and run this. This will create database tables for ERPNext application.
Completing the Initial ERPNext Setup Wizard
Let's start the bench using this command: bench start. Let's open the web application. Now here we can see 'Login to Frappe'. Let's reload the page, and now it is changed to 'Login to ERPNext'. Let's login as administrator user. And let's enter the password which we set up during the site installation. I am saving this password. Now we can see the success message and the login is success.
Next, we need to set up a configuration wizard. I am choosing language English. Next, we need to select our region. I am selecting India because I am from India. It will also fetch the time zone and currency. Click on 'Next'.
Here we need to create a first user. I am creating a system admin. I'm giving a full name 'System Admin'. Let's enter a username and password for admin. Click on 'Next'. I am saving that username and password. Here we need to select our domain. I am selecting all these domains because I am using this ERPNext application for development purpose. Click on 'Next'.
Next, we have to enter a company name and company abbreviation. My company is Decodi and I am choosing abbreviation DE. Click on 'Next'. Here we need to enter the details of our organization. Here I am delivering a Frappe ERPNext course, so let's enter 'Frappe ERPNext Codes' here. And let's enter a random bank name. I'm not changing anything here. Click on 'Complete Setup' and it will configure everything for you.
Exploring the ERPNext Workspace and UI
Now we can see the workspace of ERPNext application. In the left side, we can see different modules and domains available in ERPNext. These are the elaborated view of each module. These all point to different DocTypes and reports. A search box is available in navbar and from here we can search DocTypes and reports. A notification icon is here, and this will show the notification available to you.
And in the help menu you can see the documentation and user forms and 'About'. I am opening 'About'. This will show the important links of Frappe framework and installed application. This will show the ERPNext application is installed into our site and their corresponding version. ERPNext version is 13.11.1 and Frappe framework version is 13.1.0.
Here we can see a user profile icon, and this is used for configuring your profile. In this list, you can see a 'View Website' submenu. Let's click on the 'View Website'. This is the website provided by the ERPNext and we can customize this website using codes and DocTypes. We will see the customization in coming lectures. Let's close this. This is the official documentation of ERPNext and if you need any help or any doubts, you just go through this documentation. I'm closing it right now. We can log out from this workspace using this logout menu. This will redirect you to the website view of ERPNext.
Enabling Developer Mode
Let's go back to the terminal, and I am closing the server using Ctrl+C. If you refresh right now, it will show error. Let me clear this.
Now our bench is in production mode, and we need to change this bench from production mode to developer mode because some of the functionalities and developer mode options are not available in production. We can set up developer mode using this command: bench set-config developer_mode 1. This will change the site configuration file. Let's open site configuration file. My site name is decodi.com, then open site_config.json file. Here we can see developer mode is enabled and we can use this bench for developing purpose.
Let's wind up this and see you on the next lecture. Bye.