[official docs] Frappe is a full-stack, batteries-included, web framework written in Python and Javascript. It is the framework that powers ERPNext. It is pretty generic and can be used to build database-driven apps.

Frappe framework is more like no/less code, configuration oriented framework. It is a Meta-data driven web framework written in Python and Javascript with MariaDB as its database.

The main key point to understand when looking at Frappe is how the database is declared and model-view building happens internally. It uses meta-data based declaration which is just a JSON file that creates the tables and fields in the database based on it and gives a rich user interface with its bindings to its corresponding database fields.

  • Programming Languages: Python and Javascript
  • Database: MariaDB and Postgres(no support for ERPnext)
  • Webserver: Werkzeug
  • Templating: Jinja
  • Job Queues: Python RQ(Scheduler)
  • CSS Framework: Bootstrap 3
  • Caching: Redis(In-memory)
  • Realtime: NodeJS + Socketio.js
  • Javascript Packaging: Rollup
  • Webserver: gunicorn + NGINX (Production)
  • Process Manager (Production): supervisord
  • Process Manager (Develop): Honcho
  • Command Line: Bench
  • Wkhtmltopdf : Command line tool to process HTML in PDF (report generation)


django-admin startproject django-project


bench init frappe-bench

Creating a new app in the project


python manage.py startapp custom_app


bench new-app custom_app

Start the server


python manage.py runserver


bench start

  1. Desk:

The admin interface in Frappe is called Desk which is generated using the meta-data(JSON).DocTypes and automatically builds list views, form views, report views, etc for your DocTypes and allows the option to set permissions for users to view/modify it.

  1. DocType: DocType is responsible for models and views in Frappe, which holds the reason to be called as meta-based. It stores all the fields and its types of databases in JSON data. In short, it describes models and views.

Supports many-to-one relationship to the fields in the form of child DocType to a field.

3.Apps: It is a python package and should be under the directory apps in the frappe-bench directory. Each app should have an entry in apps.txt file just like in Django settinngs.py to be considered.

4.Links: The fields between two tables can be mapped with each other through Links and we need to specify the target fields from the parent table. This acts more of a foreign key reference.

Note: Remember that Link fields are not automatically set as Foreign Keys in the MariaDB database, because that will implicitly index the column. This may not be optimum hence the Foreign Key validation is done by the Framework.

  1. Reports:

Report generation works out of the box for Frappe without the need for the developer to work on it. It also supports the scheduler to generate the reports and can be exported in many formats including PDF, XLSX.