Framework Git

Framework Git

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Key Concepts

A short glossary of the core terms in Frappe and how they fit together. Each entry
links to a deeper page. If you read only one thing before building, read this.

How they fit together

Bench  →  the environment (virtualenv, config, processes)
 ├─ Site  →  one instance with its own database and files
 │   ├─ database  →  all tables and records for the site
 │   └─ files  →  uploads and other site files
 └─ App  →  installable package of code
     └─ Module  →  grouping of related DocTypes inside an app
         └─ DocType  →  the definition of a data model (schema + behavior)
             └─ Document  →  one record (row) of a DocType

A Bench runs many Sites; each Site has its own database and installs a
set of Apps.

Glossary

DocType

The central concept. A DocType is the definition of a data model: its
fields, options, permissions, and naming rules. Creating a DocType generates a
database table, REST endpoints, and a Desk form/list automatically. DocTypes are
stored as JSON in your app (in developer mode).
→ DocTypes Overview, Fields

Document

A Document is a single instance (row) of a DocType, such as one customer or one invoice.
You work with documents in Python through the Document API
(frappe.get_doc, doc.save, doc.submit).
→ Document API

Controller

The Python class that holds a DocType's server-side behavior. Its lifecycle
methods
(validate, before_save, on_update, on_submit, …) are called by
the framework at the right points when a document is saved or submitted.
→ Controllers & Lifecycle

App

An installable Python package that adds DocTypes, controllers, hooks, and assets.
frappe is itself an app; your code is another app that depends on it. The same
app can be installed on many sites.
→ Modules & App Structure, Your First App

Module

A grouping of related DocTypes (and reports, pages, etc.) within an app, listed in
the app's modules.txt. Modules organize code and show up as sections in the
Desk.
→ Modules & App Structure

Site

An isolated instance with its own database, files, and configuration, addressed by
a hostname (e.g. library.localhost). One bench can host many sites, each with a
different set of apps installed.
→ Architecture: Site, Site Management

Bench

The working directory and CLI that manages your Frappe environment: the
virtualenv, the apps/ and sites/ folders, and the processes (web, workers,
realtime). Bench is a separate tool you install with pip.
→ Architecture: Bench, Bench Overview

Hook

A declaration in an app's hooks.py that plugs the app into the framework
without modifying core. Hooks register document event handlers, scheduled jobs,
asset includes, route rules, and more.
→ Hooks

Desk

The built-in admin UI at /desk. It auto-generates forms, list views, reports, and
dashboards from your DocTypes, and is where you customize and administer the
system. It runs on JavaScript and talks to the server over the REST API.
→ Desk Overview, Form API

See also

Last updated 2 hours ago
Was this helpful?
Thanks!