nexus / index.html
Rebaone's picture
Create an A.I that manages my phone - Initial Deployment
a9dd040 verified
Raw History Blame Contribute Delete
17 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NexusAI - Your Smartphone Assistant</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>
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.pulse-animation {
animation: pulse 2s infinite;
}
.conversation-container {
height: calc(100vh - 280px);
}
@media (max-width: 640px) {
.conversation-container {
height: calc(100vh - 240px);
}
}
.typing-indicator span {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #4b5563;
margin: 0 2px;
animation: bounce 1.5s infinite ease-in-out;
}
.typing-indicator span:nth-child(1) {
animation-delay: 0s;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
</style>
</head>
<body class="bg-gray-100 text-gray-800 font-sans">
<div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden h-screen flex flex-col">
<!-- Header -->
<div class="bg-indigo-600 text-white p-4 flex items-center justify-between">
<div class="flex items-center">
<div class="relative w-10 h-10 mr-3">
<div class="absolute inset-0 bg-indigo-400 rounded-full"></div>
<div class="absolute inset-1 bg-indigo-200 rounded-full flex items-center justify-center">
<i class="fas fa-robot text-indigo-700"></i>
</div>
</div>
<div>
<h1 class="font-bold text-lg">NexusAI</h1>
<p class="text-xs opacity-75">Your Smartphone Manager</p>
</div>
</div>
<div class="flex space-x-2">
<span class="w-2 h-2 bg-green-400 rounded-full"></span>
<span class="w-2 h-2 bg-yellow-400 rounded-full"></span>
<span class="w-2 h-2 bg-red-400 rounded-full"></span>
</div>
</div>
<!-- Device Status Bar -->
<div class="bg-indigo-50 p-3 border-b border-indigo-100 flex justify-between items-center">
<div class="flex items-center space-x-2 text-sm">
<span class="bg-green-100 text-green-800 px-2 py-1 rounded-full flex items-center">
<i class="fas fa-battery-three-quarters text-xs mr-1"></i>
<span>87%</span>
</span>
<span class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full flex items-center">
<i class="fas fa-wifi text-xs mr-1"></i>
<span>Strong</span>
</span>
</div>
<div class="text-xs text-indigo-600 font-medium">
Last optimized: Today, 3:42 PM
</div>
</div>
<!-- Conversation Area -->
<div class="flex-1 overflow-y-auto p-4 conversation-container space-y-3">
<!-- AI Introduction -->
<div class="flex items-start space-x-2">
<div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0">
<i class="fas fa-robot text-indigo-600"></i>
</div>
<div class="bg-indigo-50 rounded-lg p-3 max-w-xs">
<p class="text-sm">Hello! I'm NexusAI, your personal smartphone assistant. I can help optimize performance, manage apps, analyze usage, and more. How can I assist you today?</p>
</div>
</div>
<!-- Quick Actions -->
<div class="flex justify-center mt-2">
<div class="grid grid-cols-2 gap-2 w-full max-w-xs">
<button class="quick-action bg-green-50 text-green-700 border border-green-200 rounded-lg py-2 px-3 text-xs flex items-center justify-center">
<i class="fas fa-broom mr-1"></i> Clean Storage
</button>
<button class="quick-action bg-purple-50 text-purple-700 border border-purple-200 rounded-lg py-2 px-3 text-xs flex items-center justify-center">
<i class="fas fa-battery-full mr-1"></i> Save Battery
</button>
<button class="quick-action bg-blue-50 text-blue-700 border border-blue-200 rounded-lg py-2 px-3 text-xs flex items-center justify-center">
<i class="fas fa-chart-line mr-1"></i> Usage Stats
</button>
<button class="quick-action bg-yellow-50 text-yellow-700 border border-yellow-200 rounded-lg py-2 px-3 text-xs flex items-center justify-center">
<i class="fas fa-shield-alt mr-1"></i> Security Scan
</button>
</div>
</div>
<!-- Typing Indicator -->
<div id="typingIndicator" class="flex items-start space-x-2 hidden">
<div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0">
<i class="fas fa-robot text-indigo-600"></i>
</div>
<div class="bg-indigo-50 rounded-lg p-3">
<div class="typing-indicator flex">
<span></span>
<span></span>
<span></span>
</div>
</div>
</div>
</div>
<!-- Input Area -->
<div class="border-t border-gray-200 p-3 bg-white">
<div class="relative">
<input
id="userInput"
type="text"
placeholder="Ask NexusAI to manage your phone..."
class="w-full pl-4 pr-12 py-3 bg-gray-50 rounded-full border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-300 focus:border-transparent"
>
<button
id="sendButton"
class="absolute right-2 top-1/2 transform -translate-y-1/2 bg-indigo-600 text-white w-8 h-8 rounded-full flex items-center justify-center hover:bg-indigo-700 transition-colors"
>
<i class="fas fa-paper-plane"></i>
</button>
</div>
<!-- Suggestions -->
<div class="mt-2 flex overflow-x-auto pb-1 space-x-2 scrollbar-hide">
<button class="suggestion-btn whitespace-nowrap text-xs bg-gray-100 hover:bg-gray-200 rounded-full px-3 py-1 transition-colors">
Clean up storage
</button>
<button class="suggestion-btn whitespace-nowrap text-xs bg-gray-100 hover:bg-gray-200 rounded-full px-3 py-1 transition-colors">
Show battery usage
</button>
<button class="suggestion-btn whitespace-nowrap text-xs bg-gray-100 hover:bg-gray-200 rounded-full px-3 py-1 transition-colors">
Delete unused apps
</button>
</div>
</div>
<!-- Bottom Navigation -->
<div class="border-t border-gray-200 bg-white flex justify-around">
<button class="px-4 py-3 text-center text-indigo-600 border-b-2 border-indigo-600">
<i class="fas fa-comment-dots block text-lg mb-1"></i>
<span class="text-xs">Chat</span>
</button>
<button class="px-4 py-3 text-center text-gray-500 hover:text-indigo-600">
<i class="fas fa-chart-pie block text-lg mb-1"></i>
<span class="text-xs">Analytics</span>
</button>
<button class="px-4 py-3 text-center text-gray-500 hover:text-indigo-600">
<i class="fas fa-sliders-h block text-lg mb-1"></i>
<span class="text-xs">Settings</span>
</button>
<button class="px-4 py-3 text-center text-gray-500 hover:text-indigo-600">
<i class="fas fa-info-circle block text-lg mb-1"></i>
<span class="text-xs">About</span>
</button>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const userInput = document.getElementById('userInput');
const sendButton = document.getElementById('sendButton');
const conversationContainer = document.querySelector('.conversation-container');
const typingIndicator = document.getElementById('typingIndicator');
const quickActions = document.querySelectorAll('.quick-action');
const suggestionButtons = document.querySelectorAll('.suggestion-btn');
// Add user message to conversation
function addUserMessage(message) {
const messageDiv = document.createElement('div');
messageDiv.className = 'flex items-start justify-end space-x-2';
messageDiv.innerHTML = `
<div class="bg-indigo-100 rounded-lg p-3 max-w-xs">
<p class="text-sm">${message}</p>
</div>
<div class="bg-gray-200 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0">
<i class="fas fa-user text-gray-600"></i>
</div>
`;
conversationContainer.appendChild(messageDiv);
conversationContainer.scrollTop = conversationContainer.scrollHeight;
}
// Add AI response to conversation
function addAIResponse(response) {
typingIndicator.classList.add('hidden');
const responseDiv = document.createElement('div');
responseDiv.className = 'flex items-start space-x-2';
responseDiv.innerHTML = `
<div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0">
<i class="fas fa-robot text-indigo-600"></i>
</div>
<div class="bg-indigo-50 rounded-lg p-3 max-w-xs">
<p class="text-sm">${response}</p>
</div>
`;
conversationContainer.appendChild(responseDiv);
conversationContainer.scrollTop = conversationContainer.scrollHeight;
}
// Process user input
function processInput() {
const message = userInput.value.trim();
if (message === '') return;
addUserMessage(message);
userInput.value = '';
// Show typing indicator
typingIndicator.classList.remove('hidden');
conversationContainer.scrollTop = conversationContainer.scrollHeight;
// Simulate AI thinking time
setTimeout(() => {
// Simple responses based on keywords
let response = '';
if (message.toLowerCase().includes('clean') || message.toLowerCase().includes('storage')) {
response = `I can help with that. Scanning storage now... Found 2.3GB of junk files. Would you like me to clean them now?`;
}
else if (message.toLowerCase().includes('battery') || message.toLowerCase().includes('save')) {
response = `Your battery is currently at 87%. I detect 3 apps running in background that are draining battery. Want me to optimize them?`;
}
else if (message.toLowerCase().includes('usage') || message.toLowerCase().includes('stats')) {
response = `Here's your phone usage today: Screen time: 4h 23m, Most used app: Instagram (1h 45m), Battery used: 65%`;
}
else if (message.toLowerCase().includes('security') || message.toLowerCase().includes('scan')) {
response = `Running security scan... All apps are verified. No malware detected. Your device is secure.`;
}
else if (message.toLowerCase().includes('app') || message.toLowerCase().includes('delete')) {
response = `You have 12 apps you haven't used in over a month. I can safely uninstall these to free up 1.8GB of space. Shall I proceed?`;
}
else if (message.toLowerCase().includes('hello') || message.toLowerCase().includes('hi')) {
response = `Hello! How can I help manage your phone today? You can ask me to clean storage, optimize battery, show usage stats, or help with any other phone management tasks.`;
}
else {
response = `I'm your phone management assistant. I can help with storage cleaning, battery optimization, usage statistics, app management, and security checks. Could you be more specific about what you'd like me to do?`;
}
addAIResponse(response);
}, 1500);
}
// Event listeners
sendButton.addEventListener('click', processInput);
userInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
processInput();
}
});
// Quick actions
quickActions.forEach(button => {
button.addEventListener('click', function() {
const action = this.textContent.trim();
addUserMessage(action);
userInput.value = '';
typingIndicator.classList.remove('hidden');
setTimeout(() => {
let response = '';
switch(action) {
case 'Clean Storage':
response = `Found 1.8GB of temporary files and cache. I can free up this space immediately. Do you want to proceed?`;
break;
case 'Save Battery':
response = `Detected 4 battery-draining background apps. Optimizing them can extend battery life by ~2 hours today. Should I do this now?`;
break;
case 'Usage Stats':
response = `Today's usage: Screen On: 3h 42m | Top apps: Instagram (1h12m), YouTube (58m), Chrome (37m) | Battery used: 72%`;
break;
case 'Security Scan':
response = `Scan complete! No threats found. All apps are verified and up-to-date. Your device is secure.`;
break;
}
addAIResponse(response);
}, 1500);
});
});
// Suggestion buttons
suggestionButtons.forEach(button => {
button.addEventListener('click', function() {
userInput.value = this.textContent.trim();
userInput.focus();
});
});
});
</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=Rebaone/nexus" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>