humair025 commited on
Commit
3bcd9f9
·
verified ·
1 Parent(s): 6f9a3de

import requests

Browse files

import json
import time
from typing import Dict, Any, Optional, Iterator, List, Union
from dataclasses import dataclass, field
from urllib.parse import urlencode, quote

@dataclass
class Message:
"""Represents a chat message"""
role: str
content: Union[str, List[Dict[str, Any]]]

@dataclass
class ChatCompletionChunk:
"""Represents a streaming chunk from the API"""
id: str
object: str
created: int
model: str
choices: List[Dict[str, Any]]
system_fingerprint: Optional[str] = None
prompt_filter_results: Optional[List[Dict[str, Any]]] = None

def get_content(self) -> str:
"""Extract content from the first choice delta"""
if self.choices and len(self.choices) > 0:
delta = self.choices[0].get('delta', {})
return delta.get('content', '')
return ''

def is_finished(self) -> bool:
"""Check if this chunk indicates completion"""
if self.choices and len(self.choices) > 0:
return self.choices[0].get('finish_reason') is not None
return False

class PollinationClient:
"""Enhanced client for interacting with pollinations.ai API, with improved features and support for more endpoints."""

def __init__(
self,
base_url: str = "https://text.pollinations.ai/openai/v1/chat/completions",
token: Optional[str] = None,
referrer: Optional[str] = None
):
self.base_url = base_url.rstrip('/')
self.token = token
self.referrer = referrer
self.session = requests.Session()
if self.token:
self.session.headers.update({"Authorization": f"Bearer {self.token}"})

def _parse_sse_line(self, line: str) -> Optional[Dict[str, Any]]:
"""Parse a single SSE line"""
line = line.strip()
if not line or line.startswith(':'):
return None

if line.startswith('data: '):
data_str = line[6:] # Remove 'data: ' prefix
if data_str.strip() == '[DONE]':
return {'done': True}
try:
return json.loads(data_str)
except json.JSONDecodeError:
return None

return None

def chat_completion(
self,
messages: List[Message],
model: str = "gpt-4o",
stream: bool = True,
temperature: float = 0.7,
max_tokens: Optional[int] = 12000,
top_p: Optional[float] = None,
frequency_penalty: Optional[float] = None,
presence_penalty: Optional[float] = None,
stop: Optional[List[str]] = None,
seed: Optional[int] = None,
response_format: Optional[Dict[str, str]] = None,
tools: Optional[List[Dict[str, Any]]] = None,
tool_choice: Optional[Union[str, Dict[str, Any]]] = None,
private: bool = False,
**kwargs
) -> Iterator[ChatCompletionChunk]:
"""
Create a chat completion with streaming support. Enhanced with support for multimodal inputs (vision, audio),
tools, JSON mode, seed, private mode, and more.

Args:
messages: List of Message objects (content can be str or list for multimodal)
model: Model to use (default: gpt-4o, other options like mistral, claude-hybridspace)
stream: Whether to stream responses (default: True)
temperature: Sampling temperature (default: 0.7)
max_tokens: Maximum tokens to generate
top_p: Top-p sampling parameter
frequency_penalty: Frequency penalty
presence_penalty: Presence penalty
stop: Stop sequences
seed: Seed for reproducible results
response_format: Response format, e.g., {"type": "json_object"} for JSON mode
tools: List of tools for function calling
tool_choice: Tool choice configuration
private: If True, prevent response from appearing in public feed
**kwargs: Additional parameters

Yields:
ChatCompletionChunk objects
"""
# Convert messages to the format expected by the API
formatted_messages = []
for msg in messages:
formatted_messages.append({
"role": msg.role,
"content": msg.content
})

# Build query parameters
params = {
"model": model,
"stream": str(stream).lower(),
"temperature": temperature,
"private": str(private).lower(),
}

if self.token:
params["token"] = self.token
if self.referrer:
params["referrer"] = self.referrer

# Add optional parameters
if max_tokens is not None:
params["max_tokens"] = max_tokens
if top_p is not None:
params["top_p"] = top_p
if frequency_penalty is not None:
params["frequency_penalty"] = frequency_penalty
if presence_penalty is not None:
params["presence_penalty"] = presence_penalty
if stop is not None:
params["stop"] = stop
if seed is not None:
params["seed"] = seed

