algogenius-traderbot / dashboard.html
Alexo19's picture
SER
34bc046 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard - AlgoGenius TraderBot</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar-collapsed {
width: 5rem;
}
.sidebar-collapsed .nav-text {
display: none;
}
.content {
transition: margin-left 0.3s ease;
}
.card-hover {
transition: all 0.3s ease;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
</style>
</head>
<body class="bg-gray-50">
<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="flex items-center justify-center h-16 px-4 border-b border-gray-200">
<div class="flex items-center">
<i data-feather="activity" class="h-6 w-6 text-primary-500"></i>
<span class="ml-2 text-lg font-semibold text-gray-900">AlgoGenius</span>
</div>
</div>
<div class="flex-grow overflow-y-auto">
<nav class="px-2 py-4">
<div class="space-y-1">
<a href="#" class="bg-primary-50 text-primary-600 group flex items-center px-2 py-2 text-sm font-medium rounded-md">
<i data-feather="home" class="text-primary-500 mr-3 h-5 w-5"></i>
<span class="nav-text">Dashboard</span>
</a>
<a href="#" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md">
<i data-feather="bar-chart-2" class="text-gray-400 group-hover:text-gray-500 mr-3 h-5 w-5"></i>
<span class="nav-text">Market Analysis</span>
</a>
<a href="#" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md">
<i data-feather="download" class="text-gray-400 group-hover:text-gray-500 mr-3 h-5 w-5"></i>
<span class="nav-text">Telegram Feeds</span>
</a>
<a href="#" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md">
<i data-feather="cpu" class="text-gray-400 group-hover:text-gray-500 mr-3 h-5 w-5"></i>
<span class="nav-text">AI Models</span>
</a>
<a href="#" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md">
<i data-feather="clock" class="text-gray-400 group-hover:text-gray-500 mr-3 h-5 w-5"></i>
<span class="nav-text">Backtesting</span>
</a>
<a href="#" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md">
<i data-feather="settings" class="text-gray-400 group-hover:text-gray-500 mr-3 h-5 w-5"></i>
<span class="nav-text">Settings</span>
</a>
</div>
<div class="mt-8">
<h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Recent Documents</h3>
<div class="mt-2 space-y-1">
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium text-gray-600 rounded-md hover:text-gray-900 hover:bg-gray-50">
<i data-feather="file-text" class="mr-3 h-4 w-4 text-gray-400 group-hover:text-gray-500"></i>
<span class="truncate nav-text">SMC_Advanced_Chartbook.pdf</span>
</a>
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium text-gray-600 rounded-md hover:text-gray-900 hover:bg-gray-50">
<i data-feather="file-text" class="mr-3 h-4 w-4 text-gray-400 group-hover:text-gray-500"></i>
<span class="truncate nav-text">Market_Analysis_Report.pdf</span>
</a>
</div>
</div>
</nav>
</div>
<div class="p-4 border-t border-gray-200">
<button class="w-full flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-500 hover:bg-primary-600">
<i data-feather="plus" class="mr-2 h-4 w-4"></i>
<span class="nav-text">New Strategy</span>
</button>
</div>
</div>
<!-- Main content -->
<div class="content flex-1 overflow-auto">
<!-- Top navigation -->
<header class="bg-white shadow-sm">
<div class="px-4 py-4 sm:px-6 lg:px-8 flex justify-between items-center">
<div class="flex items-center">
<button class="mr-4 text-gray-500 hover:text-gray-600 focus:outline-none">
<i data-feather="menu"></i>
</button>
<h1 class="text-lg font-semibold leading-6 text-gray-900">Dashboard</h1>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="search" class="h-5 w-5 text-gray-400"></i>
</div>
<input type="text" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm" placeholder="Search...">
</div>
<button class="p-1 text-gray-400 hover:text-gray-500 rounded-full">
<i data-feather="bell"></i>
</button>
<div class="relative">
<button class="flex items-center text-sm rounded-full focus:outline-none">
<img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/1" alt="User profile">
</button>
</div>
</div>
</div>
</header>
<!-- Main content area -->
<main class="p-4 sm:p-6 lg:p-8">
<!-- Stats cards -->
<div class="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4">
<div class="card-hover bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-primary-500 rounded-md p-3">
<i data-feather="dollar-sign" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Total Profit</dt>
<dd class="flex items-baseline">
<div class="text-2xl font-semibold text-gray-900">$24,582</div>
<div class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
<i data-feather="trending-up" class="h-4 w-4"></i>
<span class="sr-only">Increased by</span>12%
</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="card-hover bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-green-500 rounded-md p-3">
<i data-feather="check-circle" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Win Rate</dt>
<dd class="flex items-baseline">
<div class="text-2xl font-semibold text-gray-900">72.4%</div>
<div class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
<i data-feather="trending-up" class="h-4 w-4"></i>
<span class="sr-only">Increased by</span>5.2%
</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="card-hover bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-blue-500 rounded-md p-3">
<i data-feather="activity" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Active Strategies</dt>
<dd class="flex items-baseline">
<div class="text-2xl font-semibold text-gray-900">8</div>
<div class="ml-2 flex items-baseline text-sm font-semibold text-red-600">
<i data-feather="trending-down" class="h-4 w-4"></i>
<span class="sr-only">Decreased by</span>1
</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="card-hover bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-purple-500 rounded-md p-3">
<i data-feather="clock" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Avg Trade Duration</dt>
<dd class="flex items-baseline">
<div class="text-2xl font-semibold text-gray-900">2.4h</div>
<div class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
<i data-feather="trending-up" class="h-4 w-4"></i>
<span class="sr-only">Increased by</span>0.8h
</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<!-- Charts -->
<div class="mt-8 grid grid-cols-1 gap-6 lg:grid-cols-2">
<!-- Performance chart -->
<div class="card-hover bg-white p-6 shadow rounded-lg">
<h2 class="text-lg font-medium text-gray-900 mb-4">Portfolio Performance</h2>
<canvas id="performanceChart" class="w-full h-64"></canvas>
</div>
<!-- Market sentiment -->
<div class="card-hover bg-white p-6 shadow rounded-lg">
<h2 class="text-lg font-medium text-gray-900 mb-4">Market Sentiment Analysis</h2>
<canvas id="sentimentChart" class="w-full h-64"></canvas>
</div>
</div>
<!-- Recent trades -->
<div class="mt-8">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-medium text-gray-900">Recent Trades</h2>
<a href="#" class="text-sm font-medium text-primary-600 hover:text-primary-500">View all</a>
</div>
<div class="card-hover bg-white shadow rounded-lg overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Symbol</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Direction</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Entry</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Exit</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Profit</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Strategy</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/finance/200x200/1" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">BTC/USD</div>
<div class="text-sm text-gray-500">Bitcoin</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Long</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$42,356.78</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$43,812.45</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-600 font-medium">+3.4%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">SMC Breakout</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/finance/200x200/2" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">ETH/USD</div>
<div class="text-sm text-gray-500">Ethereum</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Short</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$3,245.67</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$3,112.89</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-600 font-medium">+4.1%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">AI Trend</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/finance/200x200/3" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">AAPL</div>
<div class="text-sm text-gray-500">Apple Inc</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Long</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$178.34</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$180.12</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-600 font-medium">+1.0%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Volume Spike</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/finance/200x200/4" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">TSLA</div>
<div class="text-sm text-gray-500">Tesla Inc</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Short</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$925.78</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$912.45</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-red-600 font-medium">-1.4%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">AI Reversal</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
</div>
</div>
<script>
// Initialize feather icons
feather.replace();
// Initialize charts
document.addEventListener('DOMContentLoaded', function() {
// Performance chart
const performanceCtx = document.getElementById('performanceChart').getContext('2d');
const performanceChart = new Chart(performanceCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
datasets: [{
label: 'Portfolio Value',
data: [10000, 11500, 12100, 13400, 14200, 15800, 16500],
backgroundColor: 'rgba(16, 185, 129, 0.1)',
borderColor: 'rgba(16, 185, 129, 1)',
borderWidth: 2,
tension: 0.3,
fill: true
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: false
}
},
scales: {
y: {
beginAtZero: false
}
}
}
});
// Sentiment chart
const sentimentCtx = document.getElementById('sentimentChart').getContext('2d');
const sentimentChart = new Chart(sentimentCtx, {
type: 'doughnut',
data: {
labels: ['Bullish', 'Neutral', 'Bearish'],
datasets: [{
data: [62, 23, 15],
backgroundColor: [
'rgba(16, 185, 129, 0.8)',
'rgba(156, 163, 175, 0.8)',
'rgba(239, 68, 68, 0.8)'
],
borderWidth: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'right'
}
},
cutout: '70%'
}
});
// Collapse sidebar functionality
const sidebar = document.querySelector('.sidebar');
const toggleBtn = document.querySelector('header button');
toggleBtn.addEventListener('click', function() {
sidebar.classList.toggle('sidebar-collapsed');
document.querySelector('.content').classList.toggle('ml-20');
document.querySelector('.content').classList.toggle('ml-64');
});
});
</script>
</body>
</html>