percertain / index.html
paradiseDev's picture
Add 2 files
69f00f6 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Web App Factory</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 src="https://cdn.jsdelivr.net/npm/ace-builds@1.24.0/src-min-noconflict/ace.min.js"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #6e8efb, #a777e3);
}
.editor {
height: 400px;
width: 100%;
border-radius: 0.5rem;
}
.plugin-card: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);
}
.domain-input::placeholder {
color: #9CA3AF;
}
.preview-frame {
height: 400px;
background-color: #f3f4f6;
border-radius: 0.5rem;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<!-- Navigation -->
<nav class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-robot text-2xl"></i>
<span class="text-xl font-bold">AI Web Factory</span>
</div>
<div class="hidden md:flex space-x-6">
<a href="#" class="hover:text-gray-200">Dashboard</a>
<a href="#" class="hover:text-gray-200">Templates</a>
<a href="#" class="hover:text-gray-200">Plugins</a>
<a href="#" class="hover:text-gray-200">Domains</a>
<a href="#" class="hover:text-gray-200">Docs</a>
</div>
<div class="flex items-center space-x-4">
<button class="bg-white text-purple-600 px-4 py-2 rounded-full font-medium hover:bg-gray-100 transition">
Sign In
</button>
<button class="hidden md:block bg-purple-800 text-white px-4 py-2 rounded-full font-medium hover:bg-purple-900 transition">
Get Started
</button>
<button class="md:hidden text-white">
<i class="fas fa-bars text-xl"></i>
</button>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<div class="text-center mb-12">
<h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-4">Build AI-Powered Web Apps in Minutes</h1>
<p class="text-xl text-gray-600 max-w-3xl mx-auto">
Create, customize and deploy AI applications with our simple DSL and host them on your own wildcard domains.
</p>
</div>
<!-- Editor Section -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
<!-- Code Editor -->
<div class="bg-white rounded-xl shadow-lg p-6">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-semibold text-gray-800">AI App DSL Editor</h2>
<div class="flex space-x-2">
<button class="bg-gray-100 text-gray-700 px-3 py-1 rounded-md text-sm hover:bg-gray-200">
<i class="fas fa-save mr-1"></i> Save
</button>
<button class="bg-purple-600 text-white px-3 py-1 rounded-md text-sm hover:bg-purple-700">
<i class="fas fa-play mr-1"></i> Run
</button>
</div>
</div>
<div id="editor" class="editor">app "AI Image Generator" {
layout {
header {
title "Create Stunning AI Art"
description "Generate unique images with our AI technology"
}
section {
input "Prompt" as prompt placeholder="Describe what you want to generate"
dropdown "Style" as style options=["Realistic", "Cartoon", "Abstract", "3D Render"]
slider "Creativity" as creativity min=0 max=100 step=5 value=50
button "Generate" action {
call ai.image.generate {
prompt: $prompt
style: $style
creativity: $creativity
}
}
}
}
plugins {
use ai.image
use ai.text.completion
}
}</div>
</div>
<!-- Preview -->
<div class="bg-white rounded-xl shadow-lg p-6">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-semibold text-gray-800">Live Preview</h2>
<div class="flex items-center space-x-2">
<span class="text-sm text-gray-500">Responsive:</span>
<div class="flex bg-gray-100 rounded-md p-1">
<button class="px-2 py-1 text-xs rounded-md bg-white shadow">Desktop</button>
<button class="px-2 py-1 text-xs rounded-md">Tablet</button>
<button class="px-2 py-1 text-xs rounded-md">Mobile</button>
</div>
</div>
</div>
<div class="preview-frame flex items-center justify-center">
<div class="text-center p-6 max-w-md">
<h3 class="text-2xl font-bold text-gray-800 mb-2">Create Stunning AI Art</h3>
<p class="text-gray-600 mb-6">Generate unique images with our AI technology</p>
<div class="space-y-4 text-left">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Prompt</label>
<input type="text" placeholder="Describe what you want to generate" class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Style</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded-md">
<option>Realistic</option>
<option>Cartoon</option>
<option>Abstract</option>
<option>3D Render</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Creativity: 50</label>
<input type="range" min="0" max="100" value="50" step="5" class="w-full">
</div>
<button class="w-full bg-purple-600 text-white py-2 px-4 rounded-md hover:bg-purple-700">
Generate
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Domain Configuration -->
<div class="bg-white rounded-xl shadow-lg p-6 mb-12">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Domain Configuration</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="border border-gray-200 rounded-lg p-4">
<div class="flex items-center mb-3">
<div class="bg-purple-100 p-2 rounded-full mr-3">
<i class="fas fa-globe text-purple-600"></i>
</div>
<h3 class="font-medium">Custom Domain</h3>
</div>
<p class="text-gray-600 text-sm mb-4">Use your own domain for your AI applications</p>
<div class="flex">
<input type="text" placeholder="yourdomain.com" class="flex-grow px-3 py-2 border border-gray-300 rounded-l-md domain-input">
<button class="bg-purple-600 text-white px-4 py-2 rounded-r-md hover:bg-purple-700">Add</button>
</div>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<div class="flex items-center mb-3">
<div class="bg-blue-100 p-2 rounded-full mr-3">
<i class="fas fa-asterisk text-blue-600"></i>
</div>
<h3 class="font-medium">Wildcard Subdomains</h3>
</div>
<p class="text-gray-600 text-sm mb-4">Enable *.yourdomain.com for dynamic app creation</p>
<div class="flex items-center">
<div class="flex-grow">
<div class="text-sm font-medium text-gray-700 mb-1">Status: <span class="text-green-600">Active</span></div>
<div class="text-xs text-gray-500">apps.yourdomain.com</div>
</div>
<button class="bg-blue-600 text-white p-2 rounded-full hover:bg-blue-700">
<i class="fas fa-cog"></i>
</button>
</div>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<div class="flex items-center mb-3">
<div class="bg-green-100 p-2 rounded-full mr-3">
<i class="fas fa-shield-alt text-green-600"></i>
</div>
<h3 class="font-medium">SSL Certificate</h3>
</div>
<p class="text-gray-600 text-sm mb-4">Automatic HTTPS for all your domains</p>
<div class="flex items-center">
<div class="flex-grow">
<div class="text-sm font-medium text-gray-700 mb-1">Status: <span class="text-green-600">Active</span></div>
<div class="text-xs text-gray-500">Auto-renewing</div>
</div>
<button class="bg-green-600 text-white p-2 rounded-full hover:bg-green-700">
<i class="fas fa-sync-alt"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Plugin Marketplace -->
<div class="bg-white rounded-xl shadow-lg p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-semibold text-gray-800">AI Plugin Marketplace</h2>
<div class="relative">
<input type="text" placeholder="Search plugins..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-md w-64">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Plugin Cards -->
<div class="plugin-card border border-gray-200 rounded-lg p-4 transition duration-300">
<div class="flex items-start mb-3">
<div class="bg-pink-100 p-2 rounded-full mr-3">
<i class="fas fa-image text-pink-600"></i>
</div>
<div>
<h3 class="font-medium">AI Image Generator</h3>
<div class="flex items-center mt-1">
<div class="flex items-center text-yellow-400 text-sm mr-2">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star-half-alt"></i>
</div>
<span class="text-gray-500 text-xs">(142)</span>
</div>
</div>
</div>
<p class="text-gray-600 text-sm mb-4">Generate high-quality images from text prompts with various styles and options.</p>
<div class="flex justify-between items-center">
<span class="text-sm font-medium">Free</span>
<button class="text-sm bg-pink-600 text-white px-3 py-1 rounded-md hover:bg-pink-700">
Add to App
</button>
</div>
</div>
<div class="plugin-card border border-gray-200 rounded-lg p-4 transition duration-300">
<div class="flex items-start mb-3">
<div class="bg-blue-100 p-2 rounded-full mr-3">
<i class="fas fa-comment-dots text-blue-600"></i>
</div>
<div>
<h3 class="font-medium">Text Completion</h3>
<div class="flex items-center mt-1">
<div class="flex items-center text-yellow-400 text-sm mr-2">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="far fa-star"></i>
</div>
<span class="text-gray-500 text-xs">(89)</span>
</div>
</div>
</div>
<p class="text-gray-600 text-sm mb-4">Advanced text generation for content creation, code completion, and more.</p>
<div class="flex justify-between items-center">
<span class="text-sm font-medium">Premium</span>
<button class="text-sm bg-blue-600 text-white px-3 py-1 rounded-md hover:bg-blue-700">
Add to App
</button>
</div>
</div>
<div class="plugin-card border border-gray-200 rounded-lg p-4 transition duration-300">
<div class="flex items-start mb-3">
<div class="bg-purple-100 p-2 rounded-full mr-3">
<i class="fas fa-chart-network text-purple-600"></i>
</div>
<div>
<h3 class="font-medium">Knowledge Graph</h3>
<div class="flex items-center mt-1">
<div class="flex items-center text-yellow-400 text-sm mr-2">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
</div>
<span class="text-gray-500 text-xs">(56)</span>
</div>
</div>
</div>
<p class="text-gray-600 text-sm mb-4">Connect and query structured knowledge with semantic relationships.</p>
<div class="flex justify-between items-center">
<span class="text-sm font-medium">Free</span>
<button class="text-sm bg-purple-600 text-white px-3 py-1 rounded-md hover:bg-purple-700">
Add to App
</button>
</div>
</div>
<div class="plugin-card border border-gray-200 rounded-lg p-4 transition duration-300">
<div class="flex items-start mb-3">
<div class="bg-green-100 p-2 rounded-full mr-3">
<i class="fas fa-video text-green-600"></i>
</div>
<div>
<h3 class="font-medium">Video Generation</h3>
<div class="flex items-center mt-1">
<div class="flex items-center text-yellow-400 text-sm mr-2">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star-half-alt"></i>
<i class="far fa-star"></i>
</div>
<span class="text-gray-500 text-xs">(34)</span>
</div>
</div>
</div>
<p class="text-gray-600 text-sm mb-4">Create short video clips from text or image prompts with animations.</p>
<div class="flex justify-between items-center">
<span class="text-sm font-medium">Premium</span>
<button class="text-sm bg-green-600 text-white px-3 py-1 rounded-md hover:bg-green-700">
Add to App
</button>
</div>
</div>
<div class="plugin-card border border-gray-200 rounded-lg p-4 transition duration-300">
<div class="flex items-start mb-3">
<div class="bg-red-100 p-2 rounded-full mr-3">
<i class="fas fa-eye text-red-600"></i>
</div>
<div>
<h3 class="font-medium">Computer Vision</h3>
<div class="flex items-center mt-1">
<div class="flex items-center text-yellow-400 text-sm mr-2">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="far fa-star"></i>
</div>
<span class="text-gray-500 text-xs">(67)</span>
</div>
</div>
</div>
<p class="text-gray-600 text-sm mb-4">Analyze images for objects, faces, text, and other visual elements.</p>
<div class="flex justify-between items-center">
<span class="text-sm font-medium">Free</span>
<button class="text-sm bg-red-600 text-white px-3 py-1 rounded-md hover:bg-red-700">
Add to App
</button>
</div>
</div>
<div class="plugin-card border border-gray-200 rounded-lg p-4 transition duration-300">
<div class="flex items-start mb-3">
<div class="bg-yellow-100 p-2 rounded-full mr-3">
<i class="fas fa-database text-yellow-600"></i>
</div>
<div>
<h3 class="font-medium">Data Analysis</h3>
<div class="flex items-center mt-1">
<div class="flex items-center text-yellow-400 text-sm mr-2">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
</div>
<span class="text-gray-500 text-xs">(112)</span>
</div>
</div>
</div>
<p class="text-gray-600 text-sm mb-4">Process and visualize datasets with natural language queries.</p>
<div class="flex justify-between items-center">
<span class="text-sm font-medium">Free</span>
<button class="text-sm bg-yellow-600 text-white px-3 py-1 rounded-md hover:bg-yellow-700">
Add to App
</button>
</div>
</div>
</div>
<div class="text-center mt-8">
<button class="bg-gray-100 text-gray-700 px-6 py-2 rounded-md font-medium hover:bg-gray-200">
View All Plugins (48)
</button>
</div>
</div>
</main>
<!-- Footer -->
<footer class="gradient-bg text-white mt-16">
<div class="container mx-auto px-4 py-12">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="text-lg font-semibold mb-4">AI Web Factory</h3>
<p class="text-gray-200 text-sm">
The fastest way to build and deploy AI-powered web applications with custom domains.
</p>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Product</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Features</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Pricing</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Templates</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Plugins</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Resources</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Documentation</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Tutorials</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">API Reference</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Community</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Company</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-200 hover:text-white text-sm">About</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Blog</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Careers</a></li>
<li><a href="#" class="text-gray-200 hover:text-white text-sm">Contact</a></li>
</ul>
</div>
</div>
<div class="border-t border-gray-700 mt-12 pt-8 flex flex-col md:flex-row justify-between items-center">
<div class="text-gray-300 text-sm mb-4 md:mb-0">
© 2023 AI Web Factory. All rights reserved.
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-github"></i></a>
<a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-discord"></i></a>
<a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-linkedin"></i></a>
</div>
</div>
</div>
</footer>
<script>
// Initialize ACE Editor
const editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.session.setMode("ace/mode/javascript");
editor.setOptions({
fontSize: "14px",
fontFamily: "'Fira Code', monospace",
enableBasicAutocompletion: true,
enableLiveAutocompletion: true,
showPrintMargin: false,
tabSize: 2
});
// Add DSL syntax highlighting rules
const customMode = {
getTokenizer: function() {
return {
getLineTokens: function(line, state) {
const keywords = "app|layout|header|section|input|dropdown|slider|button|action|call|plugins|use";
const types = "title|description|placeholder|options|min|max|step|value|prompt|style|creativity";
const keywordRegex = new RegExp(`\\b(${keywords})\\b`, "g");
const typeRegex = new RegExp(`\\b(${types})\\b`, "g");
const stringRegex = /(["'])(?:(?=(\\?))\2.)*?\1/g;
const numberRegex = /\b\d+\b/g;
const tokens = [];
let lastIndex = 0;
// Match keywords
let match;
while ((match = keywordRegex.exec(line)) !== null) {
if (match.index > lastIndex) {
tokens.push({type: "text", value: line.substring(lastIndex, match.index)});
}
tokens.push({type: "keyword", value: match[0]});
lastIndex = match.index + match[0].length;
}
// Match types
lastIndex = 0;
while ((match = typeRegex.exec(line)) !== null) {
if (match.index > lastIndex) {
tokens.push({type: "text", value: line.substring(lastIndex, match.index)});
}
tokens.push({type: "type", value: match[0]});
lastIndex = match.index + match[0].length;
}
// Match strings
lastIndex = 0;
while ((match = stringRegex.exec(line)) !== null) {
if (match.index > lastIndex) {
tokens.push({type: "text", value: line.substring(lastIndex, match.index)});
}
tokens.push({type: "string", value: match[0]});
lastIndex = match.index + match[0].length;
}
// Match numbers
lastIndex = 0;
while ((match = numberRegex.exec(line)) !== null) {
if (match.index > lastIndex) {
tokens.push({type: "text", value: line.substring(lastIndex, match.index)});
}
tokens.push({type: "number", value: match[0]});
lastIndex = match.index + match[0].length;
}
if (lastIndex < line.length) {
tokens.push({type: "text", value: line.substring(lastIndex)});
}
return {tokens: tokens, state: state};
}
};
}
};
// Apply custom mode
editor.session.setMode(new ace.require("ace/mode/javascript").Mode());
// Add DSL-specific completions
const langTools = ace.require("ace/ext/language_tools");
const completer = {
getCompletions: function(editor, session, pos, prefix, callback) {
const completions = [
{value: "app", meta: "DSL Keyword"},
{value: "layout", meta: "DSL Keyword"},
{value: "header", meta: "DSL Keyword"},
{value: "section", meta: "DSL Keyword"},
{value: "input", meta: "DSL Keyword"},
{value: "dropdown", meta: "DSL Keyword"},
{value: "slider", meta: "DSL Keyword"},
{value: "button", meta: "DSL Keyword"},
{value: "action", meta: "DSL Keyword"},
{value: "call", meta: "DSL Keyword"},
{value: "plugins", meta: "DSL Keyword"},
{value: "use", meta: "DSL Keyword"},
{value: "title", meta: "DSL Property"},
{value: "description", meta: "DSL Property"},
{value: "placeholder", meta: "DSL Property"},
{value: "options", meta: "DSL Property"},
{value: "min", meta: "DSL Property"},
{value: "max", meta: "DSL Property"},
{value: "step", meta: "DSL Property"},
{value: "value", meta: "DSL Property"},
{value: "prompt", meta: "DSL Property"},
{value: "style", meta: "DSL Property"},
{value: "creativity", meta: "DSL Property"},
{value: "ai.image", meta: "AI Plugin"},
{value: "ai.text.completion", meta: "AI Plugin"},
{value: "ai.video", meta: "AI Plugin"},
{value: "ai.vision", meta: "AI Plugin"},
{value: "ai.speech", meta: "AI Plugin"},
{value: "ai.knowledge", meta: "AI Plugin"},
{value: "ai.data", meta: "AI Plugin"}
];
callback(null, completions);
}
};
langTools.addCompleter(completer);
// Handle plugin card clicks
document.querySelectorAll('.plugin-card button').forEach(button => {
button.addEventListener('click', function() {
const pluginName = this.closest('.plugin-card').querySelector('h3').textContent;
const pluginId = pluginName.toLowerCase().replace(/\s+/g, '.');
// Add plugin to the editor
const cursor = editor.getCursorPosition();
const session = editor.getSession();
// Find the plugins block or create one
const content = session.getValue();
const pluginsIndex = content.indexOf('plugins');
if (pluginsIndex === -1) {
// Add plugins block at the end
const insertPos = session.getLength() - 1;
session.insert({row: insertPos, column: 0}, `\n\n plugins {\n use ${pluginId}\n }`);
} else {
// Find the closing brace of the plugins block
const lines = content.split('\n');
let braceLine = -1;
for (let i = pluginsIndex; i < lines.length; i++) {
if (lines[i].includes('}')) {
braceLine = i;
break;
}
}
if (braceLine !== -1) {
// Insert before the closing brace
session.insert({row: braceLine, column: 0}, ` use ${pluginId}\n`);
}
}
// Show notification
const notification = document.createElement('div');
notification.className = 'fixed bottom-4 right-4 bg-green-600 text-white px-4 py-2 rounded-md shadow-lg';
notification.textContent = `Added ${pluginName} plugin to your app`;
document.body.appendChild(notification);
setTimeout(() => {
notification.classList.add('opacity-0', 'transition-opacity', 'duration-300');
setTimeout(() => notification.remove(), 300);
}, 3000);
});
});
</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=paradiseDev/percertain" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>