Expand MokoWaaS+ERP into full ERP offering — Joomla-native CMS + ERP platform #192

Closed
opened 2026-06-06 15:38:24 +00:00 by jmiller · 7 comments
Owner

Summary

Expand MokoWaaS into a full-featured Joomla-native CRM platform, using Dolibarr's module ecosystem as design inspiration (not integration). All CRM functionality is built natively in Joomla with its own database tables and logic. Joomla Contacts serves as the base contact layer, extended with customer/vendor roles, deals pipeline, and activity tracking.

No external ERP dependency. Dolibarr is the blueprint, MokoWaaS is the product.


Architecture: Joomla-Native CRM

Data Model

Joomla's built-in #__contact_details remains the contact record. CRM-specific data lives in dedicated MokoWaaS tables that reference contact IDs.

New Database Tables

#__mokowaas_crm_roles — Links a Joomla contact to a CRM role

Column Type Purpose
id INT PK Auto-increment
contact_id INT FK References #__contact_details.id
role ENUM('customer','vendor','prospect') CRM role type
status ENUM('active','inactive','lead','converted') Role status
code VARCHAR(50) Customer/vendor code (e.g., CU2026-003)
credit_limit DECIMAL(15,2) Outstanding credit limit
payment_terms_days INT Default payment terms
notes TEXT Internal notes
created DATETIME Record creation
modified DATETIME Last modification

#__mokowaas_crm_pipeline_stages — Configurable deal pipeline stages

Column Type Purpose
id INT PK Auto-increment
title VARCHAR(255) Stage name (e.g., Qualified, Proposal, Negotiation)
alias VARCHAR(255) URL-safe alias
probability INT Win probability percentage (0-100)
ordering INT Stage order in pipeline
color VARCHAR(7) Display color hex
published TINYINT Active/inactive

#__mokowaas_crm_deals — Sales pipeline deals

Column Type Purpose
id INT PK Auto-increment
title VARCHAR(255) Deal name
contact_id INT FK References #__contact_details.id
stage_id INT FK References #__mokowaas_crm_pipeline_stages.id
value DECIMAL(15,2) Deal value
currency VARCHAR(3) Currency code
probability INT Override probability (inherits from stage if null)
expected_close DATE Expected close date
assigned_to INT Joomla user ID of owner
status ENUM('open','won','lost','abandoned') Deal status
lost_reason VARCHAR(255) Reason if lost
notes TEXT Deal notes
created DATETIME Creation date
modified DATETIME Last modified
closed DATETIME Close date

#__mokowaas_crm_activities — Activity log per contact/deal

Column Type Purpose
id INT PK Auto-increment
contact_id INT FK References #__contact_details.id
deal_id INT FK References #__mokowaas_crm_deals.id (nullable)
type ENUM('call','email','meeting','note','task') Activity type
subject VARCHAR(255) Activity subject
body TEXT Activity details
due_date DATETIME Scheduled date (for tasks)
completed TINYINT Completed flag
user_id INT User who created the activity
created DATETIME Creation date

Contact Categories → CRM Roles

Joomla Contact categories map to CRM roles:

  • Contacts in a "Customers" category → role = 'customer'
  • Contacts in a "Vendors" category → role = 'vendor'
  • Contacts in a "Prospects" category → role = 'prospect'
  • A single contact can have multiple roles (customer AND vendor)

This mirrors Dolibarr's dual-flag thirdparty model but uses Joomla's native category system.


Implementation Plan

Phase 1: CRM Foundation — Contact Roles & Pipeline

Goal: Extend Joomla Contacts with CRM roles, deals pipeline, and activity tracking

New Extension: plg_system_mokowaas_crm

  • Database tables: crm_roles, crm_pipeline_stages, crm_deals, crm_activities
  • Default pipeline stages: Lead → Qualified → Proposal → Negotiation → Closed Won / Closed Lost
  • Hook onContentAfterSave on com_contact → auto-create CRM role based on contact category
  • Hook onContentBeforeDelete on com_contact → cascade cleanup of CRM data
  • Auto-generate customer/vendor codes on role creation
  • Health check integration: CRM stats in heartbeat (total contacts, active deals, pipeline value)

Modifications to com_mokowaas

  • CRM dashboard view: pipeline overview, recent activities, deal stats
  • Contact detail panel: show CRM roles, linked deals, activity history
  • Pipeline board view (kanban-style drag-and-drop for deal stages)
  • Activity log view with filtering by type, contact, date range
  • CRM configuration panel: manage pipeline stages, role defaults

