Frappe is the web framework that powers ERPNext. If you want to build custom apps or just understand how ERPNext works under the hood, you need to set up Frappe first. This guide covers the complete setup on macOS.
Pre-requisites
macOS 12+
Homebrew
Python 3.10+
Node.js 18
MariaDB 10.6+
Redis
STEP 1 Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
STEP 2 Install Python and Dependencies
brew install python@3.11
brew install git
pip3 install virtualenv
STEP 3 Install MariaDB
brew install mariadb
brew services start mariadb
mysql_secure_installation
Configure the character encoding. Open the config file:
sudo nano /opt/homebrew/etc/my.cnf
Add:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
brew services restart mariadb
STEP 4 Install Redis and Node.js
brew install redis node
brew services start redis
npm install -g yarn
STEP 5 Install wkhtmltopdf
brew install wkhtmltopdf
STEP 6 Install Frappe Bench
pip3 install frappe-bench
bench --version
STEP 7 Initialize a New Bench
This creates the bench directory and downloads the Frappe framework.
bench init frappe-bench --frappe-branch version-15
cd frappe-bench
STEP 8 Create Your First Site
bench new-site myapp.local
bench --site myapp.local add-to-hosts
STEP 9 Create a Custom App
This is where it gets interesting. You can now scaffold your own Frappe app.
bench new-app my_custom_app
bench --site myapp.local install-app my_custom_app
STEP 10 Start the Development Server
bench start
Open your browser and go to:
http://myapp.local:8000
You now have a working Frappe development environment. From here you can create Doctypes, build APIs, add web pages, and develop full applications on the Frappe framework.
Comments
Join the discussion. Got a question, found an issue, or want to share your experience?