MokoGitea license system integration for premium add-on validation #202
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Integrate MokoWaaS+ERP with the MokoGitea license system to validate license keys for premium add-on components (POS, MRP, and future paid modules). This enables per-component licensing where not all features are available to all clients.
Parent issue: #192
How It Works
License Validation Flow
com_mokopos)Components Requiring Licenses
com_mokoposcom_mokomrppkg_mokowaasIntegration Points
Implementation
plg_system_mokowaas_erpor newplg_system_mokowaas_licenseonAfterInitialise(cached, not every request)com_mokowaasdashboard/v1/mokowaas/licenses— list installed add-on license statusesSocial Login / Google OAuth Piggyback
The Google OAuth email setup (#198) can leverage the existing MokoWaaS social login plugin for OAuth token management — reuse the same Google OAuth credentials/flow rather than building a separate OAuth implementation.
Update: Organization-level license interface
The license system is attached to a MokoGitea organization, not individual users. This means:
How It Works
Flow
Benefits
Update: Separate plugin + service-based licensing
Separate Plugin
The license system will be its own plugin:
plg_system_mokowaas_license— not part ofplg_system_mokowaas_erp. This keeps licensing decoupled from ERP functionality, so it can validate licenses for ANY MokoWaaS add-on (ERP, POS, MRP, future products).Services Attached to License Key Packages
License keys aren't just product keys — they unlock service packages that bundle features together:
Each DLID maps to a service package. The license plugin checks which services are included and enables/disables features accordingly. This means:
API Response Shape
Update: Customer portal license visibility
License information should be accessible on the frontend customer portal so clients can self-service their subscription status:
Customer Portal View
Implementation
com_mokowaas:?view=licenseor?view=portal&layout=licenseplg_system_mokowaas_licenseUpdate: License key entry/update from frontend
Clients should be able to enter and update their DLID/license key directly from the MokoWaaS frontend portal — not just the admin backend.
Frontend License Management
Flow
This means the license plugin needs a frontend controller that accepts POST from the portal view, validates, and stores the updated key — not just a backend plugin config field.