MokoGitea license system integration for premium add-on validation #202
Open
opened 2026-06-06 17:36:38 +00:00 by jmiller
·
4 comments
Labels
Clear labels
architecture
automation
breaking-change
bug
build
ci-cd
config
css
dependencies
deploy-failure
docker
documentation
dolibarr
duplicate
enhancement
generic
good first issue
health-check
health: excellent
health: fair
health: good
health: poor
help wanted
html
invalid
javascript
joomla
major-release
minor-release
mokostandards
needs-review
needs-testing
patch-release
php
priority: critical
priority: high
priority: low
priority: medium
push-failure
python
question
regression
release-candidate
security
size/l
size/m
size/s
size/xl
size/xs
size/xxl
standards-drift
standards-update
standards-violation
status: blocked
status: in-progress
status: needs-review
status: on-hold
status: pending
status: wontfix
sync-failure
sync-report
template-validation-failure
test-failure
tests
type: bug
type: chore
type: enhancement
type: feature
type: refactor
type: release
type: test
type: version
typescript
version
version-branch
version-drift
work-in-progress
Automated processes or scripts
Breaking API or functionality change
Build system changes
CI/CD pipeline changes
Configuration file changes
CSS/styling changes
Dependency updates
Automated deploy failure tracking
Docker configuration changes
Documentation changes
Dolibarr module or extension
Generic project or library
Good for newcomers
Repository health check results
Health score 90-100
Health score 50-69
Health score 70-89
Health score below 50
Extra attention needed
HTML template changes
JavaScript code changes
Joomla extension or component
Major version release (breaking changes)
Minor version release (XX.YY.00)
MokoStandards compliance
Awaiting code review
Requires manual or automated testing
Patch version release (XX.YY.ZZ)
PHP code changes
File push failure requiring attention
Python code changes
Regression from a previous working state
Release candidate build
Security-related changes
Large change (101-300 lines)
Medium change (31-100 lines)
Small change (11-30 lines)
Extra large change (301-1000 lines)
Extra small change (1-10 lines)
Extremely large change (1000+ lines)
Repository drifted from MokoStandards
MokoStandards sync update
Standards compliance failure
Temporarily on hold
Pending action or decision
This will not be worked on
Bulk sync failure requiring attention
Bulk sync run report
Template workflow validation failure
Automated test failure
Test suite changes
Something isn't working
Maintenance tasks
Enhancement to existing feature
New feature or request
Code refactoring
Release preparation or tracking
Test suite additions or changes
Version-related change
TypeScript code changes
Version bump or release
Version branch related
Version mismatch detected
Work in progress, not ready for merge
No labels
Priority
Medium
Type
Feature
Milestone
No items
No Milestone
Assignees
jmiller (Jonathan Miller)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: MokoConsulting/MokoSuite#202
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking 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.