voipms / index.html
RobinsAIWorld's picture
Replace any and all static placeholder data with variables that would need to be populated or otherwise streamed to (e.g. video, voice rendering of text messages, voice synthesis for phone, etc.) so that NO mock data remains and anywhere there waqs mock data, there should be a variable. The app name should be BoomersPhone and the namespace world.robinsai.boomersphone Compile all the variables and functions to be populated to render the demo in a definitions file - Initial Deployment
9796c0c verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VoIP.ms Dashboard</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">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#6366f1',
secondary: '#8b5cf6',
dark: '#0f172a',
light: '#f8fafc'
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
color: #f8fafc;
min-height: 100vh;
}
.card {
background: rgba(30, 41, 59, 0.7);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
}
.tab-active {
background: rgba(99, 102, 241, 0.2);
border-left: 3px solid #6366f1;
}
.pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
.message-bubble {
max-width: 70%;
border-radius: 18px;
}
.message-bubble.sent {
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
border-bottom-right-radius: 4px;
}
.message-bubble.received {
background: rgba(30, 41, 59, 0.7);
border-bottom-left-radius: 4px;
}
.glow {
text-shadow: 0 0 10px rgba(99, 102, 241, 0.7);
}
.fade-in {
animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
</style>
</head>
<body class="p-4 md:p-6">
<!-- Main Container -->
<div class="max-w-7xl mx-auto">
<!-- Header -->
<header class="flex flex-col md:flex-row justify-between items-center mb-8 gap-4">
<div class="flex items-center gap-3">
<div class="bg-gradient-to-br from-primary to-secondary p-3 rounded-xl">
<i class="fas fa-phone-alt text-white text-2xl"></i>
</div>
<div>
<h1 class="text-2xl md:text-3xl font-bold">VoIP.ms</h1>
<p class="text-gray-400 text-sm">Professional Communication Suite</p>
</div>
</div>
<div class="flex items-center gap-4">
<div class="flex items-center gap-2 bg-gray-800 px-4 py-2 rounded-lg">
<i class="fas fa-wallet text-primary"></i>
<span class="font-medium">$<span id="balance">{{ACCOUNT_BALANCE}}</span></span>
</div>
<div class="relative">
<button id="user-menu" class="flex items-center gap-2 bg-gray-800 hover:bg-gray-700 px-4 py-2 rounded-lg transition">
<div class="w-8 h-8 rounded-full bg-gradient-to-br from-primary to-secondary flex items-center justify-center">
<i class="fas fa-user text-white"></i>
</div>
<span class="hidden md:inline" id="userEmail">{{ACCOUNT_EMAIL}}</span>
<i class="fas fa-chevron-down text-xs"></i>
</button>
<div id="user-dropdown" class="absolute right-0 mt-2 w-48 bg-gray-800 rounded-lg shadow-lg py-2 hidden z-10">
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Account Settings</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Billing</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Logout</a>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="flex flex-col lg:flex-row gap-6">
<!-- Sidebar -->
<div class="w-full lg:w-64 flex-shrink-0">
<div class="card rounded-xl p-4">
<nav>
<ul class="space-y-1">
<li>
<button class="w-full text-left px-4 py-3 rounded-lg flex items-center gap-3 tab-active">
<i class="fas fa-tachometer-alt"></i>
<span>Dashboard</span>
</button>
</li>
<li>
<button class="w-full text-left px-4 py-3 rounded-lg flex items-center gap-3 hover:bg-gray-700 transition">
<i class="fas fa-phone"></i>
<span>Calls</span>
</button>
</li>
<li>
<button class="w-full text-left px-4 py-3 rounded-lg flex items-center gap-3 hover:bg-gray-700 transition">
<i class="fas fa-sms"></i>
<span>Messages</span>
</button>
</li>
<li>
<button class="w-full text-left px-4 py-3 rounded-lg flex items-center gap-3 hover:bg-gray-700 transition">
<i class="fas fa-sim-card"></i>
<span>DIDs</span>
</button>
</li>
<li>
<button class="w-full text-left px-4 py-3 rounded-lg flex items-center gap-3 hover:bg-gray-700 transition">
<i class="fas fa-cog"></i>
<span>Settings</span>
</button>
</li>
</ul>
</nav>
<div class="mt-6 pt-4 border-t border-gray-700">
<h3 class="px-4 text-gray-400 text-sm font-medium mb-2">YOUR DIDs</h3>
<ul class="space-y-1">
<li>
<button class="w-full text-left px-4 py-2 rounded-lg flex items-center gap-3 hover:bg-gray-700 transition">
<div class="w-3 h-3 rounded-full {{DID_STATUS_COLOR}}"></div>
<span>{{DID_NUMBER}}</span>
</button>
</li>
<li>
<button class="w-full text-left px-4 py-2 rounded-lg flex items-center gap-3 hover:bg-gray-700 transition">
<div class="w-3 h-3 rounded-full {{DID_STATUS_COLOR}}"></div>
<span>{{DID_NUMBER}}</span>
</button>
</li>
<li>
<button class="w-full text-left px-4 py-2 rounded-lg flex items-center gap-3 hover:bg-gray-700 transition">
<div class="w-3 h-3 rounded-full {{DID_STATUS_COLOR}}"></div>
<span>{{DID_NUMBER}}</span>
</button>
</li>
</ul>
</div>
</div>
</div>
<!-- Main Content Area -->
<div class="flex-grow">
<!-- Stats Overview -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="card rounded-xl p-5">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-400">Total Calls</p>
<p class="text-2xl font-bold mt-1">142</p>
</div>
<div class="bg-indigo-500/20 p-3 rounded-lg">
<i class="fas fa-phone-volume text-indigo-400 text-xl"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center {{CALLS_TREND_CLASS}}">
<i class="fas {{CALLS_TREND_ICON}}"></i>
<span class="ml-1">{{CALLS_TREND_VALUE}} from last month</span>
</div>
</div>
</div>
<div class="card rounded-xl p-5">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-400">Messages</p>
<p class="text-2xl font-bold mt-1">248</p>
</div>
<div class="bg-purple-500/20 p-3 rounded-lg">
<i class="fas fa-sms text-purple-400 text-xl"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center {{MESSAGES_TREND_CLASS}}">
<i class="fas {{MESSAGES_TREND_ICON}}"></i>
<span class="ml-1">{{MESSAGES_TREND_VALUE}} from last month</span>
</div>
</div>
</div>
<div class="card rounded-xl p-5">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-400">Active DIDs</p>
<p class="text-2xl font-bold mt-1">3</p>
</div>
<div class="bg-blue-500/20 p-3 rounded-lg">
<i class="fas fa-sim-card text-blue-400 text-xl"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center {{DIDS_TREND_CLASS}}">
<i class="fas {{DIDS_TREND_ICON}}"></i>
<span class="ml-1">{{DIDS_TREND_VALUE}} this month</span>
</div>
</div>
</div>
</div>
<!-- Main Content Tabs -->
<div class="card rounded-xl overflow-hidden">
<!-- Tab Headers -->
<div class="flex border-b border-gray-700">
<button class="px-6 py-4 font-medium border-b-2 border-primary">Messages</button>
<button class="px-6 py-4 font-medium text-gray-400 hover:text-white">Calls</button>
<button class="px-6 py-4 font-medium text-gray-400 hover:text-white">DID Management</button>
<button class="px-6 py-4 font-medium text-gray-400 hover:text-white">Settings</button>
</div>
<!-- Tab Content -->
<div class="p-6">
<!-- Messages Tab -->
<div>
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-bold">Messages</h2>
<div class="flex gap-2">
<button class="bg-gray-800 hover:bg-gray-700 px-4 py-2 rounded-lg flex items-center gap-2">
<i class="fas fa-sync-alt"></i>
<span>Refresh</span>
</button>
<button class="bg-gradient-to-r from-primary to-secondary hover:opacity-90 px-4 py-2 rounded-lg flex items-center gap-2">
<i class="fas fa-plus"></i>
<span>New Message</span>
</button>
</div>
</div>
<div class="flex flex-col md:flex-row gap-6">
<!-- Conversation List -->
<div class="w-full md:w-1/3">
<div class="relative mb-4">
<input type="text" placeholder="Search conversations..." class="w-full bg-gray-800 rounded-lg py-3 px-4 pl-10 focus:outline-none focus:ring-2 focus:ring-primary">
<i class="fas fa-search absolute left-3 top-3.5 text-gray-500"></i>
</div>
<div class="space-y-2 max-h-[500px] overflow-y-auto pr-2">
<div class="bg-gray-800 rounded-lg p-4 cursor-pointer hover:bg-gray-700 transition">
<div class="flex justify-between">
<h3 class="font-bold">John Smith</h3>
<span class="text-xs text-gray-400">2:45 PM</span>
</div>
<p class="text-gray-400 text-sm truncate">Thanks for the update! Looking forward to...</p>
</div>
<div class="bg-gray-800 rounded-lg p-4 cursor-pointer hover:bg-gray-700 transition">
<div class="flex justify-between">
<h3 class="font-bold">Marketing Team</h3>
<span class="text-xs text-gray-400">11:30 AM</span>
</div>
<p class="text-gray-400 text-sm truncate">Meeting rescheduled to tomorrow at 3 PM</p>
</div>
<div class="bg-gray-800 rounded-lg p-4 cursor-pointer hover:bg-gray-700 transition">
<div class="flex justify-between">
<h3 class="font-bold">Customer Support</h3>
<span class="text-xs text-gray-400">Yesterday</span>
</div>
<p class="text-gray-400 text-sm truncate">Your ticket #12345 has been resolved</p>
</div>
<div class="bg-gray-800 rounded-lg p-4 cursor-pointer hover:bg-gray-700 transition">
<div class="flex justify-between">
<h3 class="font-bold">Sarah Johnson</h3>
<span class="text-xs text-gray-400">Jun 12</span>
</div>
<p class="text-gray-400 text-sm truncate">Can we schedule a call next week?</p>
</div>
</div>
</div>
<!-- Chat Area -->
<div class="flex-grow flex flex-col">
<div class="flex items-center justify-between mb-4 pb-4 border-b border-gray-700">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-full bg-gradient-to-br from-primary to-secondary flex items-center justify-center">
<span class="font-bold">JS</span>
</div>
<div>
<h3 class="font-bold">John Smith</h3>
<p class="text-sm text-green-500 flex items-center gap-1">
<span class="w-2 h-2 rounded-full bg-green-500"></span>
Online
</p>
</div>
</div>
<div class="flex gap-2">
<button class="w-10 h-10 rounded-full bg-gray-800 hover:bg-gray-700 flex items-center justify-center">
<i class="fas fa-phone"></i>
</button>
<button class="w-10 h-10 rounded-full bg-gray-800 hover:bg-gray-700 flex items-center justify-center">
<i class="fas fa-video"></i>
</button>
</div>
</div>
<!-- Messages -->
<div class="flex-grow overflow-y-auto mb-4 space-y-4 max-h-[400px] pr-2">
<div class="flex justify-end">
<div class="message-bubble sent p-4">
<p>Hi John, just wanted to check in on the project status.</p>
<div class="text-right text-xs text-indigo-200 mt-1">2:42 PM</div>
</div>
</div>
<div class="flex justify-start">
<div class="message-bubble received p-4">
<p>Hey! We're making good progress. Should be ready by Friday.</p>
<div class="text-left text-xs text-gray-400 mt-1">2:43 PM</div>
</div>
</div>
<div class="flex justify-end">
<div class="message-bubble sent p-4">
<p>That's great news! Can you send me the latest files when you get a chance?</p>
<div class="text-right text-xs text-indigo-200 mt-1">2:44 PM</div>
</div>
</div>
<div class="flex justify-start">
<div class="message-bubble received p-4">
<p>Sure thing! I'll email them over in the next hour.</p>
<div class="text-left text-xs text-gray-400 mt-1">2:45 PM</div>
</div>
</div>
</div>
<!-- Message Input -->
<div class="flex gap-2">
<input type="text" placeholder="Type a message..." class="flex-grow bg-gray-800 rounded-lg py-3 px-4 focus:outline-none focus:ring-2 focus:ring-primary">
<button class="bg-gradient-to-r from-primary to-secondary hover:opacity-90 w-12 h-12 rounded-lg flex items-center justify-center">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Calls Tab (Hidden by default) -->
<div class="hidden">
<!-- Call Management Content -->
</div>
<!-- DID Management Tab (Hidden by default) -->
<div class="hidden">
<!-- DID Management Content -->
</div>
<!-- Settings Tab (Hidden by default) -->
<div class="hidden">
<!-- Settings Content -->
</div>
</div>
</div>
<!-- Recent Activity -->
<div class="card rounded-xl p-6 mt-6">
<h2 class="text-xl font-bold mb-4">Recent Activity</h2>
<div class="space-y-4">
<div class="flex items-start gap-4">
<div class="w-10 h-10 rounded-full bg-green-500/20 flex items-center justify-center">
<i class="fas fa-sms text-green-500"></i>
</div>
<div>
<p class="font-medium">New message from John Smith</p>
<p class="text-gray-400 text-sm">"Thanks for the update! Looking forward to..."</p>
<p class="text-gray-500 text-xs mt-1">2:45 PM</p>
</div>
</div>
<div class="flex items-start gap-4">
<div class="w-10 h-10 rounded-full bg-blue-500/20 flex items-center justify-center">
<i class="fas fa-phone text-blue-500"></i>
</div>
<div>
<p class="font-medium">Incoming call from (555) 123-4567</p>
<p class="text-gray-400 text-sm">Duration: 5 minutes 23 seconds</p>
<p class="text-gray-500 text-xs mt-1">1:30 PM</p>
</div>
</div>
<div class="flex items-start gap-4">
<div class="w-10 h-10 rounded-full bg-purple-500/20 flex items-center justify-center">
<i class="fas fa-cog text-purple-500"></i>
</div>
<div>
<p class="font-medium">CNAM updated for (555) 987-6543</p>
<p class="text-gray-400 text-sm">Changed to "Marketing Department"</p>
<p class="text-gray-500 text-xs mt-1">11:45 AM</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
/*******************************************************************************
* BoomersPhone – Runtime Variables & API Contract
* Namespace: world.robinsai.boomersphone
*
* All variables below must be populated by the host environment (native app,
* Electron, PWA, etc.). The template itself never hard-codes user data.
******************************************************************************/
// 1. Account & Auth
window.BP = {
ACCOUNT_EMAIL: "{{ACCOUNT_EMAIL}}",
ACCOUNT_BALANCE: "{{ACCOUNT_BALANCE}}", // string/number – dollars
API_KEY: "{{API_KEY}}", // used internally for voip.ms calls
// 2. DIDs
ACTIVE_DIDS: "{{ACTIVE_DIDS}}", // e.g. 3
DIDS: [ // array of DID objects
{
number: "{{DID_NUMBER}}",
status: "{{DID_STATUS}}", // "active" | "inactive"
statusColor: "{{DID_STATUS_COLOR}}", // css class, e.g. "bg-green-500"
cnam: "{{DID_CNAM}}", // editable caller-name
cid: "{{DID_CID}}"
}
],
// 3. Stats
TOTAL_CALLS: "{{TOTAL_CALLS}}",
CALLS_TREND_ICON: "{{CALLS_TREND_ICON}}", // "fa-arrow-up" | "fa-arrow-down"
CALLS_TREND_CLASS:"{{CALLS_TREND_CLASS}}", // "text-green-500" | "text-red-500"
CALLS_TREND_VALUE:"{{CALLS_TREND_VALUE}}", // e.g. "+12%"
TOTAL_MESSAGES: "{{TOTAL_MESSAGES}}",
MESSAGES_TREND_ICON: "{{MESSAGES_TREND_ICON}}",
MESSAGES_TREND_CLASS: "{{MESSAGES_TREND_CLASS}}",
MESSAGES_TREND_VALUE: "{{MESSAGES_TREND_VALUE}}",
DIDS_TREND_ICON: "{{DIDS_TREND_ICON}}",
DIDS_TREND_CLASS: "{{DIDS_TREND_CLASS}}",
DIDS_TREND_VALUE: "{{DIDS_TREND_VALUE}}",
// 4. Messaging
CHAT_CONTACT_NAME: "{{CHAT_CONTACT_NAME}}",
CHAT_INITIALS: "{{CHAT_INITIALS}}",
CHAT_STATUS_CLASS: "{{CHAT_STATUS_CLASS}}", // "text-green-500" | "text-red-500"
CHAT_STATUS_DOT_CLASS:"{{CHAT_STATUS_DOT_CLASS}}", // "bg-green-500" etc.
CHAT_STATUS_TEXT: "{{CHAT_STATUS_TEXT}}", // "Online" | "Offline"
CHAT_LAST_MESSAGE_TIME: "{{CHAT_LAST_MESSAGE_TIME}}",
CHAT_LAST_MESSAGE_PREVIEW:"{{CHAT_LAST_MESSAGE_PREVIEW}}",
MESSAGES: [ // chronological array
{
id: "{{MESSAGE_ID}}",
text: "{{MESSAGE_TEXT}}",
time: "{{MESSAGE_TIME}}",
sender: "{{MESSAGE_SENDER}}", // "me" | "them"
type: "{{MESSAGE_TYPE}}" // "text" | "image" | "audio" | "video"
}
],
// 5. Activity Feed
ACTIVITY_FEED: [
{
title: "{{ACTIVITY_TITLE}}",
description: "{{ACTIVITY_DESCRIPTION}}",
time: "{{ACTIVITY_TIME}}"
}
],
// 6. Media URLs (for voice/video)
VOICE_STREAM_URL: "{{VOICE_STREAM_URL}}", // WebRTC endpoint for calls
VIDEO_STREAM_URL: "{{VIDEO_STREAM_URL}}",
TTS_ENDPOINT: "{{TTS_ENDPOINT}}", // POST text β†’ returns audio blob
STT_ENDPOINT: "{{STT_ENDPOINT}}" // POST audio β†’ returns text
};
/*******************************************************************************
* Runtime glue – do not edit unless extending functionality
******************************************************************************/
document.getElementById('userEmail').textContent = BP.ACCOUNT_EMAIL;
document.getElementById('balance').textContent = BP.ACCOUNT_BALANCE;
// Populate DID list
const didList = document.querySelector('.YOUR_DIDs ul');
didList.innerHTML = '';
BP.DIDS.forEach(d => {
const li = document.createElement('li');
li.innerHTML = `
<button class="w-full text-left px-4 py-2 rounded-lg flex items-center gap-3 hover:bg-gray-700 transition">
<div class="w-3 h-3 rounded-full ${d.statusColor}"></div>
<span>${d.number}</span>
</button>`;
didList.appendChild(li);
});
// Populate stats
document.querySelectorAll('.text-2xl.font-bold')[0].textContent = BP.TOTAL_CALLS;
document.querySelectorAll('.text-2xl.font-bold')[1].textContent = BP.TOTAL_MESSAGES;
document.querySelectorAll('.text-2xl.font-bold')[2].textContent = BP.ACTIVE_DIDS;
// Populate activity feed
const activityContainer = document.querySelector('.space-y-4');
activityContainer.innerHTML = '';
BP.ACTIVITY_FEED.forEach(a => {
const div = document.createElement('div');
div.className = 'flex items-start gap-4';
div.innerHTML = `
<div class="w-10 h-10 rounded-full bg-green-500/20 flex items-center justify-center">
<i class="fas fa-sms text-green-500"></i>
</div>
<div>
<p class="font-medium">${a.title}</p>
<p class="text-gray-400 text-sm">${a.description}</p>
<p class="text-gray-500 text-xs mt-1">${a.time}</p>
</div>`;
activityContainer.appendChild(div);
});
// Send message – uses live data
const messageInput = document.querySelector('input[placeholder="Type a message..."]');
const sendButton = document.querySelector('.fa-paper-plane').closest('button');
sendButton.addEventListener('click', () => sendMessage(messageInput.value));
messageInput.addEventListener('keypress', e => { if (e.key === 'Enter') sendMessage(messageInput.value); });
function sendMessage(text) {
if (!text.trim()) return;
fetch('/send', { method:'POST', body: JSON.stringify({did: BP.DIDS[0]?.number, text}) });
messageInput.value = '';
}
</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=RobinsAIWorld/voipms" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>