Create an App

Create a frappe app scaffold using the bench CLI.

Create app

Before we start, make sure you're in a bench directory. To confirm, run bench find .:

$ bench find .
/home/frappe/frappe-bench is a bench directory!

To create our Library Management app, run the new-app command:

$ bench new-app library_management
App Title (default: Library Management):
App Description: Library Management System
App Publisher: Faris Ansari
App Email:
App Icon (default 'octicon octicon-file-directory'):
App Color (default 'grey'):
App License (default 'MIT'):
'library_management' created at /home/frappe/frappe-bench/apps/library_management

Installing library_management
$ ./env/bin/pip install -q -U -e ./apps/library_management
$ bench build --app library_management
yarn run v1.22.4
$ FRAPPE_ENV=production node rollup/build.js --app library_management
Production mode
✔ Built js/moment-bundle.min.js
✔ Built js/libs.min.js
✨  Done in 1.95s.

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

To see a complete list of all icons supported in the octicons library, check out

App directory structure

Your app directory structure should look something like this:

├── library_management
│   ├──
│   ├── library_management
│   │   └──
│   ├── modules.txt
│   ├── patches.txt
│   ├── public
│   │   ├── css
│   │   └── js
│   ├── templates
│   │   ├──
│   │   ├── includes
│   │   └── pages
│   │       └──
│   └── www
├── requirements.txt
  • library_management: This directory will contain all the source code for your app
    • public: Store static files that will be served from Nginx in production
    • templates: Jinja templates used to render web views
    • www: Web pages that are served based on their directory path
    • library_management: Default Module bootstrapped with app
    • modules.txt: List of modules defined in the app
    • patches.txt: Patch entries for database migrations
    • Hooks used to extend or intercept standard functionality provided by the framework
    • requirements.txt: List of Python packages that will be installed when you install this app

Next: Create a Site