New REST API Routes (plg_webservices_mokowaas_crm)

  • GET/POST /v1/mokowaas/crm/roles — List/assign CRM roles
  • GET/POST/PUT /v1/mokowaas/crm/deals — CRUD deals
  • GET/POST /v1/mokowaas/crm/activities — CRUD activities
  • GET /v1/mokowaas/crm/pipeline — Pipeline summary with stage counts and values

Phase 2: Product Catalog & Shopping Cart

Goal: Native Joomla shopping cart component

New Extension: com_mokoshop

  • Product catalog with categories, search, filtering
  • Product detail pages with variants, pricing
  • Shopping cart (session-based → persistent for logged-in users)
  • Checkout flow linked to CRM contacts
  • Order management with status tracking
  • Database tables: crm_products, crm_orders, crm_order_items, crm_cart

Phase 3: Invoicing & Billing

Goal: Native invoicing tied to CRM contacts and orders

  • Invoice generation from orders
  • Recurring invoice support
  • Payment tracking and status
  • Customer portal: view invoices, download PDFs
  • Supplier invoice management (for vendor-role contacts)
  • Database tables: crm_invoices, crm_invoice_items, crm_payments

Phase 4: Point of Sale

Goal: Touch-screen POS for in-person sales

  • POS interface (tablet-optimized, touch-friendly)
  • Quick product search and barcode scanning
  • Cash register management (open/close, daily reports)
  • Receipt printing
  • Creates orders and invoices in the CRM system
  • Multi-terminal support

Phase 5: Inventory & Stock Management

Goal: Warehouse and stock tracking

  • Warehouse management
  • Stock movements and history
  • Low stock alerts (via heartbeat notifications)
  • Lot/serial number tracking
  • Database tables: crm_warehouses, crm_stock_movements

Phase 6: HRM & Projects

Goal: Employee and project management as opt-in features

  • Employee records, leave management, expense reports
  • Project management with tasks and time tracking
  • Contract/subscription management

Phase 7: Marketing & Bulk Mail

Goal: Marketing campaigns from CRM contact base

  • Mailchimp integration for bulk email delivery
  • Mass mailing from CRM contact categories
  • Campaign tracking in CRM dashboard
  • Ties into #193 (article update notifications)

Extensions Summary

New Extensions

Extension Type Purpose
plg_system_mokowaas_crm System Plugin CRM engine: contact roles, deals, activities, event hooks
plg_webservices_mokowaas_crm Webservices Plugin REST API routes for CRM data
com_mokoshop Component (Phase 2) Shopping cart, product catalog, checkout

Modified Extensions

Extension Changes
com_mokowaas CRM dashboard, pipeline board, activity log, config panel
mod_mokowaas_cpanel CRM summary widget
plg_system_mokowaas Add CRM stats to health checks
plg_system_mokowaas_monitor Extend heartbeat with CRM metrics
pkg_mokowaas.xml Add new CRM child extensions

Removed from Plan

  • MokoDoliJoomla — No Dolibarr-side module needed
  • Dolibarr REST API integration — All native Joomla
  • Webhook sync — No external system to sync with

Design Inspiration from Dolibarr

Dolibarr Concept MokoWaaS Implementation
llx_societe (thirdparty with dual customer/vendor flag) #__mokowaas_crm_roles (multiple roles per Joomla contact)
llx_socpeople (contacts linked to thirdparties) Joomla #__contact_details (native, no duplication)
Commercial pipeline (proposals → orders → invoices) #__mokowaas_crm_deals with configurable pipeline stages
TakePOS Native POS component (Phase 4)
comm/mailing Mailchimp integration + Joomla mail (Phase 7)
Product catalog + stock com_mokoshop with inventory tables (Phases 2 & 5)

Related Issues

  • #193 — Article update notification plugin with bulk mail integration (Phase 7)
