Introduction
Frappe is an open-source, full-stack Python web framework designed for building data-heavy business applications quickly. It powers ERPNext and dozens of other production apps. The framework takes a metadata-first approach where you define doctypes (data models) and the system auto-generates forms, APIs, permissions, and database tables.
What Frappe Does
- Auto-generates CRUD forms, list views, REST and RPC APIs from doctype definitions
- Provides a role-based permission system with field-level and document-level access control
- Includes a built-in workflow engine for approval chains and state machines
- Ships with email integration, print formats, report builder, and scheduled job infrastructure
- Supports multi-tenant deployments where one codebase serves many isolated sites
Architecture Overview
Frappe runs on Python (Werkzeug/Gunicorn) with MariaDB or PostgreSQL as the datastore and Redis for caching, queues, and real-time events. The front-end uses a custom JavaScript framework with Jinja2-rendered pages. Apps are installed as Python packages under a bench (the CLI orchestrator), and each app registers its doctypes, hooks, and fixtures. Background jobs run via RQ workers, and Socket.IO handles real-time updates to connected browsers.
Self-Hosting & Configuration
- Requires Python 3.10+, Node.js 18+, MariaDB 10.6+ or PostgreSQL 14+, and Redis
- Install via
bench initwhich scaffolds the full directory structure and Procfile - Configure site-specific settings in
sites/mysite/site_config.jsonfor DB credentials and mail - Run
bench setup productionto generate Supervisor and Nginx configs for a production deploy - Scale horizontally by adding Gunicorn workers and RQ worker processes behind a load balancer
Key Features
- Metadata-driven development: define a doctype JSON schema and get a full app layer for free
- Built-in report builder with script reports, query reports, and chart dashboards
- Real-time collaboration with presence indicators and document locking
- Extensive hooks system for customizing behavior without modifying core code
- Active ecosystem with 100+ community apps spanning HR, accounting, CRM, and more
Comparison with Similar Tools
- Django — more general-purpose and requires building admin and APIs manually; Frappe auto-generates them from metadata
- Laravel — PHP-based with Nova for admin panels; Frappe bundles the admin UI into the core at no extra cost
- Odoo — similar ERP-focused framework but uses a custom ORM and XML views; Frappe uses standard SQL and JSON doctypes
- Directus — headless data platform that wraps any SQL schema; Frappe is an opinionated full-stack framework with server rendering
- Strapi — Node.js headless CMS; Frappe targets transactional business apps rather than content management
FAQ
Q: Is Frappe only useful for ERP? A: No. While ERPNext is its most famous app, Frappe is a general-purpose framework used for CRMs, helpdesks, LMS platforms, and custom business tools.
Q: How do I add custom business logic?
A: Write server-side Python in doctype controllers or hook into lifecycle events like validate, on_submit, and on_cancel. Client-side logic uses JavaScript form scripts.
Q: Does Frappe support REST APIs?
A: Every doctype automatically exposes REST endpoints for CRUD operations, and you can define custom whitelisted Python methods callable via /api/method/.
Q: Can I run multiple apps on one Frappe site? A: Yes. The bench tool manages multiple apps per site. Each app can define its own doctypes, pages, and reports while sharing the same database and user base.