opsanalyst-ai / index.html
stakmodsco's picture
Create AI Business Operations Analyst Agent - Initial Deployment
7f69eeb verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Business Operations Analyst</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
}
.dashboard-card {
transition: all 0.3s ease;
}
.dashboard-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.chat-bubble {
border-radius: 20px;
max-width: 80%;
}
.user-bubble {
background-color: #e2f3fd;
border-bottom-right-radius: 5px;
}
.ai-bubble {
background-color: #f0f4ff;
border-bottom-left-radius: 5px;
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.sidebar {
transition: all 0.3s ease;
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
position: absolute;
z-index: 10;
height: 100vh;
}
.sidebar.open {
transform: translateX(0);
}
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar bg-white w-64 border-r border-gray-200 flex flex-col">
<div class="p-4 flex items-center gradient-bg text-white">
<div class="w-10 h-10 rounded-full bg-white flex items-center justify-center mr-3">
<i class="fas fa-robot text-purple-600 text-xl"></i>
</div>
<h1 class="text-xl font-bold">OpsAnalyst AI</h1>
</div>
<div class="flex-1 overflow-y-auto p-4">
<div class="mb-6">
<h2 class="text-xs uppercase text-gray-500 font-semibold mb-2">Navigation</h2>
<ul>
<li class="mb-1">
<a href="#" class="flex items-center p-2 text-purple-700 bg-purple-50 rounded-lg">
<i class="fas fa-chart-line mr-3"></i>
<span>Dashboard</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i class="fas fa-database mr-3"></i>
<span>Data Analysis</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i class="fas fa-cogs mr-3"></i>
<span>Process Optimization</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i class="fas fa-file-invoice-dollar mr-3"></i>
<span>Cost Analysis</span>
</a>
</li>
</ul>
</div>
<div class="mb-6">
<h2 class="text-xs uppercase text-gray-500 font-semibold mb-2">Quick Actions</h2>
<ul>
<li class="mb-1">
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i class="fas fa-bolt mr-3"></i>
<span>Generate Report</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i class="fas fa-chart-pie mr-3"></i>
<span>Performance Metrics</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i class="fas fa-lightbulb mr-3"></i>
<span>Get Insights</span>
</a>
</li>
</ul>
</div>
<div class="p-4 bg-gray-50 rounded-lg">
<h3 class="text-sm font-semibold text-gray-700 mb-2">System Status</h3>
<div class="flex items-center mb-1">
<div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
<span class="text-xs text-gray-600">AI Model: Active</span>
</div>
<div class="flex items-center mb-1">
<div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
<span class="text-xs text-gray-600">Data Connection: Stable</span>
</div>
<div class="flex items-center">
<div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
<span class="text-xs text-gray-600">Last Updated: Just now</span>
</div>
</div>
</div>
<div class="p-4 border-t border-gray-200">
<div class="flex items-center">
<div class="w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-2">
<i class="fas fa-user text-purple-600"></i>
</div>
<div>
<p class="text-sm font-medium">John Doe</p>
<p class="text-xs text-gray-500">Admin</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<header class="bg-white border-b border-gray-200 flex items-center justify-between p-4">
<div class="flex items-center">
<button id="menu-toggle" class="md:hidden mr-4 text-gray-600">
<i class="fas fa-bars text-xl"></i>
</button>
<h2 class="text-xl font-semibold text-gray-800">Business Operations Dashboard</h2>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="text-gray-600 hover:text-gray-900">
<i class="fas fa-bell text-xl"></i>
<span class="absolute top-0 right-0 w-2 h-2 rounded-full bg-red-500"></span>
</button>
</div>
<div class="relative">
<button class="text-gray-600 hover:text-gray-900">
<i class="fas fa-question-circle text-xl"></i>
</button>
</div>
<div class="relative">
<button class="flex items-center text-gray-600 hover:text-gray-900">
<i class="fas fa-cog text-xl"></i>
</button>
</div>
</div>
</header>
<!-- Dashboard Content -->
<main class="flex-1 overflow-y-auto p-4 bg-gray-50">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<div class="dashboard-card bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-sm text-gray-500">Operational Efficiency</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">78%</h3>
<p class="text-xs text-green-500 mt-1">+2.5% from last month</p>
</div>
<div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center">
<i class="fas fa-tachometer-alt text-green-600"></i>
</div>
</div>
<div class="mt-4">
<div class="h-2 w-full bg-gray-200 rounded-full">
<div class="h-2 bg-green-500 rounded-full" style="width: 78%"></div>
</div>
</div>
</div>
<div class="dashboard-card bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-sm text-gray-500">Cost Savings</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">$124K</h3>
<p class="text-xs text-green-500 mt-1">+$18K from last quarter</p>
</div>
<div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-dollar-sign text-blue-600"></i>
</div>
</div>
<div class="mt-4">
<div class="h-2 w-full bg-gray-200 rounded-full">
<div class="h-2 bg-blue-500 rounded-full" style="width: 65%"></div>
</div>
</div>
</div>
<div class="dashboard-card bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-sm text-gray-500">Process Bottlenecks</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">3</h3>
<p class="text-xs text-red-500 mt-1">+1 from last week</p>
</div>
<div class="w-12 h-12 rounded-full bg-red-100 flex items-center justify-center">
<i class="fas fa-exclamation-triangle text-red-600"></i>
</div>
</div>
<div class="mt-4">
<div class="h-2 w-full bg-gray-200 rounded-full">
<div class="h-2 bg-red-500 rounded-full" style="width: 30%"></div>
</div>
</div>
</div>
<div class="dashboard-card bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-sm text-gray-500">Automation Rate</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">42%</h3>
<p class="text-xs text-green-500 mt-1">+8% from last quarter</p>
</div>
<div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center">
<i class="fas fa-robot text-purple-600"></i>
</div>
</div>
<div class="mt-4">
<div class="h-2 w-full bg-gray-200 rounded-full">
<div class="h-2 bg-purple-500 rounded-full" style="width: 42%"></div>
</div>
</div>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
<!-- Process Optimization Chart -->
<div class="lg:col-span-2 bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-800">Process Optimization Opportunities</h3>
<div class="flex space-x-2">
<button class="px-3 py-1 text-xs bg-gray-100 rounded-md">This Month</button>
<button class="px-3 py-1 text-xs bg-purple-100 text-purple-700 rounded-md">All Time</button>
</div>
</div>
<div class="h-64">
<canvas id="processChart"></canvas>
</div>
</div>
<!-- AI Recommendations -->
<div class="bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-800">AI Recommendations</h3>
<button class="text-purple-600 hover:text-purple-800">
<i class="fas fa-sync-alt"></i>
</button>
</div>
<div class="space-y-4">
<div class="p-3 bg-blue-50 rounded-lg">
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3 mt-1">
<i class="fas fa-lightbulb text-blue-600"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-800">Automate invoice processing</p>
<p class="text-xs text-gray-500 mt-1">Potential savings: $28K/year</p>
</div>
</div>
</div>
<div class="p-3 bg-green-50 rounded-lg">
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-green-100 flex items-center justify-center mr-3 mt-1">
<i class="fas fa-lightbulb text-green-600"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-800">Optimize supply chain routes</p>
<p class="text-xs text-gray-500 mt-1">Potential efficiency gain: 12%</p>
</div>
</div>
</div>
<div class="p-3 bg-purple-50 rounded-lg">
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-3 mt-1">
<i class="fas fa-lightbulb text-purple-600"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-800">Implement predictive maintenance</p>
<p class="text-xs text-gray-500 mt-1">Reduce downtime by 35%</p>
</div>
</div>
</div>
<div class="p-3 bg-yellow-50 rounded-lg">
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-yellow-100 flex items-center justify-center mr-3 mt-1">
<i class="fas fa-lightbulb text-yellow-600"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-800">Re-negotiate vendor contracts</p>
<p class="text-xs text-gray-500 mt-1">Potential savings: $45K/year</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- AI Chat Assistant -->
<div class="bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-800">AI Operations Analyst</h3>
<div class="flex items-center">
<span class="w-2 h-2 rounded-full bg-green-500 mr-2"></span>
<span class="text-xs text-gray-500">Active</span>
</div>
</div>
<div class="h-96 border border-gray-200 rounded-lg overflow-hidden flex flex-col">
<!-- Chat Messages -->
<div class="flex-1 overflow-y-auto p-4 space-y-4" id="chat-messages">
<div class="flex justify-start">
<div class="chat-bubble ai-bubble p-4">
<p class="text-sm text-gray-800">Hello! I'm your AI Business Operations Analyst. How can I assist you with optimizing your business processes today?</p>
<p class="text-xs text-gray-500 mt-2">Today, 10:02 AM</p>
</div>
</div>
<div class="flex justify-end">
<div class="chat-bubble user-bubble p-4">
<p class="text-sm text-gray-800">Can you analyze our current operational efficiency?</p>
<p class="text-xs text-gray-500 mt-2">Today, 10:03 AM</p>
</div>
</div>
<div class="flex justify-start">
<div class="chat-bubble ai-bubble p-4">
<p class="text-sm text-gray-800">Based on current data, your operational efficiency is at 78%, which is above industry average. I've identified 3 key areas for improvement that could potentially increase this to 85%.</p>
<p class="text-xs text-gray-500 mt-2">Today, 10:03 AM</p>
</div>
</div>
</div>
<!-- Chat Input -->
<div class="border-t border-gray-200 p-4 bg-gray-50">
<div class="flex items-center">
<input type="text" placeholder="Ask about process optimization, cost savings, or performance metrics..."
class="flex-1 border border-gray-300 rounded-l-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent">
<button class="bg-purple-600 text-white px-4 py-2 rounded-r-lg hover:bg-purple-700 transition">
<i class="fas fa-paper-plane"></i>
</button>
</div>
<div class="flex items-center justify-between mt-2">
<div class="flex space-x-2">
<button class="text-gray-500 hover:text-gray-700">
<i class="fas fa-paperclip"></i>
</button>
<button class="text-gray-500 hover:text-gray-700">
<i class="fas fa-chart-bar"></i>
</button>
<button class="text-gray-500 hover:text-gray-700">
<i class="fas fa-file-export"></i>
</button>
</div>
<div>
<span class="text-xs text-gray-500">AI-powered analysis</span>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Toggle mobile menu
document.getElementById('menu-toggle').addEventListener('click', function() {
document.querySelector('.sidebar').classList.toggle('open');
});
// Process Optimization Chart
const processCtx = document.getElementById('processChart').getContext('2d');
const processChart = new Chart(processCtx, {
type: 'bar',
data: {
labels: ['Supply Chain', 'Inventory Mgmt', 'Order Fulfillment', 'Customer Service', 'Billing', 'HR Processes'],
datasets: [{
label: 'Current Efficiency',
data: [72, 65, 81, 78, 69, 58],
backgroundColor: '#a777e3',
borderColor: '#6e8efb',
borderWidth: 1
}, {
label: 'Potential Efficiency',
data: [89, 82, 92, 85, 78, 75],
backgroundColor: '#6e8efb',
borderColor: '#6e8efb',
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
max: 100,
title: {
display: true,
text: 'Efficiency (%)'
}
}
},
plugins: {
tooltip: {
callbacks: {
label: function(context) {
return context.dataset.label + ': ' + context.raw + '%';
}
}
},
legend: {
position: 'top',
}
}
}
});
// Simulate AI typing effect
function simulateAITyping(message) {
const chatMessages = document.getElementById('chat-messages');
const typingBubble = document.createElement('div');
typingBubble.className = 'flex justify-start';
typingBubble.innerHTML = `
<div class="chat-bubble ai-bubble p-4 flex items-center">
<div class="w-2 h-2 rounded-full bg-gray-400 mr-1 pulse-animation"></div>
<div class="w-2 h-2 rounded-full bg-gray-400 mr-1 pulse-animation" style="animation-delay: 0.2s"></div>
<div class="w-2 h-2 rounded-full bg-gray-400 pulse-animation" style="animation-delay: 0.4s"></div>
</div>
`;
chatMessages.appendChild(typingBubble);
chatMessages.scrollTop = chatMessages.scrollHeight;
// Remove typing indicator after delay and show message
setTimeout(() => {
chatMessages.removeChild(typingBubble);
const aiMessage = document.createElement('div');
aiMessage.className = 'flex justify-start';
aiMessage.innerHTML = `
<div class="chat-bubble ai-bubble p-4">
<p class="text-sm text-gray-800">${message}</p>
<p class="text-xs text-gray-500 mt-2">Today, ${new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'})}</p>
</div>
`;
chatMessages.appendChild(aiMessage);
chatMessages.scrollTop = chatMessages.scrollHeight;
}, 1500);
}
// Handle chat input
document.querySelector('.bg-purple-600').addEventListener('click', function() {
const input = document.querySelector('input[type="text"]');
if (input.value.trim() !== '') {
// Add user message
const chatMessages = document.getElementById('chat-messages');
const userMessage = document.createElement('div');
userMessage.className = 'flex justify-end';
userMessage.innerHTML = `
<div class="chat-bubble user-bubble p-4">
<p class="text-sm text-gray-800">${input.value}</p>
<p class="text-xs text-gray-500 mt-2">Today, ${new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'})}</p>
</div>
`;
chatMessages.appendChild(userMessage);
chatMessages.scrollTop = chatMessages.scrollHeight;
// Generate AI response
const userQuery = input.value.toLowerCase();
let aiResponse = "I've analyzed your request and here are my findings...";
if (userQuery.includes('efficiency') || userQuery.includes('operational')) {
aiResponse = "Your current operational efficiency is 78%. The main areas for improvement are inventory management (65%) and HR processes (58%). Implementing automation in these areas could boost efficiency by 15-20%.";
} else if (userQuery.includes('cost') || userQuery.includes('saving')) {
aiResponse = "I've identified potential cost savings of $124K annually. The largest opportunities are in vendor contract renegotiation ($45K), invoice processing automation ($28K), and energy consumption optimization ($18K).";
} else if (userQuery.includes('bottleneck') || userQuery.includes('issue')) {
aiResponse = "There are currently 3 process bottlenecks: 1) Inventory restocking delays (avg. 3.2 days), 2) Invoice approval cycle (avg. 7 days), 3) Customer service response time (avg. 24 hours).";
} else if (userQuery.includes('recommend') || userQuery.includes('suggestion')) {
aiResponse = "Top recommendations: 1) Implement RPA for invoice processing, 2) Optimize warehouse layout to reduce picking time by 30%, 3) Introduce predictive maintenance for critical equipment, 4) Renegotiate vendor contracts with volume discounts.";
}
// Clear input
input.value = '';
// Show AI response after delay
setTimeout(() => {
simulateAITyping(aiResponse);
}, 500);
}
});
// Also trigger chat on Enter key
document.querySelector('input[type="text"]').addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
document.querySelector('.bg-purple-600').click();
}
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=stakmodsco/opsanalyst-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>