## Summary Expand MokoWaaS into a full-featured **Joomla-native CRM** platform, using Dolibarr's module ecosystem as **design inspiration** (not integration). All CRM functionality is built natively in Joomla with its own database tables and logic. Joomla Contacts serves as the base contact layer, extended with customer/vendor roles, deals pipeline, and activity tracking. **No external ERP dependency.** Dolibarr is the blueprint, MokoWaaS is the product. --- ## Architecture: Joomla-Native CRM ### Data Model Joomla's built-in `#__contact_details` remains the contact record. CRM-specific data lives in dedicated MokoWaaS tables that reference contact IDs. #### New Database Tables **`#__mokowaas_crm_roles`** — Links a Joomla contact to a CRM role | Column | Type | Purpose | |--------|------|---------| | `id` | INT PK | Auto-increment | | `contact_id` | INT FK | References `#__contact_details.id` | | `role` | ENUM('customer','vendor','prospect') | CRM role type | | `status` | ENUM('active','inactive','lead','converted') | Role status | | `code` | VARCHAR(50) | Customer/vendor code (e.g., CU2026-003) | | `credit_limit` | DECIMAL(15,2) | Outstanding credit limit | | `payment_terms_days` | INT | Default payment terms | | `notes` | TEXT | Internal notes | | `created` | DATETIME | Record creation | | `modified` | DATETIME | Last modification | **`#__mokowaas_crm_pipeline_stages`** — Configurable deal pipeline stages | Column | Type | Purpose | |--------|------|---------| | `id` | INT PK | Auto-increment | | `title` | VARCHAR(255) | Stage name (e.g., Qualified, Proposal, Negotiation) | | `alias` | VARCHAR(255) | URL-safe alias | | `probability` | INT | Win probability percentage (0-100) | | `ordering` | INT | Stage order in pipeline | | `color` | VARCHAR(7) | Display color hex | | `published` | TINYINT | Active/inactive | **`#__mokowaas_crm_deals`** — Sales pipeline deals | Column | Type | Purpose | |--------|------|---------| | `id` | INT PK | Auto-increment | | `title` | VARCHAR(255) | Deal name | | `contact_id` | INT FK | References `#__contact_details.id` | | `stage_id` | INT FK | References `#__mokowaas_crm_pipeline_stages.id` | | `value` | DECIMAL(15,2) | Deal value | | `currency` | VARCHAR(3) | Currency code | | `probability` | INT | Override probability (inherits from stage if null) | | `expected_close` | DATE | Expected close date | | `assigned_to` | INT | Joomla user ID of owner | | `status` | ENUM('open','won','lost','abandoned') | Deal status | | `lost_reason` | VARCHAR(255) | Reason if lost | | `notes` | TEXT | Deal notes | | `created` | DATETIME | Creation date | | `modified` | DATETIME | Last modified | | `closed` | DATETIME | Close date | **`#__mokowaas_crm_activities`** — Activity log per contact/deal | Column | Type | Purpose | |--------|------|---------| | `id` | INT PK | Auto-increment | | `contact_id` | INT FK | References `#__contact_details.id` | | `deal_id` | INT FK | References `#__mokowaas_crm_deals.id` (nullable) | | `type` | ENUM('call','email','meeting','note','task') | Activity type | | `subject` | VARCHAR(255) | Activity subject | | `body` | TEXT | Activity details | | `due_date` | DATETIME | Scheduled date (for tasks) | | `completed` | TINYINT | Completed flag | | `user_id` | INT | User who created the activity | | `created` | DATETIME | Creation date | ### Contact Categories → CRM Roles Joomla Contact categories map to CRM roles: - Contacts in a **"Customers"** category → `role = 'customer'` - Contacts in a **"Vendors"** category → `role = 'vendor'` - Contacts in a **"Prospects"** category → `role = 'prospect'` - A single contact can have **multiple roles** (customer AND vendor) This mirrors Dolibarr's dual-flag thirdparty model but uses Joomla's native category system. --- ## Implementation Plan ### Phase 1: CRM Foundation — Contact Roles & Pipeline **Goal:** Extend Joomla Contacts with CRM roles, deals pipeline, and activity tracking #### New Extension: `plg_system_mokowaas_crm` - [ ] Database tables: `crm_roles`, `crm_pipeline_stages`, `crm_deals`, `crm_activities` - [ ] Default pipeline stages: Lead → Qualified → Proposal → Negotiation → Closed Won / Closed Lost - [ ] Hook `onContentAfterSave` on `com_contact` → auto-create CRM role based on contact category - [ ] Hook `onContentBeforeDelete` on `com_contact` → cascade cleanup of CRM data - [ ] Auto-generate customer/vendor codes on role creation - [ ] Health check integration: CRM stats in heartbeat (total contacts, active deals, pipeline value) #### Modifications to `com_mokowaas` - [ ] CRM dashboard view: pipeline overview, recent activities, deal stats - [ ] Contact detail panel: show CRM roles, linked deals, activity history - [ ] Pipeline board view (kanban-style drag-and-drop for deal stages) - [ ] Activity log view with filtering by type, contact, date range - [ ] CRM configuration panel: manage pipeline stages, role defaults #### New REST API Routes (`plg_webservices_mokowaas_crm`) - [ ] `GET/POST /v1/mokowaas/crm/roles` — List/assign CRM roles - [ ] `GET/POST/PUT /v1/mokowaas/crm/deals` — CRUD deals - [ ] `GET/POST /v1/mokowaas/crm/activities` — CRUD activities - [ ] `GET /v1/mokowaas/crm/pipeline` — Pipeline summary with stage counts and values --- ### Phase 2: Product Catalog & Shopping Cart **Goal:** Native Joomla shopping cart component #### New Extension: `com_mokoshop` - [ ] Product catalog with categories, search, filtering - [ ] Product detail pages with variants, pricing - [ ] Shopping cart (session-based → persistent for logged-in users) - [ ] Checkout flow linked to CRM contacts - [ ] Order management with status tracking - [ ] Database tables: `crm_products`, `crm_orders`, `crm_order_items`, `crm_cart` --- ### Phase 3: Invoicing & Billing **Goal:** Native invoicing tied to CRM contacts and orders - [ ] Invoice generation from orders - [ ] Recurring invoice support - [ ] Payment tracking and status - [ ] Customer portal: view invoices, download PDFs - [ ] Supplier invoice management (for vendor-role contacts) - [ ] Database tables: `crm_invoices`, `crm_invoice_items`, `crm_payments` --- ### Phase 4: Point of Sale **Goal:** Touch-screen POS for in-person sales - [ ] POS interface (tablet-optimized, touch-friendly) - [ ] Quick product search and barcode scanning - [ ] Cash register management (open/close, daily reports) - [ ] Receipt printing - [ ] Creates orders and invoices in the CRM system - [ ] Multi-terminal support --- ### Phase 5: Inventory & Stock Management **Goal:** Warehouse and stock tracking - [ ] Warehouse management - [ ] Stock movements and history - [ ] Low stock alerts (via heartbeat notifications) - [ ] Lot/serial number tracking - [ ] Database tables: `crm_warehouses`, `crm_stock_movements` --- ### Phase 6: HRM & Projects **Goal:** Employee and project management as opt-in features - [ ] Employee records, leave management, expense reports - [ ] Project management with tasks and time tracking - [ ] Contract/subscription management --- ### Phase 7: Marketing & Bulk Mail **Goal:** Marketing campaigns from CRM contact base - [ ] Mailchimp integration for bulk email delivery - [ ] Mass mailing from CRM contact categories - [ ] Campaign tracking in CRM dashboard - [ ] Ties into #193 (article update notifications) --- ## Extensions Summary ### New Extensions | Extension | Type | Purpose | |-----------|------|---------| | `plg_system_mokowaas_crm` | System Plugin | CRM engine: contact roles, deals, activities, event hooks | | `plg_webservices_mokowaas_crm` | Webservices Plugin | REST API routes for CRM data | | `com_mokoshop` | Component (Phase 2) | Shopping cart, product catalog, checkout | ### Modified Extensions | Extension | Changes | |-----------|---------| | `com_mokowaas` | CRM dashboard, pipeline board, activity log, config panel | | `mod_mokowaas_cpanel` | CRM summary widget | | `plg_system_mokowaas` | Add CRM stats to health checks | | `plg_system_mokowaas_monitor` | Extend heartbeat with CRM metrics | | `pkg_mokowaas.xml` | Add new CRM child extensions | ### ~~Removed from Plan~~ - ~~`MokoDoliJoomla`~~ — No Dolibarr-side module needed - ~~Dolibarr REST API integration~~ — All native Joomla - ~~Webhook sync~~ — No external system to sync with --- ## Design Inspiration from Dolibarr | Dolibarr Concept | MokoWaaS Implementation | |------------------|------------------------| | `llx_societe` (thirdparty with dual customer/vendor flag) | `#__mokowaas_crm_roles` (multiple roles per Joomla contact) | | `llx_socpeople` (contacts linked to thirdparties) | Joomla `#__contact_details` (native, no duplication) | | Commercial pipeline (proposals → orders → invoices) | `#__mokowaas_crm_deals` with configurable pipeline stages | | TakePOS | Native POS component (Phase 4) | | `comm/mailing` | Mailchimp integration + Joomla mail (Phase 7) | | Product catalog + stock | `com_mokoshop` with inventory tables (Phases 2 & 5) | --- ## Related Issues - #193 — Article update notification plugin with bulk mail integration (Phase 7)
Author
Owner