# Add any additional kwargs
params.update(kwargs)

# Build URL with query parameters
query_string = urlencode(params, doseq=True)
url = f"{self.base_url}?{query_string}"

# Prepare request body
payload = {
"messages": formatted_messages
}
if response_format:
payload["response_format"] = response_format
if tools:
payload["tools"] = tools
if tool_choice:
payload["tool_choice"] = tool_choice

# Make streaming request
headers = {
"Content-Type": "application/json",
"Accept": "text/event-stream"
}

try:
response = self.session.post(
url,
json=payload,
headers=headers,
stream=True,
timeout=30
)
response.raise_for_status()

# Process streaming response
for line in response.iter_lines(decode_unicode=True):
if not line:
continue

parsed = self._parse_sse_line(line)
if parsed is None:
continue

if parsed.get('done'):
break

# Convert to ChatCompletionChunk
chunk = ChatCompletionChunk(
id=parsed.get('id', ''),
object=parsed.get('object', ''),
created=parsed.get('created', 0),
model=parsed.get('model', ''),
choices=parsed.get('choices', []),
system_fingerprint=parsed.get('system_fingerprint'),
prompt_filter_results=parsed.get('prompt_filter_results')
)

yield chunk

# Check if completion is finished
if chunk.is_finished():
break

except requests.RequestException as e:
raise ConnectionError(f"Failed to connect to Pollination API: {e}")
except Exception as e:
raise RuntimeError(f"Error processing response: {e}")

def chat_completion_simple(
self,
prompt: str,
model: str = "gpt-4o",
temperature: float = 0.7,
**kwargs
) -> str:
"""
Simple chat completion that returns the full response as a string

Args:
prompt: The prompt to send
model: Model to use
temperature: Sampling temperature
**kwargs: Additional parameters

Returns:
Complete response as a string
"""
messages = [Message(role="user", content=prompt)]

response_content = ""
for chunk in self.chat_completion(
messages=messages,
model=model,
temperature=temperature,
**kwargs
):
response_content += chunk.get_content()

return response_content.strip()

def list_models(self) -> List[Dict[str, Any]]:
"""List available text models"""
url = "https://text.pollinations.ai/models"
response = self.session.get(url)
response.raise_for_status()
return response.json()

def generate_image(
self,
prompt: str,
model: str = "flux",
width: int = 1024,
height: int = 1024,
seed: Optional[int] = None,
nologo: bool = False,
private: bool = False,
enhance: bool = False,
safe: bool = False
) -> bytes:
"""Generate an image and return the image bytes"""
params = {
"model": model,
"width": width,
"height": height,
"seed": seed if seed is not None else "random",
"nologo": str(nologo).lower(),
"private": str(private).lower(),
"enhance": str(enhance).lower(),
"safe": str(safe).lower(),
}
encoded_prompt = quote(prompt)
query_string = urlencode(params)
url = f"https://pollinations.ai/p/{encoded_prompt}?{query_string}"
response = self.session.get(url)
response.raise_for_status()
return response.content

def text_to_speech(
self,
prompt: str,
model: str = "openai-audio",
voice: str = "nova"
) -> bytes:
"""Generate speech audio from text and return audio bytes"""
encoded_prompt = quote(prompt)
params = {
"model": model,
"voice": voice,
}
query_string = urlencode(params)
url = f"https://text.pollinations.ai/{encoded_prompt}?{query_string}"
response = self.session.get(url)
response.raise_for_status()
return response.content

