Jump to content

Repo comfac-webshop Overview

From Game in the Brain Wiki

Repo:comfac-webshop/Overview — Project Overview

What This Project Does

comfac-webshop is a Frappe Webshop installation for ComFac Corporation. It provides a complete e-commerce platform that integrates with ERPNext for inventory management, order processing, and accounting. The webshop allows customers to browse products, manage shopping carts, place orders, track shipments, and manage their accounts.

Project Type

Frappe App — A Python/JavaScript e-commerce application built on the Frappe Framework that extends ERPNext with online store functionality.

Where This Fits in the Stack

  • Depends on: frappe (core framework), erpnext (inventory/accounting), payments (payment processing)
  • Used by: ComFac customers for online purchasing
  • Integrates with:
    • ERPNext Items and Inventory
    • ERPNext Sales Orders and Quotations
    • Payment gateways (via payments app)
    • Email for order notifications
  • Related repos: comfac-hrms (separate Frappe app for HR)

Key Technologies

Component Technology
Backend Language Python 3.x
Frontend Framework Frappe UI + Jinja2 templates
Database MariaDB (via Frappe ORM)
Config Format JSON (DocType definitions), Python (hooks, controllers)
Web Routes Frappe website routing + custom controllers
Shopping Cart Quotation-based cart system
Product Search Redis/RediSearch (optional)

Quick Orientation

If you have 5 minutes to understand this repo, read these files in this order:

  1. webshop/hooks.py — App configuration, website routes, event hooks. Shows how the app integrates with ERPNext.
  2. webshop/webshop/doctype/website_item/ — How products are stored and displayed on the website.
  3. webshop/webshop/shopping_cart/cart.py — Core shopping cart logic that converts to ERPNext Quotations.
  4. webshop/www/ — Web pages (product listing, cart, checkout) served to customers.

Key Concepts

  • Website Item — A product visible on the storefront (linked to ERPNext Item)
  • Shopping Cart — Actually a Quotation document in ERPNext
  • Item Group — Product categories for navigation
  • Webshop Settings — Configuration for the store (currency, price list, etc.)
  • Wishlist — User-saved products for later purchase

External Documentation