Branch created: feature/192-expand-mokowaas-into-full-crm-offering-w

git fetch origin
git checkout feature/192-expand-mokowaas-into-full-crm-offering-w
Branch created: [`feature/192-expand-mokowaas-into-full-crm-offering-w`](https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/src/branch/feature/192-expand-mokowaas-into-full-crm-offering-w) ```bash git fetch origin git checkout feature/192-expand-mokowaas-into-full-crm-offering-w ```
jmiller added this to the v06.00.00 (CRM) milestone 2026-06-06 16:17:52 +00:00
Author
Owner

Extension Breakdown: New vs. Modified

New Extensions

Extension Type Repo Purpose
plg_system_mokowaas_crm Joomla System Plugin MokoWaaS Dolibarr API client, Joomla Contact ↔ Dolibarr thirdparty sync, webhook receiver, CRM event handling
com_mokoshop Joomla Component New repo Full frontend shopping cart: product catalog, cart, checkout, order history. MVC with site views
plg_webservices_mokowaas_crm Joomla Webservices Plugin MokoWaaS Registers REST API routes for Dolibarr webhook callbacks into Joomla
MokoDoliJoomla Dolibarr Module MokoDoliMods Joomla integration on Dolibarr side: webhook target config, field mapping, sync admin UI, inbound request validation