# Helper functions
def create_message(role: str, content: Union[str, List[Dict[str, Any]]]) -> Message:
"""Helper function to create a Message object"""
return Message(role=rol

Files changed (2) hide show
  1. README.md +7 -4
  2. index.html +364 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
  title: Vibecode Studio
3
- emoji: 📊
4
- colorFrom: red
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
  title: Vibecode Studio
3
+ colorFrom: pink
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
index.html CHANGED
@@ -1,19 +1,365 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Vibecode Studio</title>
7
+ <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎨</text></svg>">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
11
+ <script>
12
+ tailwind.config = {
13
+ theme: {
14
+ extend: {
15
+ colors: {
16
+ primary: '#6366f1',
17
+ secondary: '#8b5cf6',
18
+ accent: '#ec4899',
19
+ dark: '#0f172a',
20
+ light: '#f8fafc'
21
+ }
22
+ }
23
+ }
24
+ }
25
+ </script>
26
+ <style>
27
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
28
+ body {
29
+ font-family: 'Inter', sans-serif;
30
+ background-color: #0f172a;
31
+ }
32
+ .glow {
33
+ box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
34
+ }
35
+ .feature-card:hover {
36
+ transform: translateY(-5px);
37
+ transition: all 0.3s ease;
38
+ }
39
+ .typing-cursor::after {
40
+ content: '|';
41
+ animation: blink 1s infinite;
42
+ }
43
+ @keyframes blink {
44
+ 0%, 100% { opacity: 1; }
45
+ 50% { opacity: 0; }
46
+ }
47
+ .code-block {
48
+ background: #1e293b;
49
+ border-radius: 0.5rem;
50
+ padding: 1rem;
51
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
52
+ font-size: 0.875rem;
53
+ line-height: 1.5;
54
+ overflow-x: auto;
55
+ }
56
+ .glow-text {
57
+ text-shadow: 0 0 10px rgba(99, 102, 241, 0.7);
58
+ }
59
+ </style>
60
+ </head>
61
+ <body class="text-light">
62
+ <!-- Navigation -->
63
+ <nav class="fixed w-full z-50 bg-dark/90 backdrop-blur-sm py-4 px-6 flex justify-between items-center">
64
+ <div class="flex items-center space-x-2">
65
+ <div class="w-10 h-10 rounded-full bg-gradient-to-r from-primary to-accent flex items-center justify-center">
66
+ <i data-feather="code" class="text-white"></i>
67
+ </div>
68
+ <span class="text-xl font-bold">Vibecode<span class="text-accent">Studio</span></span>
69
+ </div>
70
+ <div class="hidden md:flex space-x-8">
71
+ <a href="#" class="hover:text-primary transition">Home</a>
72
+ <a href="#" class="hover:text-primary transition">Features</a>
73
+ <a href="#" class="hover:text-primary transition">API</a>
74
+ <a href="#" class="hover:text-primary transition">Pricing</a>
75
+ </div>
76
+ <div class="flex items-center space-x-4">
77
+ <button class="px-4 py-2 rounded-lg bg-primary hover:bg-primary/80 transition">Get Started</button>
78
+ <button id="menu-toggle" class="md:hidden text-light">
79
+ <i data-feather="menu"></i>
80
+ </button>
81
+ </div>
82
+ </nav>
83
+
84
+ <!-- Hero Section -->
85
+ <section id="hero" class="min-h-screen flex items-center pt-16">
86
+ <div class="container mx-auto px-6 py-20 flex flex-col md:flex-row items-center">
87
+ <div class="md:w-1/2 mb-12 md:mb-0">
88
+ <h1 class="text-4xl md:text-6xl font-bold mb-6">
89
+ Code with <span class="text-primary">Vibe</span>, Create with <span class="text-accent">Flow</span>
90
+ </h1>
91
+ <p class="text-xl text-gray-300 mb-8">
92
+ Vibecode Studio is your creative coding companion. Generate, transform, and visualize code with AI-powered tools.
93
+ </p>
94
+ <div class="flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-4">
95
+ <button class="px-8 py-3 rounded-lg bg-primary hover:bg-primary/80 transition font-medium glow">
96
+ Start Coding
97
+ </button>
98
+ <button class="px-8 py-3 rounded-lg bg-dark border border-primary hover:bg-primary/10 transition font-medium">
99
+ View Demo
100
+ </button>
101
+ </div>
102
+ </div>
103
+ <div class="md:w-1/2 flex justify-center">
104
+ <div class="relative">
105
+ <div class="w-80 h-80 rounded-full bg-gradient-to-r from-primary/20 to-accent/20 absolute -top-10 -left-10 blur-3xl"></div>
106
+ <div class="relative bg-dark border border-gray-800 rounded-2xl p-6 w-full max-w-md">
107
+ <div class="flex justify-between items-center mb-4">
108
+ <div class="flex space-x-2">
109
+ <div class="w-3 h-3 rounded-full bg-red-500"></div>
110
+ <div class="w-3 h-3 rounded-full bg-yellow-500"></div>
111
+ <div class="w-3 h-3 rounded-full bg-green-500"></div>
112
+ </div>
113
+ <div class="text-sm text-gray-400">app.js</div>
114
+ </div>
115
+ <div class="code-block">
116
+ <pre class="text-green-400">// Generate creative code with AI</pre>
117
+ <pre class="text-blue-400">const vibe = <span class="text-yellow-300">new</span> <span class="text-purple-400">Vibecode</span>();</pre>
118
+ <pre class="text-blue-400">vibe.<span class="text-yellow-300">generate</span>(<span class="text-green-400">"creative UI"</span>);</pre>
119
+ <pre class="text-gray-400"> .<span class="text-yellow-300">then</span>(<span class="text-blue-400">result</span> => {</pre>
120
+ <pre class="text-gray-400"> <span class="text-yellow-300">console</span>.<span class="text-yellow-300">log</span>(result);</pre>
121
+ <pre class="text-gray-400"> });</pre>
122
+ <pre class="typing-cursor"></pre>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </section>
129
+
130
+ <!-- Features Section -->
131
+ <section class="py-20 bg-dark/50">
132
+ <div class="container mx-auto px-6">
133
+ <div class="text-center mb-16">
134
+ <h2 class="text-3xl md:text-4xl font-bold mb-4">Powerful <span class="text-primary">Features</span></h2>
135
+ <p class="text-gray-400 max-w-2xl mx-auto">
136
+ Everything you need to create amazing digital experiences with code
137
+ </p>
138
+ </div>
139
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
140
+ <!-- Feature 1 -->
141
+ <div class="feature-card bg-dark border border-gray-800 rounded-2xl p-6 transition-all duration-300">
142
+ <div class="w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center mb-4">
143
+ <i data-feather="cpu" class="text-primary"></i>
144
+ </div>
145
+ <h3 class="text-xl font-bold mb-2">AI Code Generation</h3>
146
+ <p class="text-gray-400 mb-4">
147
+ Generate clean, functional code from natural language descriptions
148
+ </p>
149
+ <div class="flex items-center text-primary">
150
+ <span>Learn more</span>
151
+ <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
152
+ </div>
153
+ </div>
154
+
155
+ <!-- Feature 2 -->
156
+ <div class="feature-card bg-dark border border-gray-800 rounded-2xl p-6 transition-all duration-300">
157
+ <div class="w-12 h-12 rounded-lg bg-secondary/10 flex items-center justify-center mb-4">
158
+ <i data-feather="zap" class="text-secondary"></i>
159
+ </div>
160
+ <h3 class="text-xl font-bold mb-2">Real-time Collaboration</h3>
161
+ <p class="text-gray-400 mb-4">
162
+ Work together with your team in real-time with live code sharing
163
+ </p>
164
+ <div class="flex items-center text-secondary">
165
+ <span>Learn more</span>
166
+ <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
167
+ </div>
168
+ </div>
169
+
170
+ <!-- Feature 3 -->
171
+ <div class="feature-card bg-dark border border-gray-800 rounded-2xl p-6 transition-all duration-300">
172
+ <div class="w-12 h-12 rounded-lg bg-accent/10 flex items-center justify-center mb-4">
173
+ <i data-feather="eye" class="text-accent"></i>
174
+ </div>
175
+ <h3 class="text-xl font-bold mb-2">Visual Preview</h3>
176
+ <p class="text-gray-400 mb-4">
177
+ See your code come to life with instant visual previews
178
+ </p>
179
+ <div class="flex items-center text-accent">
180
+ <span>Learn more</span>
181
+ <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
182
+ </div>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </section>
187
+
188
+ <!-- API Section -->
189
+ <section class="py-20">
190
+ <div class="container mx-auto px-6">
191
+ <div class="flex flex-col md:flex-row items-center">
192
+ <div class="md:w-1/2 mb-12 md:mb-0">
193
+ <div class="bg-dark border border-gray-800 rounded-2xl p-6">
194
+ <div class="flex justify-between items-center mb-4">
195
+ <div class="text-sm text-gray-400">API Example</div>
196
+ <div class="flex space-x-2">
197
+ <button class="px-3 py-1 text-xs rounded bg-primary/10 text-primary">Python</button>
198
+ <button class="px-3 py-1 text-xs rounded bg-gray-800 text-gray-400">JavaScript</button>
199
+ </div>
200
+ </div>
201
+ <div class="code-block">
202
+ <pre class="text-purple-400"><span class="text-blue-400">from</span> vibecode <span class="text-blue-400">import</span> PollinationClient</pre>
203
+ <pre class="text-gray-400"></pre>
204
+ <pre class="text-blue-400">client =</span> PollinationClient()</pre>
205
+ <pre class="text-gray-400"></pre>
206
+ <pre class="text-blue-400">response =</span> client.chat_completion_simple(</pre>
207
+ <pre class="text-green-400"> <span class="text-green-400">"Create a responsive navbar with Tailwind"</span></pre>
208
+ <pre class="text-blue-400">)</pre>
209
+ <pre class="text-gray-400"></pre>
210
+ <pre class="text-blue-400">print</span>(response)</pre>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ <div class="md:w-1/2 md:pl-12">
215
+ <h2 class="text-3xl md:text-4xl font-bold mb-6">
216
+ Powerful <span class="text-primary">API</span> Integration
217
+ </h2>
218
+ <p class="text-gray-400 mb-6">
219
+ Integrate Vibecode Studio into your workflow with our comprehensive API.
220
+ Generate code, transform content, and create visualizations programmatically.
221
+ </p>
222
+ <ul class="space-y-4 mb-8">
223
+ <li class="flex items-start">
224
+ <i data-feather="check-circle" class="text-green-500 mt-1 mr-3"></i>
225
+ <span>Code generation from natural language</span>
226
+ </li>
227
+ <li class="flex items-start">
228
+ <i data-feather="check-circle" class="text-green-500 mt-1 mr-3"></i>
229
+ <span>Image generation with text prompts</span>
230
+ </li>
231
+ <li class="flex items-start">
232
+ <i data-feather="check-circle" class="text-green-500 mt-1 mr-3"></i>
233
+ <span>Text-to-speech conversion</span>
234
+ </li>
235
+ <li class="flex items-start">
236
+ <i data-feather="check-circle" class="text-green-500 mt-1 mr-3"></i>
237
+ <span>Model selection and customization</span>
238
+ </li>
239
+ </ul>
240
+ <button class="px-6 py-3 rounded-lg bg-primary hover:bg-primary/80 transition font-medium">
241
+ View Documentation
242
+ </button>
243
+ </div>
244
+ </div>
245
+ </div>
246
+ </section>
247
+
248
+ <!-- CTA Section -->
249
+ <section class="py-20 bg-gradient-to-r from-primary/10 to-accent/10">
250
+ <div class="container mx-auto px-6 text-center">
251
+ <h2 class="text-3xl md:text-4xl font-bold mb-6">
252
+ Ready to <span class="glow-text">Vibe</span> with Code?
253
+ </h2>
254
+ <p class="text-gray-400 max-w-2xl mx-auto mb-8">
255
+ Join thousands of developers creating amazing experiences with Vibecode Studio
256
+ </p>
257
+ <div class="flex flex-col sm:flex-row justify-center space-y-4 sm:space-y-0 sm:space-x-4">
258
+ <button class="px-8 py-3 rounded-lg bg-primary hover:bg-primary/80 transition font-medium glow">
259
+ Get Started Free
260
+ </button>
261
+ <button class="px-8 py-3 rounded-lg bg-dark border border-gray-700 hover:bg-gray-800 transition font-medium">
262
+ Schedule a Demo
263
+ </button>
264
+ </div>
265
+ </div>
266
+ </section>
267
+
268
+ <!-- Footer -->
269
+ <footer class="py-12 bg-dark border-t border-gray-800">
270
+ <div class="container mx-auto px-6">
271
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
272
+ <div>
273
+ <div class="flex items-center space-x-2 mb-4">
274
+ <div class="w-8 h-8 rounded-full bg-gradient-to-r from-primary to-accent flex items-center justify-center">
275
+ <i data-feather="code" class="text-white w-4 h-4"></i>
276
+ </div>
277
+ <span class="text-xl font-bold">Vibecode<span class="text-accent">Studio</span></span>
278
+ </div>
279
+ <p class="text-gray-400">
280
+ Creative coding platform for developers and designers.
281
+ </p>
282
+ </div>
283
+ <div>
284
+ <h4 class="text-lg font-semibold mb-4">Product</h4>
285
+ <ul class="space-y-2 text-gray-400">
286
+ <li><a href="#" class="hover:text-primary transition">Features</a></li>
287
+ <li><a href="#" class="hover:text-primary transition">API</a></li>
288
+ <li><a href="#" class="hover:text-primary transition">Pricing</a></li>
289
+ <li><a href="#" class="hover:text-primary transition">Documentation</a></li>
290
+ </ul>
291
+ </div>
292
+ <div>
293
+ <h4 class="text-lg font-semibold mb-4">Company</h4>
294
+ <ul class="space-y-2 text-gray-400">
295
+ <li><a href="#" class="hover:text-primary transition">About</a></li>
296
+ <li><a href="#" class="hover:text-primary transition">Blog</a></li>
297
+ <li><a href="#" class="hover:text-primary transition">Careers</a></li>
298
+ <li><a href="#" class="hover:text-primary transition">Contact</a></li>
299
+ </ul>
300
+ </div>
301
+ <div>
302
+ <h4 class="text-lg font-semibold mb-4">Connect</h4>
303
+ <div class="flex space-x-4">
304
+ <a href="#" class="text-gray-400 hover:text-primary transition">
305
+ <i data-feather="github"></i>
306
+ </a>
307
+ <a href="#" class="text-gray-400 hover:text-primary transition">
308
+ <i data-feather="twitter"></i>
309
+ </a>
310
+ <a href="#" class="text-gray-400 hover:text-primary transition">
311
+ <i data-feather="linkedin"></i>
312
+ </a>
313
+ <a href="#" class="text-gray-400 hover:text-primary transition">
314
+ <i data-feather="discord"></i>
315
+ </a>
316
+ </div>
317
+ </div>
318
+ </div>
319
+ <div class="border-t border-gray-800 mt-12 pt-8 text-center text-gray-500">
320
+ <p>&copy; 2023 Vibecode Studio. All rights reserved.</p>
321
+ </div>
322
+ </div>
323
+ </footer>
324
+
325
+ <script>
326
+ // Initialize Feather Icons
327
+ feather.replace();
328
+
329
+ // Initialize Vanta.js background
330
+ document.addEventListener('DOMContentLoaded', function() {
331
+ VANTA.GLOBE({
332
+ el: "#hero",
333
+ mouseControls: true,
334
+ touchControls: true,
335
+ gyroControls: false,
336
+ minHeight: 200.00,
337
+ minWidth: 200.00,
338
+ scale: 1.00,
339
+ scaleMobile: 1.00,
340
+ color: 0x6366f1,
341
+ color2: 0x8b5cf6,
342
+ backgroundColor: 0x0f172a,
343
+ size: 1.00,
344
+ lineColor: 0x6366f1
345
+ });
346
+ });
347
+
348
+ // Typing animation
349
+ document.addEventListener('DOMContentLoaded', function() {
350
+ const cursor = document.querySelector('.typing-cursor');
351
+ if (cursor) {
352
+ setInterval(() => {
353
+ cursor.style.opacity = cursor.style.opacity === '0' ? '1' : '0';
354
+ }, 500);
355
+ }
356
+ });
357
+
358
+ // Mobile menu toggle
359
+ document.getElementById('menu-toggle').addEventListener('click', function() {
360
+ const menu = document.querySelector('.mobile-menu');
361
+ menu.classList.toggle('hidden');
362
+ });
363
+ </script>
364
+ </body>
365
  </html>