The modules system controls which features each role can access within QualityDocD. Three modules map to distinct API endpoint groups — document lifecycle management, document consultation, and advanced search. Rather than hard-coding role checks in your frontend, callDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/juescoryisus/QualityDocD/llms.txt
Use this file to discover all available pages before exploring further.
GET /modules after login to receive the exact permission set for the authenticated user and render the UI accordingly.
Module definitions
| Module ID | Name | Description |
|---|---|---|
MODULE_1 | Gestión de Documentos | Document approval, rejection, and lifecycle management |
MODULE_2 | Consulta de Documentos | Viewing and searching approved documents |
MODULE_3 | Búsqueda Avanzada | Advanced search, metadata filtering, and autocomplete suggestions |
Role access matrix
The table below shows which roles have read (canRead) and write (canWrite) access to each module. Only modules where canRead is true are returned in the API response.
| Role | MODULE_1 | MODULE_2 | MODULE_3 |
|---|---|---|---|
VIEWER | — | read | — |
COMMENTER | — | read | — |
CONTRIBUTOR | — | read | — |
OPERATOR | read + write | read | read |
COMPANY_ADMIN | read + write | read + write | read |
SUPER_ADMIN | read + write | read + write | read + write |
VIEWER, COMMENTER, and CONTRIBUTOR are the three standard user roles. They can only read MODULE_2 — they cannot access document management (MODULE_1) or advanced search (MODULE_3).GET /modules
Returns the list of feature modules visible to the authenticated user, with per-module read/write flags computed from their role. Authentication: Bearer token required (requireAuth middleware).
Request headers
Bearer <token> — JWT issued by POST /auth/login.Response — 200 OK
The authenticated user’s role string (e.g.
"OPERATOR", "COMPANY_ADMIN").Array of module objects. Only modules where
canRead is true for the caller’s role are included.Example
Using modules for UI feature flags
GET /modules is designed to be called once after login and stored in your frontend application state. Use the flags to drive conditional rendering:
- If
canWriteisfalseforMODULE_1, hide or disable approval and rejection buttons. - If a module is absent from the response entirely (
canReadwasfalse), hide the corresponding navigation section. - If
canWriteistrueforMODULE_2, the user is aCOMPANY_ADMINorSUPER_ADMIN— show document management controls within the consultation view.