Modifications to Existing Extensions

Extension Repo Changes
plg_system_mokowaas (core) MokoWaaS Add 17th health check: Dolibarr API connectivity and version
plg_system_mokowaas_monitor MokoWaaS Extend heartbeat payload with Dolibarr connection status, sync stats
com_mokowaas MokoWaaS Add CRM dashboard section, Dolibarr config panel, link to shop/invoice views
mod_mokowaas_cpanel MokoWaaS Add CRM summary widget (contacts synced, recent orders, revenue)
pkg_mokowaas.xml MokoWaaS Add plg_system_mokowaas_crm and plg_webservices_mokowaas_crm as child extensions
MokoDoliChimp (ID 500100) MokoDoliMods Extend to accept Joomla contact category → Mailchimp audience syncs (Phase 7)
MokoCRM (ID 185067) MokoDoliMods Evaluate overlap — may absorb some MokoDoliJoomla functionality or vice versa

Architecture Pattern

Follows MokoWaaS convention of one plugin per concern:

plg_system_mokowaas           → core (health, branding, aliases)
plg_system_mokowaas_firewall  → security
plg_system_mokowaas_tenant    → restrictions
plg_system_mokowaas_monitor   → heartbeat
plg_system_mokowaas_offline   → offline mode
plg_system_mokowaas_crm       → CRM/Dolibarr integration  ← NEW

com_mokoshop is a separate component (not inside com_mokowaas) because it has frontend site views (product listing, product detail, cart, checkout, order history) that are customer-facing, whereas com_mokowaas is admin-only.

## Extension Breakdown: New vs. Modified ### New Extensions | Extension | Type | Repo | Purpose | |-----------|------|------|---------| | **`plg_system_mokowaas_crm`** | Joomla System Plugin | MokoWaaS | Dolibarr API client, Joomla Contact ↔ Dolibarr thirdparty sync, webhook receiver, CRM event handling | | **`com_mokoshop`** | Joomla Component | New repo | Full frontend shopping cart: product catalog, cart, checkout, order history. MVC with site views | | **`plg_webservices_mokowaas_crm`** | Joomla Webservices Plugin | MokoWaaS | Registers REST API routes for Dolibarr webhook callbacks into Joomla | | **`MokoDoliJoomla`** | Dolibarr Module | MokoDoliMods | Joomla integration on Dolibarr side: webhook target config, field mapping, sync admin UI, inbound request validation | ### Modifications to Existing Extensions | Extension | Repo | Changes | |-----------|------|---------| | **`plg_system_mokowaas`** (core) | MokoWaaS | Add 17th health check: Dolibarr API connectivity and version | | **`plg_system_mokowaas_monitor`** | MokoWaaS | Extend heartbeat payload with Dolibarr connection status, sync stats | | **`com_mokowaas`** | MokoWaaS | Add CRM dashboard section, Dolibarr config panel, link to shop/invoice views | | **`mod_mokowaas_cpanel`** | MokoWaaS | Add CRM summary widget (contacts synced, recent orders, revenue) | | **`pkg_mokowaas.xml`** | MokoWaaS | Add `plg_system_mokowaas_crm` and `plg_webservices_mokowaas_crm` as child extensions | | **MokoDoliChimp** (ID 500100) | MokoDoliMods | Extend to accept Joomla contact category → Mailchimp audience syncs (Phase 7) | | **MokoCRM** (ID 185067) | MokoDoliMods | Evaluate overlap — may absorb some `MokoDoliJoomla` functionality or vice versa | ### Architecture Pattern Follows MokoWaaS convention of **one plugin per concern**: ``` plg_system_mokowaas → core (health, branding, aliases) plg_system_mokowaas_firewall → security plg_system_mokowaas_tenant → restrictions plg_system_mokowaas_monitor → heartbeat plg_system_mokowaas_offline → offline mode plg_system_mokowaas_crm → CRM/Dolibarr integration ← NEW ``` `com_mokoshop` is a separate component (not inside `com_mokowaas`) because it has **frontend site views** (product listing, product detail, cart, checkout, order history) that are customer-facing, whereas `com_mokowaas` is admin-only.
Author
Owner

