Metadata-Driven Architecture — Technical Design Document
Version: 1.0.0 | Date: May 11, 2026
Author: System Architecture Audit
Status: Current Production State
Table of Contents
- Executive Summary
- Architecture Document: Registry-Driven Entity Routes
- Navigation Sync Report
- Studio-Renderer Parity Map
- Recommendations
1. Executive Summary
Axiom Genesis employs a metadata-driven architecture where UI behavior, entity CRUD operations, and navigation are controlled by database configuration rather than hardcoded logic. This document audits three core subsystems:
| Subsystem | Purpose | Health Status |
|---|---|---|
| Registry Layer | Entity metadata & field-level security | ✅ Healthy (30 registries) |
| Navigation Layer | Menu structure & routing | ⚠️ Minor gaps identified |
| Studio-Renderer Layer | Design-time vs runtime parity | ✅ High parity |
Key Findings
- 22 navigation items configured across 5 target types
- 30 object registries defining entity metadata
- 20 dataview configs available for DATAVIEW navigation
- 3 document projects with full renderer configuration
- 2 potential zombie menu items identified (no frontend handler)
- 1 hardcoded route without navigation config
2. Architecture Document: Registry-Driven Entity Routes
2.1 Overview
The entity routing system uses a three-layer resolution pattern:
┌──────── ─────────────────────────────────────────────────────────┐
│ API Request │
│ GET /api/v1/entity/:entity_code/get │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Layer 1: Route Resolution (entity.routes.js) │
│ ├── verifyToken.validate_token (JWT validation) │
│ ├── resolveEntityInfo (→ EntityHelper.getEntityInfo) │
│ └── ProfileLoader.middleware() (policy loading) │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Layer 2: Registry Resolution (redis-entity.helper.js) │
│ ├── Redis Cache Lookup (key: obj_registry:{entityCode}) │
│ │ └── TTL: 24 hours │
│ └── DB Fallback → app_object_registries │
│ └── Auto-cache result in Redis │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Layer 3: Profile Resolution (profile-loader.util.js) │
│ ├── app_object_profiles lookup │
│ ├── Policy application: │
│ │ ├── projection (include/exclude fields) │
│ │ ├── masking (email, phone, SSN obfuscation) │
│ │ └── rowFilters (tenant isolation) │
│ └── Returns enriched request context │
└─────────────────────────────────────────────────────────────────┘
2.2 Registry Schema: app_object_registries
Current Registry Count: 30 entities
| Column | Type | Purpose |
|---|---|---|
obj_code | VARCHAR(100) | Entity identifier (e.g., users, projects) |
obj_description | VARCHAR(500) | Human-readable name |
obj_type_code | VARCHAR(50) | TABLE | VIEW | FUNCTION |
obj_connection_code | VARCHAR(100) | FK to app_connections |
obj_payload | JSON | Field definitions, relationships, validation rules |
obj_payload_object_name | VARCHAR(200) | Actual database table/view name |
obj_payload_identifier | VARCHAR(100) | Primary key field name |
obj_payload_column_prefix | VARCHAR(10) | Column naming prefix (e.g., usr_, prj_) |
Registry Inventory (as of May 11, 2026):
| obj_code | Type | Connection |
|---|---|---|
applications | TABLE | RADICS_CFG_DB |
connections | TABLE | RADICS_CFG_DB |
dashboard_configs | TABLE | RADICS_CFG_DB |
dataview_configs | TABLE | RADICS_CFG_DB |
files | TABLE | RADICS_CFG_DB |
load_role_based_menus | FUNCTION | RADICS_CFG_DB |
navigation_configs | TABLE | RADICS_CFG_DB |
object_profiles | TABLE | RADICS_CFG_DB |
object_registries | TABLE | RADICS_CFG_DB |
page_configs | TABLE | RADICS_CFG_DB |
projects | TABLE | RADICS_CFG_DB |
roles | TABLE | RADICS_CFG_DB |
scrumboard_configs | TABLE | RADICS_CFG_DB |
tenants | TABLE | RADICS_CFG_DB |
users | TABLE | RADICS_CFG_DB |
value_set | TABLE | RADICS_CFG_DB |
workflow_configs | TABLE | RADICS_CFG_DB |
wft_instances | TABLE | RADICS_CFG_DB |
wft_logs | TABLE | RADICS_CFG_DB |
wft_nodes | TABLE | RADICS_CFG_DB |
wft_approvals | TABLE | RADICS_CFG_DB |
| ... | ... | ... |
2.3 Profile Schema: app_object_profiles
| Column | Type | Purpose |
|---|---|---|
prf_code | VARCHAR(100) | Profile identifier |
prf_object_code | VARCHAR(100) | FK to app_object_registries.obj_code |
prf_mode_code | VARCHAR(50) | FULL | READ | WRITE | EXECUTE |
prf_policy | JSON | Security policy (projection, masking, rowFilters) |
Policy Structure Example:
{
"projection": {
"type": "exclude",
"fields": ["usr_password_hash", "usr_salt"]
},
"masking": {
"usr_email_id": "email_mask",
"usr_phone": "phone_mask"
},
"rowFilters": {
"usr_tenant_id": "@tenant_id"
}
}
2.4 Data Flow: prj_doc_config → DocumentRenderer
The Document Management System uses a dedicated data flow:
┌─────────────────────────────────────────────────────────────────┐
│ 1. Navigation Click │
│ nvc_target_type = 'document_renderer' │
│ nvc_target_code = 'KNOWLEDGE_BASE' │
│ nvc_config.renderer.projectSlug = 'knowledge-base' │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 2. useNavigationHandler.ts │
│ Detects: navItem.targetType === 'document_renderer' │
│ Calls: handleDocumentRendererNavigation(action) │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 3. useDocumentRendererNavigation.ts │
│ Builds: DocumentRendererConfig │
│ Opens: DocumentRendererDialog │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 4. DocumentRenderer.tsx │
│ Props: projectSlug, projectId, navConfig │
│ Fetches: apt_projects.prj_doc_config via DocumentService │
│ Renders: Navigation tree, content, sidebars │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 5. Content Resolution │
│ prj_doc_config.navigation.tree[] → DocSidebar │
│ Node.fileType → MarkdownRenderer / PdfViewer / FormRenderer │
│ Features from nvc_config → showSidebar, showTOC, etc. │
└─────────────────────────────────────────────────────────────────┘
Project Data (as of May 11, 2026):
| prj_id | prj_code | prj_slug | Status |
|---|---|---|---|
| 1 | KNOWLEDGE_BASE | knowledge-base | ✅ Active |
| 2 | DEVELOPER_DOCS | developer-docs | ✅ Active |
| 3 | HR_POLICIES | hr-policies | ✅ Active |
3. Navigation Sync Report
3.1 Database Navigation Configuration
Total Items: 22 navigation configurations
Target Type Distribution:
| Target Type | Count | Handler Status |
|---|---|---|
DATAVIEW | 13 | ✅ Fully handled |
SECTION | 4 | ✅ Expand-only (no navigation) |
document_renderer | 3 | ✅ Fully handled |
CATEGORY | 1 | ⚠️ No dedicated handler |
DASHBOARD | 1 | ⚠️ Partial handler |
3.2 Frontend Route Inventory
| Route Pattern | Component | Handles Target Type |
|---|---|---|
/workspace | WorkspacePage | Landing page |
/workspace/dataviewer | DataViewerPage | DATAVIEW |
/workspace/dataviewer/[code] | DataViewerDynamicPage | DATAVIEW (encrypted) |
/workspace/viewer | ViewerPage | FORM, PAGE |
/workspace/viewer/[code] | ViewerDynamicPage | FORM (encrypted) |
/workspace/documents/[slug] | DocumentsBySlugPage | document_renderer |
/workspace/docs | DocsLandingPage | Project listing |
/workspace/docs/[...slug] | DocsPage | Public document reader |
/workspace/dashboard/[key] | DashboardPage | DASHBOARD |
/workspace/studio/forms | DesignerStudioPage | Page designer |
/workspace/studio/workflow-designer | WorkflowStudioPage | Workflow designer |
/workspace/studio/scrumboard-designer | ScrumboardStudioPage | SCRUMBOARD |
/workspace/studio/document-studio | DocumentStudioPage | Document designer |
/workspace/app-assistant | AppAssistantPage | AI assistant |
3.3 Sync Analysis
✅ Fully Synced (Config → Frontend Handler Exists)
| nvc_code | nvc_target_type | nvc_target_code | Frontend Handler |
|---|---|---|---|
nvc_users | DATAVIEW | dvc_users | UnifiedDataViewer |
nvc_roles | DATAVIEW | dvc_roles | UnifiedDataViewer |
nvc_tenants | DATAVIEW | dvc_tenants | UnifiedDataViewer |
nvc_connections | DATAVIEW | dvc_connections | UnifiedDataViewer |
nvc_applications | DATAVIEW | dvc_applications | UnifiedDataViewer |
nvc_object_registries | DATAVIEW | dvc_object_registries | UnifiedDataViewer |
nvc_page_configs | DATAVIEW | dvc_page_configs | UnifiedDataViewer |
nvc_dataview_configs | DATAVIEW | dvc_dataview_configs | UnifiedDataViewer |
nvc_navigation_configs | DATAVIEW | dvc_navigation_configs | UnifiedDataViewer |
nvc_workflow_configs | DATAVIEW | dvc_workflow_configs | UnifiedDataViewer |
nvc_scrumboard_configs | DATAVIEW | dvc_scrumboard_configs | UnifiedDataViewer |
nvc_value_set | DATAVIEW | dvc_value_set | UnifiedDataViewer |
nvc_document_studio | DATAVIEW | dvc_projects | UnifiedDataViewer + Studio action |
nvc_doc_knowledge_base | document_renderer | KNOWLEDGE_BASE | DocumentRenderer |
nvc_doc_developer_docs | document_renderer | DEVELOPER_DOCS | DocumentRenderer |
nvc_doc_hr_policies | document_renderer | HR_POLICIES | DocumentRenderer |
nvc_app_settings | SECTION | NULL | Expand-only (sidebar) |
nvc_configurations | SECTION | NULL | Expand-only (sidebar) |
nvc_setup | SECTION | NULL | Expand-only (sidebar) |
nvc_user_role_mgmt | SECTION | NULL | Expand-only (sidebar) |
⚠️ Zombie Menu Items (Config Exists → No Frontend Handler)
| nvc_code | nvc_target_type | nvc_target_code | Issue |
|---|---|---|---|
nvc_documents | CATEGORY | NULL | CATEGORY not in TargetType enum |
nvc_admin_dashboard | DASHBOARD | dsh_admin | Handler exists but dsh_admin config may be missing |
Zombie Analysis:
-
nvc_documents(CATEGORY): TheCATEGORYtarget type is not defined innavigation-handler.tsTargetType enum. This item appears to be a parent container for document_renderer items but has no click handler. -
nvc_admin_dashboard(DASHBOARD): TheDASHBOARDroute exists at/workspace/dashboard/[key], butdsh_admindoes not exist inapp_dashboard_configs(table has 0 rows). This is a confirmed zombie item.
⚠️ Hardcoded Routes (Frontend Exists → No Navigation Config)
| Route | Component | Missing Config |
|---|---|---|
/workspace/app-assistant | AppAssistantPage | No nvc_* entry for AI Assistant |
/workspace/studio/forms | DesignerStudioPage | Accessed via row action, not menu |
/workspace/studio/workflow-designer | WorkflowStudioPage | Accessed via row action, not menu |
Note: Studio routes are intentionally accessed via DataViewer row actions rather than direct menu navigation. This is by design.
3.4 DataView Target Code Verification
All DATAVIEW navigation items reference valid dvc_* codes:
| Navigation Target | DataView Config | Status |
|---|---|---|
| dvc_users | ✅ Exists | Active |
| dvc_roles | ✅ Exists | Active |
| dvc_tenants | ✅ Exists | Active |
| dvc_connections | ✅ Exists | Active |
| dvc_applications | ✅ Exists | Active |
| dvc_object_registries | ✅ Exists | Active |
| dvc_page_configs | ✅ Exists | Active |
| dvc_dataview_configs | ✅ Exists | Active |
| dvc_navigation_configs | ✅ Exists | Active |
| dvc_workflow_configs | ✅ Exists | Active |
| dvc_scrumboard_configs | ✅ Exists | Active |
| dvc_value_set | ✅ Exists | Active |
| dvc_projects | ✅ Exists | Active |
4. Studio-Renderer Parity Map
4.1 Document Studio → Document Renderer
| Studio Feature | Config Location | Renderer Component | Parity |
|---|---|---|---|
| Navigation Tree | prj_doc_config.navigation.tree[] | DocSidebar | ✅ Full |
| Node Selection | Studio state | DocSidebar active state | ✅ Full |
| Folder Expansion | expandedNodeIds | DocSidebar expand state | ✅ Full |
| Content Editing | DocumentPropertiesPanel | MarkdownRenderer (read-only) | ✅ Expected |
| File Upload | useDocumentStudioDraft.uploadFiles() | apt_files → Blob Storage | ✅ Full |
| Drag-Drop Reorder | DroppableNavigationTree | N/A (read-only) | ✅ Expected |
| Project Properties | ProjectManagementPanel | Header display | ✅ Full |
| Access Control | AccessControlDialog | Permission enforcement | ✅ Full |
Content Type Support
| Studio Input | Node Property | Renderer Output |
|---|---|---|
| Markdown file | fileType: 'markdown' | MarkdownRenderer.tsx |
| HTML file | fileType: 'html' | Raw HTML render |
| PDF file | fileType: 'pdf' | PdfViewer.tsx |
| Image file | fileType: 'image' | <img> tag |
| Page Config | pageId / pageCode | FormRenderer.tsx |
Feature Flags (nvc_config.features)
| Feature Flag | Studio Config | Renderer Implementation |
|---|---|---|
showSidebar | ✅ Configurable | ✅ DocSidebar conditional |
showTOC | ✅ Configurable | ✅ SectionSidebar (right) |
showBreadcrumbs | ✅ Configurable | ✅ RendererLayout header |
allowDownload | ✅ Configurable | ✅ Download menu |
allowShare | ✅ Configurable | ✅ Share button |
allowPrint | ✅ Configurable | ✅ Print handler |
showVersionInfo | ✅ Configurable | ✅ Footer metadata |
enableSearch | ✅ Configurable | ⚠️ Partial (planned) |
showReadingTime | ✅ Configurable | ✅ Footer display |
showWordCount | ✅ Configurable | ✅ Footer display |
4.2 Page Designer → Form Renderer
| Studio Feature | Config Location | Renderer Component | Parity |
|---|---|---|---|
| Field Palette | FieldPalette.tsx | FormRenderer.tsx | ✅ Full |
| Canvas Layout | PageCanvas.tsx | FormRenderer grid | ✅ Full |
| Field Properties | FieldEditor.tsx | Field props | ✅ Full |
| Validation Rules | pgc_page_schema.validation_rules | useFormRendererFrameworks | ✅ Full |
| Calculated Fields | pgc_page_schema.calculated | useCalculatedFields | ✅ Full |
| Cascade Selects | pgc_page_schema.dependsOn | useCascadeSelects | ✅ Full |
| Data Sources | DataSourceManager | FormRenderer fetch | ✅ Full |
| Actions | ActionsManager | Submit handlers | ✅ Full |
| Preview Mode | PageViewer (in studio) | FormRenderer | ✅ Full |
4.3 Workflow Designer → Workflow Engine
| Studio Feature | Config Location | Runtime Component | Parity |
|---|---|---|---|
| Node Canvas | ReactFlow canvas | workflow.service.js | ✅ Full |
| Node Properties | wfc_config.nodes[] | Node execution | ✅ Full |
| Edge Connections | wfc_config.edges[] | Flow routing | ✅ Full |
| Triggers | wfc_config.triggers | workflow_schedulers | ✅ Full |
| Variables | wfc_config.variables | Context injection | ✅ Full |
4.4 Parity Gaps Identified
| Gap | Studio | Renderer | Priority |
|---|---|---|---|
| Search functionality | Not configurable | Planned | Medium |
| Font size control | Not in Studio | Available in Renderer | Low |
| Zoom control | Not in Studio | Available in Renderer | Low |
| Edit mode toggle | Not in Studio | Available (allowEdit flag) | Low |
5. Recommendations
5.1 Immediate Actions
-
Add CATEGORY to TargetType enum
- File:
src/lib/navigation-handler.ts - Add:
CATEGORY = "category"to enum - Behavior: Treat as SECTION (expand children, no navigation)
- File:
-
Verify Dashboard Config
- Query:
SELECT * FROM app_dashboard_configs WHERE dsc_code = 'dsh_admin' - If missing: Create dashboard configuration for admin dashboard
- Query:
-
Add AI Assistant Navigation Config
- Optional: Create
nvc_app_assistantnavigation entry - Target type:
PAGEor newAI_ASSISTANTtype
- Optional: Create
5.2 Architecture Improvements
-
Implement Search in DocumentRenderer
- Add search index for document content
- Connect to
enableSearchfeature flag
-
Standardize Target Type Casing
- Current: Mix of
DATAVIEW,document_renderer,SECTION - Recommendation: Uppercase all (
DOCUMENT_RENDERER)
- Current: Mix of
-
Add Navigation Config Validation
- Validate
nvc_target_codereferences exist in target tables - Add foreign key or trigger validation
- Validate
5.3 Monitoring Recommendations
-- Find orphaned navigation configs (target code doesn't exist)
SELECT n.nvc_code, n.nvc_target_type, n.nvc_target_code
FROM app_navigation_configs n
LEFT JOIN app_dataview_configs d ON n.nvc_target_code = d.dvc_code
LEFT JOIN apt_projects p ON n.nvc_target_code = p.prj_code
WHERE n.nvc_target_type IN ('DATAVIEW', 'document_renderer')
AND n.nvc_is_deleted = 0
AND d.dvc_code IS NULL
AND p.prj_code IS NULL;
Appendix A: File References
| Document Section | Key Files |
|---|---|
| Entity Routes | axiom-genesis-middleware/routes/v1/entity.routes.js |
| Entity Resolution | axiom-genesis-middleware/helpers/redis-entity.helper.js |
| Profile Loading | axiom-genesis-middleware/utils/profile-loader.util.js |
| Navigation Handler | axiom-genesis-frontend/src/lib/navigation-handler.ts |
| Navigation Hook | axiom-genesis-frontend/src/hooks/useNavigationHandler.ts |
| Document Renderer | axiom-genesis-frontend/src/components/workspace/viewer/document-viewer/DocumentRenderer.tsx |
| Document Studio | axiom-genesis-frontend/src/components/workspace/studio/document-studio/DocumentStudio.tsx |
| Page Designer | axiom-genesis-frontend/src/components/workspace/studio/page-designer/PageDesigner.tsx |
Appendix B: Database Queries Used
-- Navigation configs
SELECT nvc_code, nvc_description, nvc_target_type, nvc_target_code, nvc_parent_code, nvc_status
FROM app_navigation_configs
WHERE ISNULL(nvc_is_deleted, 0) = 0;
-- Target type distribution
SELECT DISTINCT nvc_target_type, COUNT(*) as count
FROM app_navigation_configs
WHERE ISNULL(nvc_is_deleted, 0) = 0
GROUP BY nvc_target_type;
-- Object registries
SELECT obj_code, obj_description, obj_type_code, obj_connection_code
FROM app_object_registries
WHERE ISNULL(obj_is_deleted, 0) = 0;
-- DataView configs
SELECT dvc_code, dvc_description
FROM app_dataview_configs
WHERE ISNULL(dvc_is_deleted, 0) = 0;
-- Projects
SELECT prj_id, prj_code, prj_name, prj_slug
FROM apt_projects
WHERE ISNULL(prj_is_deleted, 0) = 0;
Document End | Generated: May 11, 2026