OmniMention for Perfex CRM establishes a centralized collaboration and tagging foundation designed to keep teams aligned and informed. By transforming how users reference colleagues and CRM records across discussions, OmniMention eliminates lost feedback and speeds up project execution.
Architectural Overview
OmniMention is engineered as a zero-dependency Perfex CRM module built on top of the native CodeIgniter application framework. The module hooks cleanly into administrative and client portal views, dynamically injecting its lightweight frontend controller script while maintaining strict database separation.
flowchart TD
subgraph UI["User Interaction Layer"]
A["TinyMCE Rich Text Editor"]
B["Standard Form Textareas"]
C["Task Todo Items & Notes"]
D["Smart '?' Guide Button"]
end
subgraph SEC["Security & Guard Layer"]
S1["Staff Authentication Guard"]
S2["Client Portal Permission Scope"]
S3["Public Guest Decorator Mode"]
end
subgraph FE["OmniMention Frontend Engine"]
K1["Keyup Interceptor (@, $, #)"]
K2["Autocomplete Finder Panel"]
K3["Token Inserter & HTML Badge Decorator"]
end
subgraph BE["Backend Controller & Model"]
M1["Api::get_users() with Avatar Resolution"]
M2["Api::get_entities() Across 8 Modules"]
M3["Omnimention_model Parser & Cleaner"]
end
subgraph DISPATCH["Notification Dispatch"]
N1["In-App Bell Alerts"]
N2["Automated HTML Email Delivery"]
N3["Notification Matrix Settings"]
end
subgraph DB["Composite Indexed Storage"]
D1[("tblomnimention_mentions")]
D2[("tblomnimention_entity_tags")]
D3[("tblomnimention_settings")]
end
UI --> K1
SEC -.-> FE
K1 --> K2
K2 --> M1
K2 --> M2
K2 --> K3
K3 --> M3
M3 --> N1
M3 --> N2
M3 --> D1
M3 --> D2
DISPATCH -.-> D3
Core Engineering Pillars
- Intelligent Event Interception: Listens to input triggers in both TinyMCE iframe instances and standard textarea DOM nodes, measuring caret coordinates for pixel-perfect popup alignment.
- Deterministic Token Transformation: Mentions created in plain text areas are encoded as markdown tokens, ensuring clean storage in text database columns while being gracefully hydrated into interactive badges on page render.
- Sub-Millisecond Query Performance: Tailored composite indexes on InnoDB tables guarantee that high-volume timeline queries run directly from RAM with zero filesort overhead.
sequenceDiagram
actor User as Staff Member
participant Editor as TinyMCE / Textarea
participant Engine as OmniMention JS Engine
participant API as Backend API Endpoint
participant DB as MySQL InnoDB Tables
participant Notif as Notification Dispatcher
actor Target as Tagged Colleague
User->>Editor: Type '@' or '$'
Editor->>Engine: Trigger Autocomplete Event
Engine->>API: GET /omnimention/api/users or entities
API->>DB: Query with Composite Index Lookup
DB-->>API: Return Ranked Matches (Avatars, Badges)
API-->>Engine: JSON Response
Engine->>User: Display Autocomplete Finder Panel
User->>Engine: Select Target Colleague / Record
Engine->>Editor: Insert Badge Pill / Markdown Token
User->>Editor: Submit Comment / Task Note
Editor->>API: Post Content Payload
API->>DB: Store Record & Differential Mentions
API->>Notif: Trigger Notification Matrix
Notif->>Target: In-App Bell Alert + Contextual Email
Security & Access Isolation
OmniMention enforces strict permission checks at every level. Guest visitors accessing public proposal or contract links are completely blocked from executing autocompleter queries or viewing internal directory details, ensuring that enterprise data remains secure.