375 lines
21 KiB
HTML
375 lines
21 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" class="dark">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Jordan Map Platform | Developer Dashboard</title>
|
|
<!-- Tailwind CSS Play CDN -->
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<!-- MapLibre GL JS -->
|
|
<script src="https://unpkg.com/maplibre-gl@5.1.1/dist/maplibre-gl.js"></script>
|
|
<link href="https://unpkg.com/maplibre-gl@5.1.1/dist/maplibre-gl.css" rel="stylesheet" />
|
|
<!-- Lucide Icons -->
|
|
<script src="https://unpkg.com/lucide@latest"></script>
|
|
|
|
<script>
|
|
tailwind.config = {
|
|
darkMode: 'class',
|
|
theme: {
|
|
extend: {
|
|
colors: {
|
|
slate: {
|
|
950: '#0a0a0b',
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
|
|
|
|
body {
|
|
font-family: 'Plus Jakarta Sans', sans-serif;
|
|
background-color: #0a0a0b;
|
|
color: #f8fafc;
|
|
}
|
|
|
|
.glass {
|
|
background: rgba(15, 23, 42, 0.6);
|
|
backdrop-filter: blur(12px);
|
|
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.text-gradient {
|
|
background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.btn {
|
|
@apply flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold transition-all duration-300 active:scale-95 text-sm;
|
|
}
|
|
|
|
.btn-primary {
|
|
@apply bg-blue-600 text-white hover:bg-blue-500 shadow-lg shadow-blue-500/20 disabled:opacity-50 disabled:cursor-not-allowed;
|
|
}
|
|
|
|
.btn-secondary {
|
|
@apply bg-slate-900 text-slate-400 hover:text-white border border-slate-800 hover:border-slate-700;
|
|
}
|
|
|
|
/* Nav logic */
|
|
.page-section {
|
|
display: none;
|
|
}
|
|
.page-section.active {
|
|
display: block;
|
|
animation: fadeIn 0.5s ease-out;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* Sidebar active state */
|
|
.nav-link.active {
|
|
@apply bg-blue-600/10 text-blue-400 border-r-2 border-blue-600;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="overflow-hidden h-screen flex">
|
|
|
|
<!-- Sidebar -->
|
|
<aside class="w-64 border-r border-slate-800 bg-slate-950/50 backdrop-blur-xl flex flex-col z-50">
|
|
<div class="p-8">
|
|
<div class="flex items-center gap-3 group cursor-pointer">
|
|
<div class="w-10 h-10 rounded-xl bg-gradient-to-tr from-blue-600 to-cyan-400 flex items-center justify-center text-white shadow-lg shadow-blue-500/20 group-hover:rotate-12 transition-transform">
|
|
<i data-lucide="layers" class="w-6 h-6"></i>
|
|
</div>
|
|
<div>
|
|
<h1 class="font-black text-lg tracking-tight leading-none">Intaleq</h1>
|
|
<span class="text-[10px] uppercase tracking-[0.2em] font-bold text-slate-500">Maps SaaS</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="flex-1 px-4 space-y-2 mt-4">
|
|
<a href="#home" class="nav-link flex items-center gap-3 px-4 py-3 rounded-xl transition-all hover:bg-white/5 text-slate-400 font-bold group" id="nav-home">
|
|
<i data-lucide="layout-dashboard" class="w-5 h-5 group-hover:text-white transition-colors"></i>
|
|
Dashboard
|
|
</a>
|
|
<a href="#playground" class="nav-link flex items-center gap-3 px-4 py-3 rounded-xl transition-all hover:bg-white/5 text-slate-400 font-bold group" id="nav-playground">
|
|
<i data-lucide="terminal" class="w-5 h-5 group-hover:text-white transition-colors"></i>
|
|
Playground
|
|
</a>
|
|
<a href="#analytics" class="nav-link flex items-center gap-3 px-4 py-3 rounded-xl transition-all hover:bg-white/5 text-slate-400 font-bold group" id="nav-analytics">
|
|
<i data-lucide="bar-chart-3" class="w-5 h-5 group-hover:text-white transition-colors"></i>
|
|
Analytics
|
|
</a>
|
|
<a href="#billing" class="nav-link flex items-center gap-3 px-4 py-3 rounded-xl transition-all hover:bg-white/5 text-slate-400 font-bold group" id="nav-billing">
|
|
<i data-lucide="credit-card" class="w-5 h-5 group-hover:text-white transition-colors"></i>
|
|
Billing
|
|
</a>
|
|
<a href="#docs" class="nav-link flex items-center gap-3 px-4 py-3 rounded-xl transition-all hover:bg-white/5 text-slate-400 font-bold group" id="nav-docs">
|
|
<i data-lucide="book-open" class="w-5 h-5 group-hover:text-white transition-colors"></i>
|
|
Documentation
|
|
</a>
|
|
</nav>
|
|
|
|
<div class="p-6">
|
|
<div class="glass p-5 rounded-2xl border border-blue-500/10 bg-gradient-to-br from-blue-600/5 to-transparent">
|
|
<p class="text-[10px] font-black uppercase tracking-wider text-blue-400 mb-2">Beta Access</p>
|
|
<p class="text-xs text-slate-400 leading-relaxed font-medium mb-4">You're currently on the free sandbox tier.</p>
|
|
<button class="w-full btn btn-primary !py-2 !text-xs">Upgrade Plan</button>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Main Content -->
|
|
<div class="flex-1 flex flex-col min-w-0 bg-gradient-to-br from-slate-950 via-[#0f1115] to-slate-950 overflow-y-auto">
|
|
<!-- Header -->
|
|
<header class="h-20 border-b border-white/[0.03] flex items-center justify-between px-8 sticky top-0 bg-slate-950/50 backdrop-blur-md z-40">
|
|
<div class="flex items-center gap-4">
|
|
<div class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse"></div>
|
|
<span class="text-xs font-black uppercase tracking-widest text-slate-500">System Operational</span>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-6">
|
|
<div class="flex flex-col items-end">
|
|
<p class="text-sm font-bold" id="tenant-name">Loading...</p>
|
|
<p class="text-[10px] text-slate-500 font-medium" id="tenant-email">developer@intaleq.com</p>
|
|
</div>
|
|
<div class="w-10 h-10 rounded-full bg-slate-900 border border-slate-800 flex items-center justify-center text-blue-400">
|
|
<i data-lucide="user" class="w-5 h-5"></i>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="p-12 max-w-7xl mx-auto w-full">
|
|
|
|
<!-- Home Section -->
|
|
<section id="home" class="page-section">
|
|
<div class="mb-12">
|
|
<h2 class="text-4xl text-gradient mb-2" id="welcome-msg">Welcome back...</h2>
|
|
<p class="text-slate-400">Everything you need to build with premium Jordan Map Platform API</p>
|
|
</div>
|
|
|
|
<!-- KPI Stats -->
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12">
|
|
<div class="glass p-6 rounded-2xl group border-[#1e293b]">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<div class="w-10 h-10 rounded-xl bg-slate-900 flex items-center justify-center text-blue-400">
|
|
<i data-lucide="zap" class="w-5 h-5"></i>
|
|
</div>
|
|
<span class="text-xs font-bold px-2 py-1 rounded-full bg-slate-900 text-emerald-500">+12.5%</span>
|
|
</div>
|
|
<p class="text-sm text-slate-500 font-medium mb-1">Total Requests</p>
|
|
<div class="text-2xl font-bold tracking-tight">42,891</div>
|
|
</div>
|
|
<div class="glass p-6 rounded-2xl group">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<div class="w-10 h-10 rounded-xl bg-slate-900 flex items-center justify-center text-emerald-400">
|
|
<i data-lucide="shield-check" class="w-5 h-5"></i>
|
|
</div>
|
|
<span class="text-xs font-bold px-2 py-1 rounded-full bg-slate-900 text-emerald-500">+0.01%</span>
|
|
</div>
|
|
<p class="text-sm text-slate-500 font-medium mb-1">Success Rate</p>
|
|
<div class="text-2xl font-bold tracking-tight">99.98%</div>
|
|
</div>
|
|
<div class="glass p-6 rounded-2xl group">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<div class="w-10 h-10 rounded-xl bg-slate-900 flex items-center justify-center text-cyan-400">
|
|
<i data-lucide="activity" class="w-5 h-5"></i>
|
|
</div>
|
|
<span class="text-xs font-bold px-2 py-1 rounded-full bg-slate-900 text-slate-500">Stable</span>
|
|
</div>
|
|
<p class="text-sm text-slate-500 font-medium mb-1">Active Keys</p>
|
|
<div class="text-2xl font-bold tracking-tight" id="active-keys-count">...</div>
|
|
</div>
|
|
<div class="glass p-6 rounded-2xl group">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<div class="w-10 h-10 rounded-xl bg-slate-900 flex items-center justify-center text-violet-400">
|
|
<i data-lucide="trending-up" class="w-5 h-5"></i>
|
|
</div>
|
|
<span class="text-xs font-bold px-2 py-1 rounded-full bg-slate-900 text-slate-500">-12ms</span>
|
|
</div>
|
|
<p class="text-sm text-slate-500 font-medium mb-1">Map Load Speed</p>
|
|
<div class="text-2xl font-bold tracking-tight">342ms</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
|
|
<!-- Traffic Mockup -->
|
|
<div class="lg:col-span-2 glass rounded-2xl p-6 relative overflow-hidden">
|
|
<div class="flex items-center justify-between mb-8">
|
|
<div>
|
|
<h3 class="text-lg font-bold">Request Traffic</h3>
|
|
<p class="text-sm text-slate-500">Live traffic across all API endpoints</p>
|
|
</div>
|
|
<a href="#analytics" class="text-xs text-blue-500 hover:text-blue-400 font-bold flex items-center gap-1 transition-colors">
|
|
Full Analytics <i data-lucide="arrow-right" class="w-3.5 h-3.5"></i>
|
|
</a>
|
|
</div>
|
|
<div class="h-64 flex items-end gap-2 px-2 relative" id="traffic-bars">
|
|
<!-- Bars injected by JS -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Quick Actions -->
|
|
<div class="glass rounded-2xl p-6 bg-gradient-to-br from-blue-600/10 to-transparent border-blue-500/10">
|
|
<h3 class="text-lg font-bold mb-2">Quick Start</h3>
|
|
<p class="text-sm text-slate-500 mb-6 font-medium">Get started with our lightweight SDK in seconds.</p>
|
|
<div class="space-y-4">
|
|
<div class="bg-slate-950 rounded-xl p-4 border border-slate-800 font-mono text-xs">
|
|
<p class="text-slate-500 mb-2"># Install with npm</p>
|
|
<p class="text-blue-400">npm <span class="text-slate-200">install @intaleq/maps-gl</span></p>
|
|
</div>
|
|
<button class="w-full btn btn-secondary text-sm group" onclick="window.open('/api/docs', '_blank')">
|
|
<i data-lucide="terminal" class="w-4 h-4 text-blue-400 group-hover:scale-110 transition-transform"></i>
|
|
View API Reference
|
|
</button>
|
|
<a href="#playground" class="w-full btn btn-secondary text-sm group">
|
|
<i data-lucide="globe" class="w-4 h-4 text-cyan-400 group-hover:scale-110 transition-transform"></i>
|
|
Try Maps Playground
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- API Keys Table -->
|
|
<div class="glass rounded-2xl overflow-hidden mb-12">
|
|
<div class="p-6 border-b border-slate-800 flex items-center justify-between bg-white/[0.02]">
|
|
<div>
|
|
<h3 class="text-lg font-bold">Your API Keys</h3>
|
|
<p class="text-sm text-slate-500">Manage keys for your applications</p>
|
|
</div>
|
|
<button class="btn btn-primary" onclick="app.toggleModal('create-key-modal', true)" id="create-key-btn">
|
|
<i data-lucide="plus" class="w-4 h-4"></i>
|
|
Create New Key
|
|
</button>
|
|
</div>
|
|
|
|
<div class="overflow-x-auto min-h-[200px]">
|
|
<table class="w-full text-left">
|
|
<thead>
|
|
<tr class="text-xs uppercase tracking-widest text-slate-500 bg-slate-900/40">
|
|
<th class="px-6 py-4 font-black">Name</th>
|
|
<th class="px-6 py-4 font-black">API Key</th>
|
|
<th class="px-6 py-4 font-black">Status</th>
|
|
<th class="px-6 py-4 font-black">Restrictions</th>
|
|
<th class="px-6 py-4 font-black text-right">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="keys-table-body" class="divide-y divide-slate-800/50">
|
|
<!-- Injected by JS -->
|
|
<tr>
|
|
<td colspan="5" class="py-20 text-center text-slate-500">
|
|
<div class="flex flex-col items-center gap-4">
|
|
<i data-lucide="loader-2" class="w-8 h-8 animate-spin text-blue-500"></i>
|
|
<p>Fetching your secure keys...</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Playground Section -->
|
|
<section id="playground" class="page-section">
|
|
<div class="mb-12">
|
|
<h2 class="text-4xl text-gradient mb-2">Maps Playground</h2>
|
|
<p class="text-slate-400">Test your API keys and visualize vector tiles in real-time</p>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
|
|
<!-- Sidebar Controls -->
|
|
<div class="lg:col-span-1 space-y-6">
|
|
<div class="glass p-6 rounded-2xl">
|
|
<h4 class="text-[10px] uppercase font-black tracking-widest text-slate-500 mb-4">Configuration</h4>
|
|
<div class="space-y-4">
|
|
<div>
|
|
<label class="text-xs text-slate-400 mb-2 block">Active API Key</label>
|
|
<select id="pg-key-select" class="w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20"></select>
|
|
</div>
|
|
<div>
|
|
<label class="text-xs text-slate-400 mb-2 block">Map Style</label>
|
|
<div class="flex gap-2">
|
|
<button onclick="playground.setStyle('obsidian')" id="style-obsidian" class="flex-1 py-3 text-xs font-bold rounded-xl bg-blue-600 text-white shadow-lg shadow-blue-500/20">Obsidian</button>
|
|
<button onclick="playground.setStyle('light')" id="style-light" class="flex-1 py-3 text-xs font-bold rounded-xl bg-slate-900 text-slate-500">Light</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Map Container -->
|
|
<div class="lg:col-span-3 glass rounded-3xl overflow-hidden relative" style="height: 600px;">
|
|
<div id="map" class="absolute inset-0"></div>
|
|
<!-- Search Overlay -->
|
|
<div class="absolute top-6 left-6 w-full max-w-sm">
|
|
<div class="relative">
|
|
<i data-lucide="search" class="absolute left-4 top-1/2 -translate-y-1/2 text-slate-500 w-4 h-4"></i>
|
|
<input type="text" id="pg-search" placeholder="Search Amman, Jordan..."
|
|
class="w-full bg-slate-950/80 backdrop-blur-md border border-slate-800 rounded-2xl px-12 py-4 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/50 shadow-2xl">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Analytics Section -->
|
|
<section id="analytics" class="page-section">
|
|
<div class="mb-12">
|
|
<h2 class="text-4xl text-gradient mb-2">Analytics</h2>
|
|
<p class="text-slate-400">Deep insights into your API performance</p>
|
|
</div>
|
|
<!-- Simple Chart Mockups -->
|
|
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
|
<div class="glass p-8 rounded-3xl">
|
|
<h3 class="text-xl font-bold mb-8">Request Volume (Last 7 Days)</h3>
|
|
<div class="h-80 w-full flex items-end justify-between gap-4 px-4" id="v-chart"></div>
|
|
</div>
|
|
<div class="glass p-8 rounded-3xl">
|
|
<h3 class="text-xl font-bold mb-8">Service Latency (ms)</h3>
|
|
<div class="h-80 w-full flex items-end justify-between gap-4 px-4" id="l-chart"></div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
</main>
|
|
</div>
|
|
|
|
<!-- Modals -->
|
|
<div id="create-key-modal" class="fixed inset-0 z-[100] hidden">
|
|
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm" onclick="app.toggleModal('create-key-modal', false)"></div>
|
|
<div class="absolute inset-0 flex items-center justify-center p-4">
|
|
<div class="glass w-full max-w-md p-8 rounded-3xl animate-in fade-in zoom-in duration-300">
|
|
<h2 class="text-2xl font-bold mb-2">Create API Key</h2>
|
|
<p class="text-sm text-slate-500 mb-8">Set up a new access point for your application.</p>
|
|
<form id="create-key-form" class="space-y-6">
|
|
<div>
|
|
<label class="block text-xs font-black uppercase tracking-widest text-slate-500 mb-2">Key Name</label>
|
|
<input type="text" id="new-key-name" placeholder="e.g. Production Web App" required
|
|
class="w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20">
|
|
</div>
|
|
<div class="flex gap-4 pt-4">
|
|
<button type="button" class="flex-1 btn btn-secondary" onclick="app.toggleModal('create-key-modal', false)">Cancel</button>
|
|
<button type="submit" class="flex-1 btn btn-primary" id="btn-submit-key">Create Key</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- core script -->
|
|
<script src="js/app.js"></script>
|
|
<script src="js/playground.js"></script>
|
|
<script src="js/analytics.js"></script>
|
|
</body>
|
|
</html>
|