Architecture Update: Joomla-Native CRM

Revised approach: This is NOT a Dolibarr integration. Dolibarr serves as inspiration/blueprint for feature design, but the CRM is built natively in Joomla with its own database tables and logic.

  • All CRM functionality lives in the MokoWaaS extension suite
  • Joomla Contacts is the base layer — extended with customer/vendor roles, pipeline, deals
  • Shopping cart, POS, invoicing, inventory — all native Joomla components
  • No external ERP dependency

This means:

  • MokoDoliJoomla — Not needed
  • Dolibarr REST API integration — Not needed
  • Webhook sync — Not needed
  • plg_system_mokowaas_crm becomes the native CRM engine, not a sync bridge
  • com_mokoshop remains as a native Joomla shopping cart component
## Architecture Update: Joomla-Native CRM **Revised approach:** This is NOT a Dolibarr integration. Dolibarr serves as **inspiration/blueprint** for feature design, but the CRM is built **natively in Joomla** with its own database tables and logic. - All CRM functionality lives in the MokoWaaS extension suite - Joomla Contacts is the base layer — extended with customer/vendor roles, pipeline, deals - Shopping cart, POS, invoicing, inventory — all native Joomla components - No external ERP dependency This means: - ~~`MokoDoliJoomla`~~ — Not needed - ~~Dolibarr REST API integration~~ — Not needed - ~~Webhook sync~~ — Not needed - `plg_system_mokowaas_crm` becomes the native CRM engine, not a sync bridge - `com_mokoshop` remains as a native Joomla shopping cart component
Author
Owner

Architecture Decision: Use Joomla Articles for Product/Service Descriptions

Instead of storing rich-text descriptions in CRM product tables, reference Joomla #__content (articles) for product and service descriptions. This reduces table bloat and leverages Joomla's existing content infrastructure.

Pattern

#__mokowaas_crm_products (lightweight)
├── id, sku, price, stock_qty, category_id, status
├── article_id → FK to #__content.id  ← rich description lives here
└── type (product / service)

#__content (Joomla articles — already exists)
├── Full WYSIWYG content with images, modules, custom fields
├── SEO: metadesc, metakey, alias for URL routing
├── Versioning, access control, publishing workflow
└── Frontend rendering via com_content (no custom views needed)

Benefits

  • No TEXT column bloat in CRM tables — descriptions stay in #__content
  • Full Joomla editor — TinyMCE, media manager, image handling, readmore splits
  • SEO for free — articles already have meta fields, canonical URLs, sitemaps
  • Custom fields — Joomla's custom fields system extends articles without schema changes
  • Versioning — article version history tracks description changes
  • Access control — ACL per article (show pricing to logged-in users only, etc.)
  • Frontend routing — products can have SEF URLs via menu items or category views
  • Multilingual — Joomla's language association system handles translations

How It Works

  1. Create a Joomla article category: "Products" / "Services"
  2. Each product's detail page IS its Joomla article
  3. CRM product table stores only: SKU, price, stock, tax, weight, dimensions
  4. article_id links to the full description in #__content
  5. Shopping cart pulls price/stock from CRM table, renders description from article
  6. Admin creates product → auto-creates linked article (or picks existing one)

Trade-off

  • Dependency on com_content — but MokoWaaS IS Joomla, so this is a feature not a cost
  • Product listing queries join to #__content — but Joomla's content table is well-indexed

