my-html-app / index.html
Rakesh
Update index.html
8da4b29 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Enterprise System Architecture</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background-color: #f5f7fa;
color: #333;
}
header {
background-color: #4a6ee0;
color: white;
padding: 1rem;
text-align: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.container {
width: 95%;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.diagram-container {
position: relative;
width: 100%;
height: 650px;
margin: 20px 0;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
background-size: 20px 20px;
overflow: hidden;
}
.box {
position: absolute;
border: 2px solid #333;
border-radius: 5px;
padding: 5px;
text-align: center;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
}
.box:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
z-index: 100;
}
.box-title {
font-weight: bold;
margin-bottom: 5px;
}
.subcomponent {
background-color: rgba(255,255,255,0.6);
border: 1px solid #666;
border-radius: 3px;
margin: 2px;
padding: 3px;
font-size: 11px;
cursor: pointer;
transition: background-color 0.2s;
}
.subcomponent:hover {
background-color: rgba(255,255,255,0.9);
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.connection {
position: absolute;
background-color: #333;
}
.arrow {
position: absolute;
width: 0;
height: 0;
border-style: solid;
}
.arrow-right {
border-width: 4px 0 4px 8px;
border-color: transparent transparent transparent #333;
}
.arrow-left {
border-width: 4px 8px 4px 0;
border-color: transparent #333 transparent transparent;
}
.arrow-down {
border-width: 8px 4px 0 4px;
border-color: #333 transparent transparent transparent;
}
.arrow-up {
border-width: 0 4px 8px 4px;
border-color: transparent transparent #333 transparent;
}
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.7);
overflow-y: auto;
}
.modal-content {
background-color: #fefefe;
margin: 50px auto;
padding: 20px;
border-radius: 8px;
width: 80%;
max-width: 900px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
position: relative;
}
.close {
position: absolute;
top: 10px;
right: 20px;
color: #888;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close:hover {
color: #000;
}
.tab {
overflow: hidden;
border-bottom: 1px solid #ccc;
margin-bottom: 20px;
}
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 10px 16px;
transition: 0.3s;
font-size: 16px;
border-bottom: 3px solid transparent;
}
.tab button:hover {
background-color: #f1f1f1;
}
.tab button.active {
border-bottom: 3px solid #4a6ee0;
color: #4a6ee0;
font-weight: 600;
}
.tabcontent {
display: none;
padding: 20px 0;
animation: fadeEffect 0.5s;
}
@keyframes fadeEffect {
from {opacity: 0;}
to {opacity: 1;}
}
.tech-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 20px;
}
.tech-card {
border: 1px solid #ddd;
border-radius: 5px;
padding: 10px;
transition: all 0.3s;
}
.tech-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.tech-title {
font-weight: bold;
color: #4a6ee0;
margin-bottom: 5px;
}
.example-box {
background-color: #f9f9f9;
border-left: 4px solid #4a6ee0;
padding: 15px;
margin-bottom: 20px;
}
.example-title {
font-weight: bold;
margin-bottom: 10px;
}
.button {
background-color: #4a6ee0;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.3s;
}
.button:hover {
background-color: #3a56a8;
}
/* Colors for boxes */
.client-layer { background-color: #f0f0f0; }
.api-layer { background-color: #e2e3e5; }
.orchestration-layer { background-color: #d9d2e9; }
.service-layer { background-color: #d9ead3; }
.integration-layer { background-color: #f9cb9c; }
.data-layer { background-color: #cfe2f3; }
.ai-layer { background-color: #d5a6bd; }
.devops-layer { background-color: #ffe599; }
/* Badges for tech cards */
.badge {
display: inline-block;
padding: 2px 6px;
border-radius: 3px;
font-size: 11px;
font-weight: 600;
margin-right: 5px;
margin-top: 5px;
}
.badge-open-source { background-color: #c6efce; color: #006100; }
.badge-enterprise { background-color: #ffc7ce; color: #9c0006; }
.badge-cloud { background-color: #bdd7ee; color: #1f497d; }
.badge-self-hosted { background-color: #fff2cc; color: #856404; }
.guardrails-overlay {
background-color: transparent;
border: 2px dotted #333;
border-radius: 8px;
z-index: 50;
pointer-events: none;
}
/* Position the label on the right side of the box */
.border-legend {
position: absolute;
right: 30px; /* Position on the right side */
top: -10px; /* Position to overlap the top border */
font-weight: bold;
font-size: 14px;
color: #333;
background-color: white; /* Solid background to "break" the border */
padding: 0 8px;
pointer-events: none;
}
</style>
</head>
<body>
<header>
<h1>Svaas AI Agent Approach</h1>
</header>
<div class="container">
<!-- <button id="homeBtn" class="button">Home</button> -->
<div class="diagram-container" id="diagram">
<textarea id="architecture-editor" style="width:100%; height:100%; padding:20px; font-family:monospace; border:none; background:transparent;">
</textarea>
</div>
</div>
<!-- Will generate modals for each component via JavaScript -->
<script>
// Component definitions with detailed subcomponents
const components = [
{
id: 'frontend',
type: 'client-layer',
title: 'Frontend Layer',
x: 150,
y: 50,
width: 500,
height: 120,
subcomponents: [
{ id: 'webapp', name: 'Web App (PWA)',
description: 'Progressive web applications that provide responsive interfaces with offline capabilities',
technologies: [
{ name: 'React.js', description: 'JavaScript library for building user interfaces' },
{ name: 'Retool', description: 'No Code solution for interal ops team' },
{ name: 'Powerapps', description: 'No code web UI for internal teams' },
{ name: 'Gradio', description: 'Python library for quickly creating web interfaces', badge: 'open-source' },
{ name: 'Streamlit', description: 'Python framework for data apps', badge: 'open-source' }
],
examples: [
{ title: 'Healthcare Dashboard', description: 'A PWA built with React/Next.js that provides doctors with patient monitoring capabilities, accessible from any device.' },
{ name: 'Data Visualization Portal', description: 'A Streamlit-based application for visualizing patient data and treatment outcomes.' }
]
},
{ id: 'mobile', name: 'Mobile Apps',
description: 'Native and cross-platform mobile applications for iOS and Android devices',
technologies: [
,
{ name: 'Flutter', description: 'Google\'s UI toolkit for cross-platform apps', badge: 'open-source' },
{ name: 'Swift/SwiftUI', description: 'Apple\'s language and framework for iOS' },
],
examples: [
{ title: 'Patient Companion App', description: 'A React Native application that helps patients track medications, appointments, and communicate with providers.' },
{ title: 'Provider Mobile Suite', description: 'A Flutter-based app for healthcare providers to access patient records on the go.' }
]
},
{ id: 'messaging', name: 'Bot Interface',
description: 'Unified communication platform that integrates with various messaging services',
technologies: [
{ name: 'Yellow.ai', description: 'Conversational AI platform for WhatsApp integration', badge: 'enterprise' },
{ name: 'SCE Engine', description: 'Mssg API ', badge: 'cloud' }
],
examples: [
{ title: 'Multi-channel Patient Support', description: 'A Yellow.ai implementation that allows patients to communicate via WhatsApp, SMS, or web chat using a single backend.' },
{ title: 'Appointment Bot', description: 'A conversational assistant for booking and managing appointments via messaging platforms.' }
]
},
{ id: 'voice', name: 'Voice Assistant',
description: 'Voice-based interface for hands-free interaction with the system',
technologies: [
{ name: 'Amazon Alexa', description: 'Voice assistant platform', badge: 'cloud' },
{ name: 'Google Assistant', description: 'AI-powered virtual assistant', badge: 'cloud' },
{ name: 'Rasa', description: 'Open source conversational AI', badge: 'open-source' },
{ name: 'Mozilla DeepSpeech', description: 'Open source speech-to-text engine', badge: 'open-source' }
],
examples: [
{ title: 'Hands-free Clinical Assistant', description: 'Voice assistant that allows doctors to query patient information during procedures.' },
{ title: 'Home Care Voice Interface', description: 'Alexa skill that helps patients with medication reminders and basic health questions.' }
]
}
]
},
{
id: 'api',
type: 'api-layer',
title: 'API Gateway Layer',
x: 150,
y: 180,
width: 500,
height: 70,
subcomponents: [
{ id: 'authentication', name: 'Authentication',
description: 'Identity verification and access control services',
technologies: [
{ name: 'OAuth 2.0 / OpenID Connect', description: 'Industry standard authorization frameworks' },
{ name: 'Auth0', description: 'Identity platform as a service', badge: 'cloud' },
{ name: 'Okta', description: 'Identity and access management', badge: 'cloud' },
{ name: 'KeyCloak', description: 'Open source identity and access management', badge: 'open-source' }
],
examples: [
{ title: 'Single Sign-On Implementation', description: 'A centralized authentication system that works across all applications in the ecosystem.' },
{ title: 'Role-Based Access Control', description: 'Fine-grained permission system based on user roles and attributes.' }
]
},
{ id: 'rate-limiting', name: 'Rate Limiting',
description: 'Controls the rate of requests to protect backend services',
technologies: [
{ name: 'Kong Gateway', description: 'API gateway with rate limiting', badge: 'open-source' },
{ name: 'AWS API Gateway', description: 'Managed API gateway service', badge: 'cloud' },
{ name: 'NGINX', description: 'Web server with rate limiting capabilities', badge: 'open-source' },
{ name: 'Azure API Management', description: 'API management platform', badge: 'cloud' }
],
examples: [
{ title: 'Tiered API Access', description: 'Different rate limits for different client tiers to ensure fair usage.' },
{ title: 'DDoS Protection', description: 'Rate limiting combined with anomaly detection to prevent abuse.' }
]
},
{ id: 'logging', name: 'Logging ',
description: 'Tracking and analysis of API requests and system performance',
technologies: [
{ name: 'ELK Stack', description: 'Elasticsearch, Logstash, Kibana', badge: 'open-source' },
{ name: 'Datadog', description: 'Monitoring and analytics platform', badge: 'enterprise' },
{ name: 'New Relic', description: 'Application performance monitoring', badge: 'enterprise' },
{ name: 'Prometheus & Grafana', description: 'Monitoring and alerting', badge: 'open-source' }
],
examples: [
{ title: 'Real-time API Dashboard', description: 'A Grafana dashboard showing API performance, errors, and usage patterns.' },
{ title: 'Audit Trail System', description: 'Comprehensive logging of all data access for compliance requirements.' }
]
},
{ id: 'Monitoring', name: 'Monitoring',
description: 'Tracking and analysis of API requests and system performance',
technologies: [
{ name: 'langsmith', description: 'Focuses on building and deploying LLM applications, offering features for tracing, debugging, and evaluating model', badge: 'open-source' },
{ name: 'Arize AI Phoenix', description: 'A platform designed to monitor and explain machine learning models, including LLMs, offering features for tracking performance over time, detecting anomalies, and understanding the factors that contribute to model predictions. ', badge: 'enterprise' },
{ name: 'AzureAI', description: 'Enable users to track metrics, analyze model performance, and identify areas for improvement. ', badge: 'enterprise' },
{ name: 'VertexAi', description: 'Enable users to track metrics, analyze model performance, and identify areas for improvement. ', badge: 'enterprise' }
],
examples: [
{ title: 'Real-time API Dashboard', description: 'A Grafana dashboard showing API performance, errors, and usage patterns.' },
{ title: 'Audit Trail System', description: 'Comprehensive logging of all data access for compliance requirements.' }
]
}
]
},
{
id: 'orchestration',
type: 'orchestration-layer',
title: 'Orchestration Agents',
x: 150,
y: 270,
width: 500,
height: 80,
subcomponents: [
{ id: 'service-orchestrator', name: 'Service Orchestrator (Mini LLM Agent)',
description: 'LLM-powered coordinator that intelligently routes requests and manages workflows across services',
technologies: [
{ name: 'Apache Airflow', description: 'Workflow orchestration platform', badge: 'open-source' },
{ name: 'Temporal', description: 'Microservice orchestration platform', badge: 'open-source' },
{ name: 'AWS Step Functions', description: 'Serverless workflow service', badge: 'cloud' },
{ name: 'LangChain Agents', description: 'Framework for LLM-powered agents', badge: 'open-source' }
],
examples: [
{ title: 'Intelligent Healthcare Workflow', description: 'A mini LLM agent that analyzes incoming patient requests and dynamically creates optimized workflows across multiple services.' },
{ title: 'Adaptive Treatment Protocol', description: 'Orchestration agent that coordinates complex treatment processes across departments with real-time adjustments based on patient responses.' }
]
},
]
},
{
id: 'service',
type: 'service-layer',
title: 'Service Agents ',
x: 150,
y: 380,
width: 500,
height: 100,
subcomponents: [
{ id: 'diet-service', name: 'Diet Service (LLM Agent)',
description: 'AI-powered agent that generates and validates personalized nutrition plans for different health consditions using LLMs',
technologies: [
{ name: 'GPT-4o', description: 'Advanced language model for nutrition planning', badge: 'cloud' },
{ name: 'Nutrition Knowledge Graph', description: 'Structured nutrition data', badge: 'proprietary' },
{ name: 'LangChain', description: 'Framework for LLM applications', badge: 'open-source' },
{ name: 'Cuisine Database', description: 'Bon appetite Database', badge: 'enterprise' }
],
examples: [
{ title: 'AI Nutritionist', description: 'LLM agent that creates, validates, and adjusts meal plans based on real-time patient feedback and health metrics, ensuring clinical nutrition guidelines are met.' },
{ title: 'Dietary Compliance Coach', description: 'AI agent that analyzes food logs, provides personalized guidance, and adapts plans based on patient adherence patterns and medical needs.' }
]
},
{ id: 'support-service', name: 'Support Service (LLM Agent)',
description: 'MyFlexa is a specialized mobile application designed to help individuals dealing with chronic pain. The app offers personalized exercise plans tailored to each user\'s unique needs, making it an effective tool for managing and alleviating pain. MyFlexa\'s key features include:\n\n1. Personalized Exercise Plans: Based on your specific condition and current pain levels, MyFlexa creates customized exercise programs to help strengthen your back muscles and improve overall mobility.\n\n2. AI Virtual Trainer: MyFlexa\'s advanced AI technology provides real-time support and guidance as you complete your exercise routine. The virtual trainer ensures proper form and technique, maximizing the benefits of each exercise.\n\n3. Progress Tracking: Monitor your progress with ease using MyFlexa\'s built-in tracking features. By keeping track of your improvements, you\'ll be able to see the positive effects of your exercise routine and stay motivated.\n\n4. Mobility Assessments: Regular mobility assessments help you understand the impact of your exercises and provide valuable insights into your overall condition. This information can be shared with your healthcare provider for a more comprehensive treatment plan.\n\n5. Expert Physiotherapist Support (when applicable): MyFlexa offers access to expert physiotherapist support for more complex cases. This added level of professional guidance ensures you receive the best possible care and advice for your chronic lower back pain.',
technologies: [
{ name: 'Llama, Mistral', description: 'LLM models for rag and conversation', badge: 'AI model' },
{ name: 'Knowledge Base Integration', description: 'Connected enterprise documentation', badge: 'proprietary' },
{ name: 'CRM, ITMS', description: 'Customer service platform', badge: 'enterprise' },
{ name: 'Sentence Transformers', description: 'Text embedding models', badge: 'open-source' }
],
examples: [
{ title: 'Autonomous Support Agent', description: 'LLM-powered system that handles 85% of support tickets without human intervention, understanding complex medical queries and providing accurate information with citations.' },
{ title: 'Proactive Issue Resolution', description: 'AI agent that identifies potential support issues from patient behavior patterns and reaches out with preventative guidance before problems occur.' }
]
},
{ id: 'analytics-service', name: 'Analytics Service (LLM Agent)',
description: 'AI-driven analytics agent that discovers insights and generates reports with natural language explanations',
technologies: [
{ name: 'Mistral Large', description: 'Open-weight large language model', badge: 'cloud' },
{ name: 'Python Data Stack', description: 'Pandas, NumPy, SciPy', badge: 'open-source' },
{ name: 'Apache Spark', description: 'Distributed computing system', badge: 'open-source' },
{ name: 'Visualization Generation AI', description: 'Auto-generated visuals', badge: 'proprietary' }
],
examples: [
{ title: 'AI Insights Narrator', description: 'LLM agent that automatically analyzes population health data, identifies significant patterns, and generates executive reports with natural language explanations that non-technical stakeholders can understand.' },
{ title: 'Treatment Efficacy Analyzer', description: 'AI agent that continuously evaluates treatment outcomes across protocols, patient demographics, and comorbidities, surfacing unexpected correlations and providing evidence-based recommendations.' }
]
},
{ id: 'medical-research', name: 'Medical Research Agent (LLM)',
description: 'Advanced AI agent for pharmaceutical and medical research analysis',
technologies: [
{ name: 'Claude Opus', description: 'Advanced reasoning model', badge: 'cloud' },
{ name: 'LlamaIndex', description: 'Framework for LLM data augmentation', badge: 'open-source' },
{ name: 'PubMed API', description: 'Medical literature access', badge: 'open-source' },
{ name: 'BioBERT', description: 'Biomedical language model', badge: 'open-source' }
],
examples: [
{ title: 'Pharmaceutical Research Assistant', description: 'LLM agent that autonomously researches drug compounds by analyzing thousands of papers, extracting molecular interactions, adverse effects, and clinical outcomes, synthesizing findings into actionable reports with full citations.' },
{ title: 'Evidence Synthesis Engine', description: 'AI agent that continuously monitors new clinical research, compares methodologies across studies, identifies conflicts in findings, and generates comprehensive meta-analyses that highlight confidence levels for different conclusions.' }
]
},
{ id: 'marketing-service', name: 'Marketing Service (LLM Agent)',
description: 'AI-powered agent that creates, optimizes, and manages personalized marketing campaigns',
technologies: [
{ name: 'GPT-4', description: 'Advanced language model for content', badge: 'cloud' },
{ name: 'Cohort Analysis AI', description: 'Patient segmentation model', badge: 'proprietary' },
{ name: 'Salesforce Marketing Cloud', description: 'Digital marketing platform', badge: 'enterprise' },
{ name: 'Multi-channel Optimization Model', description: 'Channel selection AI', badge: 'proprietary' }
],
examples: [
{ title: 'Autonomous Campaign Manager', description: 'LLM agent that designs, implements, and optimizes marketing campaigns across channels, dynamically adjusting messaging based on real-time engagement metrics and healthcare regulations.' },
{ title: 'Personalized Health Journey', description: 'AI agent that develops individualized content strategies for patients based on their health status, history, and preferences, creating a cohesive narrative across touchpoints.' }
]
},
{ id: 'compliance', name: 'Compliance Agent (LLM)',
description: 'LLM-powered agent that enforces regulatory compliance through continuous monitoring',
technologies: [
{ name: 'Claude 3', description: 'Advanced reasoning LLM', badge: 'cloud' },
{ name: 'Regulatory Knowledge Graph', description: 'Structured compliance data', badge: 'proprietary' },
{ name: 'Static Code Analysis', description: 'Automated code scanning', badge: 'open-source' },
{ name: 'Document Understanding AI', description: 'Regulatory document analysis', badge: 'proprietary' }
],
examples: [
{ title: 'Autonomous Compliance Validator', description: 'LLM agent that ingests regulatory documentation, continuously scans code repositories and data access patterns for violations, and generates comprehensive audit reports with remediation recommendations.' },
{ title: 'Proactive Regulatory Monitor', description: 'AI system that analyzes new healthcare regulations, identifies areas of potential non-compliance in the system architecture, and suggests implementation changes before violations occur.' }
]
}
]
},
{
id: 'guardrails-overlay',
type: 'guardrails-overlay',
title: '',
x: 160,
y: 390,
width: 470,
height: 80,
relatedTo: 'service'
},
{
id: 'integration',
type: 'integration-layer',
title: 'Integration Layer(Tools)',
x: 150,
y: 500,
width: 500,
height: 100,
subcomponents: [
{ id: 'crm-erp', name: 'CRM/ERP',
description: 'Integration with customer relationship and enterprise resource planning systems',
technologies: [
{ name: 'Salesforce API', description: 'CRM integration platform', badge: 'enterprise' },
{ name: 'SAP Connector', description: 'ERP integration', badge: 'enterprise' },
{ name: 'Microsoft Dynamics', description: 'Business applications', badge: 'enterprise' },
{ name: 'MuleSoft', description: 'Integration platform', badge: 'enterprise' }
],
examples: [
{ title: 'Healthcare CRM Integration', description: 'Bidirectional sync between clinical systems and Salesforce Health Cloud for unified patient view.' },
{ title: 'Supply Chain Management', description: 'Integration with ERP systems for medical supply ordering and inventory management.' }
]
},
{ id: 'web-search', name: 'Web Search',
description: 'Integration with search engines and search functionality',
technologies: [
{ name: 'Elasticsearch', description: 'Search and analytics engine', badge: 'open-source' },
{ name: 'Algolia', description: 'Search-as-a-service', badge: 'cloud' },
{ name: 'Solr', description: 'Search platform', badge: 'open-source' },
{ name: 'Google Custom Search', description: 'Programmable search engine', badge: 'cloud' }
],
examples: [
{ title: 'Medical Knowledge Search', description: 'A specialized search engine that indexes medical literature, protocols, and guidelines for provider reference.' },
{ title: 'Patient-Friendly Search', description: 'Search functionality that presents complex medical information in accessible language.' }
]
},
{ id: 'pdf-service', name: 'PDF Service',
description: 'Generation and processing of PDF documents',
technologies: [
{ name: 'PDFKit', description: 'PDF generation library', badge: 'open-source' },
{ name: 'PDFTron', description: 'PDF SDK', badge: 'enterprise' },
{ name: 'Apache PDFBox', description: 'PDF manipulation library', badge: 'open-source' },
{ name: 'wkhtmltopdf', description: 'HTML to PDF converter', badge: 'open-source' }
],
examples: [
{ title: 'Clinical Documentation Generator', description: 'Service that transforms structured data into standardized clinical documents and reports.' },
{ title: 'Secure Patient Records', description: 'System for generating encrypted PDF records with authentication requirements.' }
]
},
{ id: 'translation', name: 'Translation Services',
description: 'Multi-language support and translation capabilities',
technologies: [
{ name: 'DeepL API', description: 'Neural machine translation', badge: 'cloud' },
{ name: 'Google Cloud Translation', description: 'Machine translation service', badge: 'cloud' },
{ name: 'Microsoft Translator', description: 'Text translation API', badge: 'cloud' },
{ name: 'LibreTranslate', description: 'Open source machine translation', badge: 'open-source' }
],
examples: [
{ title: 'Real-time Patient Communication', description: 'Translation service that enables providers to communicate with patients in their preferred language.' },
{ title: 'Multilingual Documentation', description: 'System that automatically translates educational materials and instructions.' }
]
},
{ id: 'visualization', name: 'Visualization',
description: 'Data visualization and reporting tools',
technologies: [
{ name: 'Power BI', description: 'Business analytics platform', badge: 'enterprise' },
{ name: 'Tableau', description: 'Visual analytics platform', badge: 'enterprise' },
{ name: 'D3.js', description: 'JavaScript visualization library', badge: 'open-source' },
{ name: 'Plotly', description: 'Interactive visualization library', badge: 'open-source' }
],
examples: [
{ title: 'Clinical Dashboard', description: 'Interactive visualizations of patient data and clinical metrics for healthcare providers.' },
{ title: 'Population Health Maps', description: 'Geographic visualization of health trends and resource allocation.' }
]
},
{ id: 'config-management', name: 'Configuration Management',
description: 'Tools for system configuration and management',
technologies: [
{ name: 'Ansible', description: 'Automation platform', badge: 'open-source' },
{ name: 'Chef', description: 'Configuration management tool', badge: 'open-source' },
{ name: 'Puppet', description: 'IT automation software', badge: 'enterprise' },
{ name: 'Salt', description: 'Infrastructure automation', badge: 'open-source' }
],
examples: [
{ title: 'Compliance-as-Code', description: 'Automated system configuration that ensures all components meet security and regulatory standards.' },
{ title: 'Environment Parity', description: 'Configuration management ensuring consistency across development, testing, and production environments.' }
]
},
{ id: 'IMage processing', name: 'IMage processing',
description: 'Tools for image processing and real time video processing',
technologies: [
{ name: 'OCR', description: 'Automation platform', badge: 'open-source' },
{ name: 'Image processing', description: 'Configuration management tool', badge: 'open-source' },
{ name: 'Magmam', description: 'Lightweight for eral time detections', badge: 'open-source' },
{ name: 'OpenCV', description: 'Image processing framework', badge: 'open-source' }
],
examples: [
{ title: 'Compliance-as-Code', description: 'Automated system configuration that ensures all components meet security and regulatory standards.' },
{ title: 'Environment Parity', description: 'Configuration management ensuring consistency across development, testing, and production environments.' }
]
},
{ id: 'IDM', name: 'identity management and authentication',
description: 'Tools for autheitacation for each agents . each agent will have its own id for acccess management',
technologies: [
{ name: 'Azure Ad', description: 'IAM', badge: 'open-source' },
{ name: 'OKta', description: 'Configuration management tool', badge: 'open-source' },
],
examples: [
{ title: 'Compliance-as-Code', description: 'Automated system configuration that ensures all components meet security and regulatory standards.' },
{ title: 'Environment Parity', description: 'Configuration management ensuring consistency across development, testing, and production environments.' }
]
},
{ id: 'email-sms', name: 'Email/SMS/WhatsApp/Teams',
description: 'Traditional communication channels for notifications and alerts',
technologies: [
{ name: 'SendGrid', description: 'Email delivery service', badge: 'cloud' },
{ name: 'Twilio SMS', description: 'Programmable SMS service', badge: 'cloud' },
{ name: 'Nodemailer', description: 'Email sending from Node.js', badge: 'open-source' },
{ name: 'Amazon SES', description: 'Email sending service', badge: 'cloud' }
],
examples: [
{ title: 'Automated Appointment Reminders', description: 'System that sends SMS and email reminders for upcoming appointments, reducing no-shows.' },
{ title: 'Test Result Notifications', description: 'Secure email delivery of test results with patient authentication.' }
]
}
]
},
{
id: 'data',
type: 'data-layer',
title: 'Data Layer (RAG-Enabled)',
x: 30,
y: 260,
width: 100,
height: 340,
subcomponents: [
{ id: 'vector-db', name: 'Vector DB (RAG Core)',
description: 'Database optimized for storing and querying vector embeddings, forming the foundation of Retrieval-Augmented Generation (RAG) systems',
technologies: [
{ name: 'Pinecone', description: 'Vector database for RAG implementations', badge: 'cloud' },
{ name: 'Weaviate', description: 'Vector search engine with semantic capabilities', badge: 'open-source' },
{ name: 'Qdrant', description: 'Vector similarity engine for RAG pipelines', badge: 'open-source' },
{ name: 'Milvus', description: 'Vector database for embeddings and retrieval', badge: 'open-source' },
{ name: 'ChromaDB', description: 'Embedding database for RAG applications', badge: 'open-source' }
],
examples: [
{ title: 'Medical Knowledge RAG', description: 'Vector database storing embeddings of medical literature for retrieval augmented generation in clinical decision support, enabling LLMs to access accurate, up-to-date medical information.' },
{ title: 'Semantic Patient Search', description: 'RAG-powered system that allows searching for patients with similar conditions based on narrative descriptions rather than exact codes, improving clinical pattern recognition.' }
]
},
{ id: 'sql-db', name: 'SQL DB',
description: 'Relational database for structured data storage, providing factual data to complement RAG systems',
technologies: [
{ name: 'PostgreSQL', description: 'Advanced open-source database', badge: 'open-source' },
{ name: 'MySQL/MariaDB', description: 'Open-source relational database', badge: 'open-source' },
{ name: 'MS SQL Server', description: 'Microsoft\'s relational database', badge: 'enterprise' },
{ name: 'Oracle Database', description: 'Enterprise database system', badge: 'enterprise' }
],
examples: [
{ title: 'Patient Record System', description: 'A normalized database design that efficiently stores and retrieves patient demographic and clinical data, serving as a structured data source for RAG systems.' },
{ title: 'Billing and Claims Database', description: 'SQL database optimized for financial transactions and reporting, providing factual context for RAG-powered analytics.' }
]
},
{ id: 'document-db', name: 'Document DB',
description: 'NoSQL database for storing semi-structured documents that serve as knowledge sources for RAG pipelines',
technologies: [
{ name: 'MongoDB', description: 'Document-oriented database', badge: 'open-source' },
{ name: 'Couchbase', description: 'NoSQL document database', badge: 'enterprise' },
{ name: 'Amazon DocumentDB', description: 'MongoDB-compatible database', badge: 'cloud' },
{ name: 'Firestore', description: 'NoSQL document database', badge: 'cloud' }
],
examples: [
{ title: 'Clinical Notes Repository', description: 'A document database storing unstructured and semi-structured clinical notes with flexible schema, providing rich content for RAG retrieval.' },
{ title: 'Patient Journey Documentation', description: 'System that captures the full timeline of patient interactions across different care settings, enabling context-aware RAG responses.' }
]
},
{ id: 'graph-db', name: 'Knowledge Graph DB',
description: 'Database optimized for storing and querying connected data, enhancing RAG with structured relationships',
technologies: [
{ name: 'Neo4j', description: 'Graph database platform for knowledge representation', badge: 'enterprise' },
{ name: 'Amazon Neptune', description: 'Graph database service for connected data', badge: 'cloud' },
{ name: 'ArangoDB', description: 'Multi-model database with graph capabilities', badge: 'open-source' },
{ name: 'JanusGraph', description: 'Distributed graph database for complex relationships', badge: 'open-source' }
],
examples: [
{ title: 'Healthcare Knowledge Graph for RAG', description: 'A comprehensive knowledge graph connecting diseases, treatments, medications, and contraindications that enhances retrieval quality in RAG systems.' },
{ title: 'Patient Relationship Network', description: 'Graph database mapping relationships between patients, providers, facilities, and social determinants of health for context-aware RAG responses.' }
]
},
{ id: 'time-series', name: 'Time Series DB',
description: 'Database optimized for time-stamped data, providing temporal context for RAG systems',
technologies: [
{ name: 'InfluxDB', description: 'Time series database', badge: 'open-source' },
{ name: 'TimescaleDB', description: 'PostgreSQL for time-series', badge: 'open-source' },
{ name: 'Prometheus', description: 'Monitoring and time series DB', badge: 'open-source' },
{ name: 'Amazon Timestream', description: 'Time series database service', badge: 'cloud' }
],
examples: [
{ title: 'Patient Monitoring Analytics', description: 'Time series database storing continuous patient monitoring data for real-time and historical analysis, enabling RAG systems to incorporate temporal trends.' },
{ title: 'Treatment Effectiveness Tracking', description: 'System that correlates treatment protocols with vital sign trends over time, providing evidence-based data for RAG-powered clinical recommendations.' }
]
},
{ id: 'cache', name: 'Cache Layer',
description: 'In-memory data store for high-performance data access, accelerating RAG retrieval operations',
technologies: [
{ name: 'Redis', description: 'In-memory data structure store', badge: 'open-source' },
{ name: 'Memcached', description: 'Distributed memory caching', badge: 'open-source' },
{ name: 'Elasticsearch Cache', description: 'Search engine with caching', badge: 'open-source' },
{ name: 'Hazelcast', description: 'In-memory data grid', badge: 'open-source' }
],
examples: [
{ title: 'RAG Results Cache', description: 'In-memory caching of frequently accessed retrieval results for sub-millisecond response times in RAG applications.' },
{ title: 'Session Management', description: 'Distributed Redis implementation for managing user sessions and context across RAG-powered services.' }
]
},
{ id: 'rag-orchestration', name: 'RAG Orchestration',
description: 'Specialized components for managing the RAG pipeline from chunking to retrieval to generation',
technologies: [
{ name: 'LangChain', description: 'Framework for RAG workflows', badge: 'open-source' },
{ name: 'LlamaIndex', description: 'Data framework for LLM applications', badge: 'open-source' },
{ name: 'Haystack', description: 'End-to-end RAG framework', badge: 'open-source' },
{ name: 'Semantic Kernel', description: 'Microsoft\'s orchestration framework', badge: 'open-source' }
],
examples: [
{ title: 'Multi-Source Medical RAG', description: 'Orchestration system that retrieves from multiple knowledge sources (research papers, clinical guidelines, formularies) to provide comprehensive medical information.' },
{ title: 'Adaptive Retrieval System', description: 'RAG pipeline that dynamically adjusts retrieval strategies based on query complexity and available knowledge sources.' }
]
}
]
},
{
id: 'ai',
type: 'ai-layer',
title: 'Model',
x: 670,
y: 260,
width: 100,
height: 180,
subcomponents: [
{ id: 'self-hosted-llm', name: 'Self-hosted LLMs',
description: 'On-premises large language models for control and privacy',
technologies: [
{ name: 'Llama 3', description: 'Meta\'s open source LLM', badge: 'open-source' },
{ name: 'Mistral', description: 'Efficient open source LLM', badge: 'open-source' },
{ name: 'Falcon', description: 'Open source LLM', badge: 'open-source' },
{ name: 'MPT', description: 'MosaicML Pretrained Transformer', badge: 'open-source' }
],
examples: [
{ title: 'Clinical Documentation Assistant', description: 'Self-hosted LLM for generating and analyzing clinical notes with protected health information (PHI) never leaving the premises.' },
{ title: 'Medical Literature Analysis', description: 'On-premises model fine-tuned on medical corpora for specialized healthcare applications.' }
]
},
{ id: 'cloud-llm', name: 'Cloud LLMs',
description: 'API-based access to leading commercial language models',
technologies: [
{ name: 'OpenAI API (GPT-4)', description: 'Advanced language model', badge: 'cloud' },
{ name: 'Anthropic Claude', description: 'Conversational AI assistant', badge: 'cloud' },
{ name: 'Google Gemini', description: 'Multimodal AI model', badge: 'cloud' },
{ name: 'Azure OpenAI', description: 'Enterprise OpenAI deployment', badge: 'cloud' }
],
examples: [
{ title: 'Patient Communication Platform', description: 'Claude-powered system that generates personalized health education content.' },
{ title: 'Medical Q&A System', description: 'GPT-4 implementation for answering complex medical questions with citations.' }
]
},
{ id: 'vision-models', name: 'Vision Models',
description: 'AI models for image analysis and interpretation',
technologies: [
{ name: 'CLIP', description: 'Connecting text and images', badge: 'open-source' },
{ name: 'MedicalVisionBERT', description: 'Medical imaging model', badge: 'open-source' },
{ name: 'Segment Anything', description: 'Image segmentation model', badge: 'open-source' },
{ name: 'Google Vision AI', description: 'Cloud vision API', badge: 'cloud' }
],
examples: [
{ title: 'Radiology Assistant', description: 'AI system that analyzes medical images to flag potential abnormalities for radiologist review.' },
{ title: 'Wound Assessment Tool', description: 'Vision model that measures and tracks wound healing progress from smartphone photos.' }
]
},
{ id: 'voice-models', name: 'Voice Models',
description: 'Speech recognition and synthesis technologies',
technologies: [
{ name: 'Whisper', description: 'Speech recognition model', badge: 'open-source' },
{ name: 'Amazon Polly', description: 'Text-to-speech service', badge: 'cloud' },
{ name: 'Tacotron 2', description: 'Neural text-to-speech', badge: 'open-source' },
{ name: 'NVIDIA Riva', description: 'Speech AI SDK', badge: 'enterprise' }
],
examples: [
{ title: 'Medical Dictation System', description: 'Whisper-based transcription service optimized for medical terminology.' },
{ title: 'Accessible Patient Instructions', description: 'Text-to-speech system that converts written instructions to natural-sounding audio for patients with reading difficulties.' }
]
},
{ id: 'domain-models', name: 'Domain-Specific Models',
description: 'AI models specialized for healthcare and related domains',
technologies: [
{ name: 'BioBERT', description: 'Biomedical language model', badge: 'open-source' },
{ name: 'ClinicalBERT', description: 'Clinical notes understanding', badge: 'open-source' },
{ name: 'MedPaLM', description: 'Medical Q&A model', badge: 'enterprise' },
{ name: 'RadBERT', description: 'Radiology report analysis', badge: 'open-source' }
],
examples: [
{ title: 'Automated Coding Assistant', description: 'Domain-specific model that suggests accurate ICD-10 and CPT codes based on clinical documentation.' },
{ title: 'Drug Interaction Predictor', description: 'Healthcare-specific model trained to identify potential adverse interactions in complex medication regimens.' }
]
}
]
},
{
id: 'devops',
type: 'devops-layer',
title: 'Governance',
x: 670,
y: 460,
width: 100,
height: 140,
subcomponents: [
{ id: 'monitoring', name: 'Monitoring',
description: 'System monitoring and observability tools',
technologies: [
{ name: 'Prometheus', description: 'Monitoring system & time series DB', badge: 'open-source' },
{ name: 'Grafana', description: 'Observability platform', badge: 'open-source' },
{ name: 'Datadog', description: 'Monitoring and security platform', badge: 'enterprise' },
{ name: 'New Relic', description: 'Observability platform', badge: 'enterprise' }
],
examples: [
{ title: 'Healthcare System Dashboard', description: 'Comprehensive monitoring of all system components with healthcare-specific KPIs and alerts.' },
{ title: 'Compliance Monitoring', description: 'Real-time tracking of system metrics relevant to regulatory compliance.' }
]
},
{ id: 'cicd', name: 'CI/CD',
description: 'Continuous integration and deployment pipeline',
technologies: [
{ name: 'GitHub Actions', description: 'CI/CD platform', badge: 'cloud' },
{ name: 'Jenkins', description: 'Automation server', badge: 'open-source' },
{ name: 'GitLab CI', description: 'CI/CD platform', badge: 'open-source' },
{ name: 'Azure DevOps', description: 'Development platform', badge: 'cloud' }
],
examples: [
{ title: 'Regulated Software Pipeline', description: 'CI/CD pipeline with built-in validation steps for healthcare software compliance requirements.' },
{ title: 'Infrastructure as Code Deployment', description: 'Automated deployment process for consistent environment provisioning.' }
]
},
{ id: 'ai-devops', name: 'AI DevOps',
description: 'AI-powered automation and optimization for operations',
technologies: [
{ name: 'MLflow', description: 'ML lifecycle platform', badge: 'open-source' },
{ name: 'Kubeflow', description: 'ML toolkit for Kubernetes', badge: 'open-source' },
{ name: 'BentoML', description: 'Model serving framework', badge: 'open-source' },
{ name: 'Seldon Core', description: 'ML deployment on Kubernetes', badge: 'open-source' }
],
examples: [
{ title: 'Predictive Resource Scaling', description: 'AI system that anticipates usage patterns and scales infrastructure ahead of demand.' },
{ title: 'Automated Incident Response', description: 'ML models that detect, classify, and suggest resolutions for system incidents.' }
]
}
]
}
];
// Connection definitions
const connections = [
{ from: 'client', to: 'api', type: 'vertical' },
{ from: 'api', to: 'orchestration', type: 'vertical' },
{ from: 'orchestration', to: 'service', type: 'vertical' },
{ from: 'service', to: 'integration', type: 'vertical' },
{ from: 'data', to: 'orchestration', type: 'horizontal' },
{ from: 'orchestration', to: 'ai', type: 'horizontal' },
{ from: 'ai', to: 'devops', type: 'vertical' }
];
// Create components
const diagram = document.getElementById('diagram');
components.forEach(comp => {
// Create the component box
const box = document.createElement('div');
box.id = comp.id;
box.className = `box ${comp.type}`;
box.style.left = `${comp.x}px`;
box.style.top = `${comp.y}px`;
box.style.width = `${comp.width}px`;
box.style.height = `${comp.height}px`;
// Add title
const title = document.createElement('div');
title.className = 'box-title';
title.textContent = comp.title;
box.appendChild(title);
// Add subcomponents if any
if (comp.subcomponents && comp.subcomponents.length > 0) {
const subContainer = document.createElement('div');
subContainer.style.display = 'flex';
subContainer.style.flexWrap = 'wrap';
subContainer.style.justifyContent = 'center';
comp.subcomponents.forEach(sub => {
const subcomp = document.createElement('div');
subcomp.className = 'subcomponent';
subcomp.textContent = sub.name;
subcomp.setAttribute('data-id', sub.id);
subcomp.addEventListener('click', (e) => {
e.stopPropagation(); // Prevent triggering parent's click
showSubcomponentModal(comp.id, sub.id);
});
subContainer.appendChild(subcomp);
});
box.appendChild(subContainer);
}
// Add click event for the entire component
box.addEventListener('click', () => {
showComponentModal(comp.id);
});
diagram.appendChild(box);
});
components.filter(comp => comp.type === 'guardrails-overlay').forEach(overlay => {
const overlayBox = document.createElement('div');
overlayBox.id = overlay.id;
overlayBox.className = overlay.type;
overlayBox.style.position = 'absolute';
overlayBox.style.left = `${overlay.x}px`;
overlayBox.style.top = `${overlay.y}px`;
overlayBox.style.width = `${overlay.width}px`;
overlayBox.style.height = `${overlay.height}px`;
// Add the border legend
const label = document.createElement('div');
label.className = 'border-legend';
label.textContent = 'guardrails'; // lowercase to match your image
overlayBox.appendChild(label);
diagram.appendChild(overlayBox);
});
// Create connections
connections.forEach(conn => {
const fromBox = document.getElementById(conn.from);
const toBox = document.getElementById(conn.to);
if (!fromBox || !toBox) return;
// Calculate positions based on box dimensions
const fromRect = fromBox.getBoundingClientRect();
const toRect = toBox.getBoundingClientRect();
const diagramRect = diagram.getBoundingClientRect();
const fromX = fromRect.left + fromRect.width / 2 - diagramRect.left;
const fromY = fromRect.top + fromRect.height / 2 - diagramRect.top;
const toX = toRect.left + toRect.width / 2 - diagramRect.left;
const toY = toRect.top + toRect.height / 2 - diagramRect.top;
// Create connection based on type
if (conn.type === 'vertical') {
// Vertical connection (top to bottom)
const line = document.createElement('div');
line.className = 'connection';
// Position line between bottom of first box and top of second
const startY = fromY + fromRect.height / 2;
const endY = toY - toRect.height / 2;
const height = endY - startY;
line.style.left = `${fromX}px`;
line.style.top = `${startY}px`;
line.style.width = '2px';
line.style.height = `${height}px`;
// Add arrow at the end
const arrow = document.createElement('div');
arrow.className = 'arrow arrow-down';
arrow.style.left = `${fromX - 4}px`;
arrow.style.top = `${endY - 8}px`;
diagram.appendChild(line);
diagram.appendChild(arrow);
} else if (conn.type === 'horizontal') {
// Horizontal connection (left to right or right to left)
const line = document.createElement('div');
line.className = 'connection';
// Determine direction
const isLeftToRight = fromX < toX;
// Position line between right of first box and left of second (or vice versa)
const startX = isLeftToRight ?
fromX + fromRect.width / 2 :
fromX - fromRect.width / 2;
const endX = isLeftToRight ?
toX - toRect.width / 2 :
toX + toRect.width / 2;
const width = Math.abs(endX - startX);
line.style.left = `${Math.min(startX, endX)}px`;
line.style.top = `${fromY}px`;
line.style.width = `${width}px`;
line.style.height = '2px';
// Add arrow at the end
const arrow = document.createElement('div');
arrow.className = isLeftToRight ? 'arrow arrow-right' : 'arrow arrow-left';
arrow.style.left = isLeftToRight ? `${endX - 8}px` : `${endX}px`;
arrow.style.top = `${fromY - 4}px`;
diagram.appendChild(line);
diagram.appendChild(arrow);
}
});
// Function to show a component modal
function showComponentModal(componentId) {
const component = components.find(c => c.id === componentId);
if (!component) return;
// Check if modal already exists
let modal = document.getElementById(`${componentId}-modal`);
if (!modal) {
// Create modal
modal = document.createElement('div');
modal.id = `${componentId}-modal`;
modal.className = 'modal';
const content = `
<div class="modal-content">
<span class="close">&times;</span>
<h2>${component.title}</h2>
<div class="tab">
<button class="tablinks active" onclick="openTab(event, '${componentId}-overview')">Overview</button>
<button class="tablinks" onclick="openTab(event, '${componentId}-subcomponents')">Subcomponents</button>
</div>
<div id="${componentId}-overview" class="tabcontent" style="display: block;">
<p>The ${component.title} contains the following key components:</p>
<ul>
${component.subcomponents.map(sub => `<li><strong>${sub.name}:</strong> ${sub.description}</li>`).join('')}
</ul>
<p>Click on any specific subcomponent to see more details about its technologies and implementation examples.</p>
</div>
<div id="${componentId}-subcomponents" class="tabcontent">
<div class="tech-grid">
${component.subcomponents.map(sub => `
<div class="tech-card" onclick="showSubcomponentModal('${componentId}', '${sub.id}')">
<div class="tech-title">${sub.name}</div>
<div>${sub.description}</div>
</div>
`).join('')}
</div>
</div>
</div>
`;
modal.innerHTML = content;
document.body.appendChild(modal);
// Add close functionality
const closeBtn = modal.querySelector('.close');
closeBtn.addEventListener('click', () => {
modal.style.display = 'none';
});
}
// Show the modal
modal.style.display = 'block';
}
// Function to show a subcomponent modal
function showSubcomponentModal(componentId, subcomponentId) {
const component = components.find(c => c.id === componentId);
if (!component) return;
const subcomponent = component.subcomponents.find(s => s.id === subcomponentId);
if (!subcomponent) return;
let modal = document.getElementById(`${componentId}-${subcomponentId}-modal`);
if (!modal) {
modal = document.createElement('div');
modal.id = `${componentId}-${subcomponentId}-modal`;
modal.className = 'modal';
const architectureImages = {
'service': {
'diet-service': {
img: 'diet-engine-arch.png',
description: 'Diet Service Architecture',
components: [
'Main Agent with Task Delegation',
'Prompt Engineering',
'RAG Integration',
'Diet Plan Generation',
'Diet Validation with Guardrails'
]
},
'support-service': {
img: 'support-service-arch.png',
description: 'Support Service Architecture',
components: [
'Ticket Management',
'Knowledge Base Integration',
'Response Generation',
'Customer Interaction Flow'
]
},
'analytics-service': {
img: 'analytics-arch.png',
description: 'Analytics Service Architecture',
components: [
'Data Processing Pipeline',
'Statistical Analysis',
'Reporting Engine',
'Visualization Generation'
]
}
// Add more service architectures as needed
}
};
const archConfig = architectureImages[componentId]?.[subcomponentId];
const content = `
<div class="modal-content">
<span class="close">&times;</span>
<h2>${subcomponent.name}</h2>
<p>${subcomponent.description}</p>
<div class="tab">
<button class="tablinks active" onclick="openTab(event, '${subcomponentId}-tech')">Technologies</button>
<button class="tablinks" onclick="openTab(event, '${subcomponentId}-examples')">Examples</button>
<button class="tablinks" onclick="openTab(event, '${subcomponentId}-arch')">Architecture</button>
</div>
<div id="${subcomponentId}-tech" class="tabcontent" style="display: block;">
<h3>Key Technologies</h3>
<div class="tech-grid">
${subcomponent.technologies.map(tech => `
<div class="tech-card">
<div class="tech-title">${tech.name}</div>
<div>${tech.description}</div>
${tech.badge ? `<span class="badge badge-${tech.badge}">${tech.badge}</span>` : ''}
</div>
`).join('')}
</div>
</div>
<div id="${subcomponentId}-examples" class="tabcontent">
<h3>Implementation Examples</h3>
${subcomponent.examples.map(example => `
<div class="example-box">
<div class="example-title">${example.title}</div>
<p>${example.description}</p>
</div>
`).join('')}
</div>
${archConfig ? `
<div id="${subcomponentId}-arch" class="tabcontent">
<h3>${archConfig.description}</h3>
<div class="arch-image-container" style="text-align: center; margin: 20px 0;">
<img src="${archConfig.img}" alt="${archConfig.description}"
style="max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 4px; padding: 10px;">
<div style="margin-top: 15px; text-align: left;">
<h4>Key Components:</h4>
<ul>
${archConfig.components.map(comp => `<li>${comp}</li>`).join('')}
</ul>
</div>
</div>
</div>
` : ''}
</div>
`;
modal.innerHTML = content;
document.body.appendChild(modal);
const closeBtn = modal.querySelector('.close');
closeBtn.addEventListener('click', () => {
modal.style.display = 'none';
});
}
modal.style.display = 'block';
}
// Tab functionality
function openTab(event, tabName) {
const tabcontent = document.getElementsByClassName('tabcontent');
for (let i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = 'none';
}
const tablinks = document.getElementsByClassName('tablinks');
for (let i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(' active', '');
}
document.getElementById(tabName).style.display = 'block';
event.currentTarget.className += ' active';
}
// Make the openTab function globally available
window.openTab = openTab;
// Make the showSubcomponentModal function globally available
window.showSubcomponentModal = showSubcomponentModal;
// Close modal when clicking outside of the content
window.addEventListener('click', (event) => {
const modals = document.getElementsByClassName('modal');
for (let i = 0; i < modals.length; i++) {
if (event.target == modals[i]) {
modals[i].style.display = 'none';
}
}
});
// Home button functionality
document.getElementById('homeBtn').addEventListener('click', () => {
const modals = document.getElementsByClassName('modal');
for (let i = 0; i < modals.length; i++) {
modals[i].style.display = 'none';
}
});
</script>
</body>
</html>// ... existing code ...