rimba / knowledge
Controlled documents, learning and qualification for the Rimba application.
Requires
- php: ^8.3
- filament/filament: ^5.0
- illuminate/contracts: ^13.0
- illuminate/database: ^13.0
- illuminate/support: ^13.0
- rimba/asas: *
- rimba/boleh: *
- rimba/pihak: *
- rimba/pinta: *
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^11.0
- phpunit/phpunit: ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
rimba/knowledge is a Laravel 13 / Filament 5 add-on for the existing Rimba application. It combines controlled documents, revision-bound learning materials, courses, question banks and qualification testing without duplicating Rimba's organization, authorization or approval engines.
Architecture boundaries
- Asas/Base: shared
BitesServiceProvider, mergedbitesconfiguration, views, icons and model discovery. - Pihak/Organization:
OrgUnitis the accountable owner; optionalOrgTeamis the operational manager. - Boleh/Can: permissions are discovered from
Http\\UI\\StaffandHttp\\UI\\Team; there is no hard-codedhasRole('tactician')check. - Pinta/Request:
DocumentRevisionuses Rimba'sHasWorkflowsconcern. Knowledge emitsDocumentRevisionSubmitted; the host/Pinta listener starts the configured workflow and may return/storeworkflow_run_idthrough a customDocumentRevisionApprovalGateway. - MESA/MES: only UUID contracts are exported. MES does not read Knowledge's internal bigint organization/staff keys.
Requirements
- PHP
^8.3 - Laravel
^13.0 - Filament
^5.0 - Existing Rimba Asas, Boleh, Pihak and Pinta packages
- Existing
org_units,org_teamsandstafftables as documented by the Rimba packages staff.uuidavailable for MES qualification-result synchronization
Installation
composer require rimba/knowledge php artisan migrate php artisan rimba:lock-sync
Laravel package discovery registers Rimba\\Knowledge\\KnowledgeServiceProvider. If package discovery is disabled, register it with the other Rimba providers.
The host panel providers should discover resources from:
Rimba\\Knowledge\\Http\\UI\\Staff Rimba\\Knowledge\\Http\\UI\\Team
Use Boleh to grant Staff read/take permissions and Team management permissions to the scoped roles, including the OrgTeam tactician role. Knowledge intentionally does not bypass Boleh with direct role-name checks.
Pinta approval integration
The default gateway dispatches DocumentRevisionSubmitted. Bind DocumentRevisionApprovalGateway in the host if workflow creation is synchronous, or listen for the event and start a Pinta workflow whose subject is the DocumentRevision. On approval, call ApplyDocumentRevisionDecision::approve(), then PublishDocumentRevision::handle() when the revision should become effective.
Knowledge stores no approval rows of its own. Pinta/Packstub owns workflow definitions, versions, runs, steps, waits and approval audit.
Qualification flow
- Create a document and its revision.
- Attach one or more files.
- Submit through Pinta, approve, and publish the exact revision.
- Create a question bank for that revision; add questions and answer options; activate the bank.
- Create an active qualification test and attach revision-specific materials.
- Staff starts a quiz. The package randomly selects questions within each material's limit and freezes question, option, answer-key, points and passing-score snapshots.
- Submission is graded by exact option-set match. The attempt keeps its immutable audit snapshot.
- A passed attempt can be projected as
QualificationTestResultand personnel capability data for MES.
MES payloads
php artisan knowledge:mes-payload qualification-test <qualification-test-uuid> php artisan knowledge:mes-payload qualification-result <attempt-uuid> php artisan knowledge:mes-payload work-document-reference <revision-uuid> --work-record=<mes-work-record-uuid>
Mappings are documented in docs/MES-INTEGRATION.md.
Validation
composer install
composer lint
composer test
php tools/validate-package.php
php artisan migrate:fresh
php artisan rimba:lock-check
See docs/ARCHITECTURE.md, docs/DATABASE.md, docs/PINTA-INTEGRATION.md, and docs/VALIDATION.md.