Sub-Issues

  • #196 — Dolibarr migration import tool (one-time, pre-CRM, direct DB or SQL dump)
  • #197 — Native e-signature component (MokoDoliSign blueprint)
  • #198 — Email integration (IMAP + Google OAuth)
  • #193 — Article update notification plugin (bulk mail)
## Architecture Decision: Use Joomla Articles for Product/Service Descriptions Instead of storing rich-text descriptions in CRM product tables, **reference Joomla `#__content` (articles)** for product and service descriptions. This reduces table bloat and leverages Joomla's existing content infrastructure. ### Pattern ``` #__mokowaas_crm_products (lightweight) ├── id, sku, price, stock_qty, category_id, status ├── article_id → FK to #__content.id ← rich description lives here └── type (product / service) #__content (Joomla articles — already exists) ├── Full WYSIWYG content with images, modules, custom fields ├── SEO: metadesc, metakey, alias for URL routing ├── Versioning, access control, publishing workflow └── Frontend rendering via com_content (no custom views needed) ``` ### Benefits - **No TEXT column bloat** in CRM tables — descriptions stay in `#__content` - **Full Joomla editor** — TinyMCE, media manager, image handling, readmore splits - **SEO for free** — articles already have meta fields, canonical URLs, sitemaps - **Custom fields** — Joomla's custom fields system extends articles without schema changes - **Versioning** — article version history tracks description changes - **Access control** — ACL per article (show pricing to logged-in users only, etc.) - **Frontend routing** — products can have SEF URLs via menu items or category views - **Multilingual** — Joomla's language association system handles translations ### How It Works 1. Create a Joomla article category: **"Products"** / **"Services"** 2. Each product's detail page IS its Joomla article 3. CRM product table stores only: SKU, price, stock, tax, weight, dimensions 4. `article_id` links to the full description in `#__content` 5. Shopping cart pulls price/stock from CRM table, renders description from article 6. Admin creates product → auto-creates linked article (or picks existing one) ### Trade-off - Dependency on `com_content` — but MokoWaaS IS Joomla, so this is a feature not a cost - Product listing queries join to `#__content` — but Joomla's content table is well-indexed ### Sub-Issues - #196 — Dolibarr migration import tool (one-time, pre-CRM, direct DB or SQL dump) - #197 — Native e-signature component (MokoDoliSign blueprint) - #198 — Email integration (IMAP + Google OAuth) - #193 — Article update notification plugin (bulk mail)
jmiller changed title from Expand MokoWaaS into full CRM offering with Dolibarr module suite to Expand MokoWaaS+ERP into full ERP offering — Joomla-native CMS + ERP platform 2026-06-06 17:35:25 +00:00
Author
Owner

Update: Full customer-facing frontend portal for ERP

The ERP isn't admin-only — it needs a complete frontend customer portal where logged-in clients can self-service. This is a Joomla site-side component view set, not just backend admin.

Customer Portal Views

