The Problem
Sales teams need a low‑cost, self‑hosted CRM that can be customized without licensing constraints. Existing open‑source options are often tied to large ERP stacks or lack a focused codebase for core CRM entities (leads, deals, contacts, activities).
What This Does
crm/ implements a complete CRM as a Frappe application. Core domain objects live under crm/fcrm/doctype/ – e.g. crmlead, crmdeal, crmtask – each shipped with a Python model (.py), client‑side script (.js), and JSON metadata (.json). The REST/JSON API is exposed through the crm/api/ package; crm/api/lead.py, crm/api/deal.py, and crm/api/contact.py define the endpoints used by the front‑end and external integrations.
The repository also contains helper scripts for CI (.github/workflows/.yml), a Docker‑compose dev environment (.devcontainer/docker-compose.yml), and a set of unit tests (crm/fcrm/doctype//test.py). The top‑level README.md and the screenshots in .github/screenshots/ illustrate the UI components (Kanban view, lead page, call log, etc.).
How To Use It
Setup – the only explicit build artefact is the Docker‑compose file used for the dev container. Assuming Docker ≥ 20.10 is installed:
git clone https://github.com/yourorg/crm.git cd crm docker compose -f .devcontainer/docker-compose.yml up -d # builds the Frappe app container
If you prefer a local Python environment, the project follows the standard Frappe layout; install the framework and its dependencies (the requirements.txt is not listed, but the Frappe app expects the Frappe core package). A typical Frappe setup would be:
create a bench (Frappe CLI) if not already present bench init my-bench --skip-assets cd my-bench bench get-app crm /path/to/cloned/crm bench new-site mysite.local bench --site mysite.local install-app crm bench start
Configuration – site‑level settings are stored in crm/fcrm/doctype/crmglobalsettings/crmglobalsettings.json and can be edited through the UI. Integration credentials (Twilio, Exotel) are defined in the respective doctype JSON files (crmtwiliosettings, crmexotelsettings). No environment‑variable template is provided; the dev container injects defaults via the docker-compose.yml service definition.
Running it – the web server is started by the Frappe bench (bench start) or by the Docker container's entrypoint, which runs the standard gunicorn command for the Frappe app. API calls are routed through the crm/api/*.py modules; for example, a GET on /api/method/crm.api.lead.getleads will invoke crm/api/lead.py.
Real‑World Use
A SaaS vendor could embed the CRM into a larger customer‑portal by mounting the crm app onto an existing Frappe site, then using the exposed API endpoints to sync contacts from an external identity provider. Example Python snippet:
import requests
resp = requests.get( "https://crm.example.com/api/method/crm.api.lead.getleads", headers={"Authorization": "token <api-key>"} ) leads = resp.json()["message"] for lead in leads: print(lead["leadname"], lead["status"])
Code Health & Issues
Low – Missing explicit installation docs – No README steps for a non‑Docker install; users must infer the Frappe workflow. Medium – Hard‑coded integration keys – crmtwiliosettings and crmexotelsettings JSON files contain placeholders but no validation; accidental commit of real keys would be a risk. Low – Limited type hints – Most Python modules lack static typing, which can hinder IDE support and automated analysis. Low – Test coverage uneven – 24 test files exist, but many doctype modules have no associated tests (e.g., crmcommunicationstatus, crmfields_layout). Low – No pyproject.toml or requirements.txt – Dependency list is implicit; CI installs the Frappe framework via bench, but external contributors lack a clear pip install path.
Overall, the repo includes a functional CI pipeline (.github/workflows/ci.yml), a permissive LICENSE, and a solid folder structure that aligns with Frappe conventions.
The Bottom Line
The codebase delivers a ready‑to‑extend CRM built on the Frappe framework, with Docker‑based development support and a decent set of unit tests. It is best suited for teams already familiar with Frappe/ERPNext who need a self‑hosted CRM they can tailor. The main drawbacks are sparse documentation for standalone installation and modest test coverage for some modules; addressing those would improve onboarding and reliability.