View Purpose
Dashboard Overview: recent orders, open invoices, active deals, license status
My Account Contact details, company info, ERP role (customer/vendor)
Orders Order history, order detail, reorder, track status
Invoices View invoices, download PDFs, payment status, pay online
Quotes/Proposals View proposals, accept/decline, request changes
Products Browse catalog, product detail (linked to Joomla articles)
Shopping Cart Cart, checkout flow (via com_mokoshop)
E-Signatures Pending signature requests, sign documents, view history
Tickets Submit support tickets, view replies (existing helpdesk)
License View license, update DLID, see services (#202)
Documents Download shared documents (contracts, agreements, certificates)
Activities View logged activities (calls, meetings, emails) related to their account

Access Control

  • Frontend views filtered by logged-in Joomla user → matched to ERP contact via email or user-contact link
  • Customers only see their own data (orders, invoices, deals)
  • Vendors see their own supplier orders and invoices
  • ACL per view (configurable which portal sections are enabled)

Implementation

  • Site-side views in com_mokowaas (or new com_mokowaas_portal if cleaner separation needed)
  • Menu items for each portal section (SEF URLs)
  • Responsive design — works on mobile/tablet
  • Joomla template override friendly
## Update: Full customer-facing frontend portal for ERP The ERP isn't admin-only — it needs a **complete frontend customer portal** where logged-in clients can self-service. This is a Joomla site-side component view set, not just backend admin. ### Customer Portal Views | View | Purpose | |------|---------| | **Dashboard** | Overview: recent orders, open invoices, active deals, license status | | **My Account** | Contact details, company info, ERP role (customer/vendor) | | **Orders** | Order history, order detail, reorder, track status | | **Invoices** | View invoices, download PDFs, payment status, pay online | | **Quotes/Proposals** | View proposals, accept/decline, request changes | | **Products** | Browse catalog, product detail (linked to Joomla articles) | | **Shopping Cart** | Cart, checkout flow (via `com_mokoshop`) | | **E-Signatures** | Pending signature requests, sign documents, view history | | **Tickets** | Submit support tickets, view replies (existing helpdesk) | | **License** | View license, update DLID, see services (#202) | | **Documents** | Download shared documents (contracts, agreements, certificates) | | **Activities** | View logged activities (calls, meetings, emails) related to their account | ### Access Control - Frontend views filtered by logged-in Joomla user → matched to ERP contact via email or user-contact link - Customers only see their own data (orders, invoices, deals) - Vendors see their own supplier orders and invoices - ACL per view (configurable which portal sections are enabled) ### Implementation - Site-side views in `com_mokowaas` (or new `com_mokowaas_portal` if cleaner separation needed) - Menu items for each portal section (SEF URLs) - Responsive design — works on mobile/tablet - Joomla template override friendly
Author
Owner

Update: Ticket system integration in customer portal

The existing MokoWaaS helpdesk (#__mokowaas_tickets, #__mokowaas_ticket_replies) is already built — the customer portal just needs frontend views that interface into it:

  • Submit tickets from the portal (creates rows in existing #__mokowaas_tickets)
  • View ticket history — filtered to the logged-in user's tickets
  • Reply to tickets — append to #__mokowaas_ticket_replies
  • Track SLA status — show response/resolution due dates from #__mokowaas_ticket_categories
  • Knowledge base search — surface canned responses / KB articles before ticket submission
  • Ticket linked to ERP contact — auto-associate tickets with the user's ERP contact record, so ticket history shows in the ERP activity timeline

No new tables needed — this is purely frontend views on top of the existing helpdesk schema.

## Update: Ticket system integration in customer portal The existing MokoWaaS helpdesk (`#__mokowaas_tickets`, `#__mokowaas_ticket_replies`) is already built — the customer portal just needs **frontend views** that interface into it: - **Submit tickets** from the portal (creates rows in existing `#__mokowaas_tickets`) - **View ticket history** — filtered to the logged-in user's tickets - **Reply to tickets** — append to `#__mokowaas_ticket_replies` - **Track SLA status** — show response/resolution due dates from `#__mokowaas_ticket_categories` - **Knowledge base search** — surface canned responses / KB articles before ticket submission - **Ticket linked to ERP contact** — auto-associate tickets with the user's ERP contact record, so ticket history shows in the ERP activity timeline No new tables needed — this is purely frontend views on top of the existing helpdesk schema.
Author
Owner

Completed — Code distributed to dedicated repos

The ERP feature branch (feature/192-expand-mokowaas-into-full-erp-offering) has been closed and deleted. All code has been distributed across 8 dedicated repos as standalone licensed Joomla packages:

Repo Layer Files Tables
MokoWaaSCRM 1 106 21
MokoWaaSChild 2 (CRM) 15 11
MokoWaaSERP 2 ~35 9
MokoWaaSShop 3 38 2
MokoWaaSPOS 3 14 4
MokoWaaSMRP 3 15 5
MokoWaaSHRM 3 20 10
MokoWaaSRestaurant 4 18 7

Total: ~260 files, 69 tables, 9 repos.

MokoWaaS base remains lean — CMS, firewall, tenant, health, helpdesk only. No ERP code in the base package.

## Completed — Code distributed to dedicated repos The ERP feature branch (`feature/192-expand-mokowaas-into-full-erp-offering`) has been closed and deleted. All code has been distributed across 8 dedicated repos as standalone licensed Joomla packages: | Repo | Layer | Files | Tables | |------|-------|-------|--------| | MokoWaaSCRM | 1 | 106 | 21 | | MokoWaaSChild | 2 (CRM) | 15 | 11 | | MokoWaaSERP | 2 | ~35 | 9 | | MokoWaaSShop | 3 | 38 | 2 | | MokoWaaSPOS | 3 | 14 | 4 | | MokoWaaSMRP | 3 | 15 | 5 | | MokoWaaSHRM | 3 | 20 | 10 | | MokoWaaSRestaurant | 4 | 18 | 7 | **Total: ~260 files, 69 tables, 9 repos.** MokoWaaS base remains lean — CMS, firewall, tenant, health, helpdesk only. No ERP code in the base package.
Sign in to join this conversation.
No labels
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuite#192