Spaces:
Running
Running
Add 3 files
Browse files- README.md +6 -4
- index.html +674 -19
- prompts.txt +0 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: blue
|
| 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: not-cursor
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,674 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>AI-Powered Development Environment</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
.resize-handle {
|
| 11 |
+
width: 4px;
|
| 12 |
+
background-color: rgba(156, 163, 175, 0.2);
|
| 13 |
+
cursor: col-resize;
|
| 14 |
+
transition: background-color 0.2s;
|
| 15 |
+
}
|
| 16 |
+
.resize-handle:hover {
|
| 17 |
+
background-color: rgba(156, 163, 175, 0.5);
|
| 18 |
+
}
|
| 19 |
+
.code-block {
|
| 20 |
+
font-family: 'Courier New', Courier, monospace;
|
| 21 |
+
background-color: #1e293b;
|
| 22 |
+
color: #f8fafc;
|
| 23 |
+
padding: 0.5rem;
|
| 24 |
+
border-radius: 0.25rem;
|
| 25 |
+
overflow-x: auto;
|
| 26 |
+
}
|
| 27 |
+
.tab-active {
|
| 28 |
+
border-bottom: 2px solid #3b82f6;
|
| 29 |
+
color: #3b82f6;
|
| 30 |
+
}
|
| 31 |
+
.mermaid-diagram {
|
| 32 |
+
background-color: white;
|
| 33 |
+
border-radius: 0.5rem;
|
| 34 |
+
padding: 1rem;
|
| 35 |
+
min-height: 300px;
|
| 36 |
+
}
|
| 37 |
+
.terminal {
|
| 38 |
+
background-color: #1e293b;
|
| 39 |
+
color: #f8fafc;
|
| 40 |
+
font-family: 'Courier New', Courier, monospace;
|
| 41 |
+
padding: 0.5rem;
|
| 42 |
+
border-radius: 0.25rem;
|
| 43 |
+
height: 100%;
|
| 44 |
+
overflow-y: auto;
|
| 45 |
+
}
|
| 46 |
+
.file-explorer {
|
| 47 |
+
height: calc(100vh - 150px);
|
| 48 |
+
overflow-y: auto;
|
| 49 |
+
}
|
| 50 |
+
.chat-message {
|
| 51 |
+
max-width: 80%;
|
| 52 |
+
}
|
| 53 |
+
.chat-container {
|
| 54 |
+
height: calc(100vh - 180px);
|
| 55 |
+
overflow-y: auto;
|
| 56 |
+
}
|
| 57 |
+
</style>
|
| 58 |
+
</head>
|
| 59 |
+
<body class="bg-gray-100 text-gray-800 h-screen flex flex-col">
|
| 60 |
+
<!-- Top Navigation -->
|
| 61 |
+
<header class="bg-white shadow-sm py-2 px-4 flex items-center justify-between">
|
| 62 |
+
<div class="flex items-center space-x-4">
|
| 63 |
+
<div class="flex items-center">
|
| 64 |
+
<i class="fas fa-code text-blue-500 text-2xl mr-2"></i>
|
| 65 |
+
<h1 class="text-xl font-bold text-gray-800">AI Dev Environment</h1>
|
| 66 |
+
</div>
|
| 67 |
+
<div class="hidden md:flex space-x-4">
|
| 68 |
+
<button class="px-3 py-1 rounded hover:bg-gray-100">File</button>
|
| 69 |
+
<button class="px-3 py-1 rounded hover:bg-gray-100">Edit</button>
|
| 70 |
+
<button class="px-3 py-1 rounded hover:bg-gray-100">View</button>
|
| 71 |
+
<button class="px-3 py-1 rounded hover:bg-gray-100">Tools</button>
|
| 72 |
+
<button class="px-3 py-1 rounded hover:bg-gray-100">Help</button>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
<div class="flex items-center space-x-3">
|
| 76 |
+
<div class="relative">
|
| 77 |
+
<input type="text" placeholder="Search projects..." class="pl-8 pr-4 py-1 border rounded-lg text-sm w-64">
|
| 78 |
+
<i class="fas fa-search absolute left-2 top-2 text-gray-400"></i>
|
| 79 |
+
</div>
|
| 80 |
+
<button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-1 rounded-lg text-sm flex items-center">
|
| 81 |
+
<i class="fas fa-user-circle mr-2"></i>
|
| 82 |
+
<span>Account</span>
|
| 83 |
+
</button>
|
| 84 |
+
</div>
|
| 85 |
+
</header>
|
| 86 |
+
|
| 87 |
+
<!-- Main Content Area -->
|
| 88 |
+
<div class="flex flex-1 overflow-hidden">
|
| 89 |
+
<!-- Left Sidebar - Projects -->
|
| 90 |
+
<div class="w-64 bg-white shadow-sm flex flex-col">
|
| 91 |
+
<div class="p-4 border-b">
|
| 92 |
+
<button id="newProjectBtn" class="w-full bg-blue-500 hover:bg-blue-600 text-white py-2 rounded-lg flex items-center justify-center">
|
| 93 |
+
<i class="fas fa-plus mr-2"></i>
|
| 94 |
+
<span>New Project</span>
|
| 95 |
+
</button>
|
| 96 |
+
</div>
|
| 97 |
+
<div class="p-2 border-b flex justify-between items-center">
|
| 98 |
+
<h3 class="font-medium">Projects</h3>
|
| 99 |
+
<button class="text-gray-500 hover:text-gray-700">
|
| 100 |
+
<i class="fas fa-ellipsis-h"></i>
|
| 101 |
+
</button>
|
| 102 |
+
</div>
|
| 103 |
+
<div class="overflow-y-auto flex-1">
|
| 104 |
+
<div class="project-item p-3 hover:bg-gray-100 cursor-pointer border-b flex items-center">
|
| 105 |
+
<i class="fas fa-folder text-yellow-400 mr-3"></i>
|
| 106 |
+
<div>
|
| 107 |
+
<div class="font-medium">E-commerce Platform</div>
|
| 108 |
+
<div class="text-xs text-gray-500">Python, React</div>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="project-item p-3 hover:bg-gray-100 cursor-pointer border-b flex items-center">
|
| 112 |
+
<i class="fas fa-folder text-yellow-400 mr-3"></i>
|
| 113 |
+
<div>
|
| 114 |
+
<div class="font-medium">AI Chatbot</div>
|
| 115 |
+
<div class="text-xs text-gray-500">Node.js, TensorFlow</div>
|
| 116 |
+
</div>
|
| 117 |
+
</div>
|
| 118 |
+
<div class="project-item p-3 hover:bg-gray-100 cursor-pointer border-b flex items-center">
|
| 119 |
+
<i class="fas fa-folder text-yellow-400 mr-3"></i>
|
| 120 |
+
<div>
|
| 121 |
+
<div class="font-medium">Portfolio Website</div>
|
| 122 |
+
<div class="text-xs text-gray-500">HTML, CSS, JS</div>
|
| 123 |
+
</div>
|
| 124 |
+
</div>
|
| 125 |
+
<div class="project-item p-3 hover:bg-gray-100 cursor-pointer border-b flex items-center">
|
| 126 |
+
<i class="fas fa-folder text-yellow-400 mr-3"></i>
|
| 127 |
+
<div>
|
| 128 |
+
<div class="font-medium">Data Analysis Tool</div>
|
| 129 |
+
<div class="text-xs text-gray-500">Python, Pandas</div>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
<div class="project-item p-3 hover:bg-gray-100 cursor-pointer border-b flex items-center">
|
| 133 |
+
<i class="fas fa-folder text-yellow-400 mr-3"></i>
|
| 134 |
+
<div>
|
| 135 |
+
<div class="font-medium">Mobile App Backend</div>
|
| 136 |
+
<div class="text-xs text-gray-500">Go, MongoDB</div>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
<div class="p-4 border-t">
|
| 141 |
+
<div class="text-sm text-gray-500 mb-2">AI Models</div>
|
| 142 |
+
<div class="space-y-2">
|
| 143 |
+
<div class="flex items-center justify-between p-2 bg-gray-100 rounded">
|
| 144 |
+
<div class="flex items-center">
|
| 145 |
+
<i class="fas fa-brain text-purple-500 mr-2"></i>
|
| 146 |
+
<span>GPT-4</span>
|
| 147 |
+
</div>
|
| 148 |
+
<div class="w-2 h-2 bg-green-500 rounded-full"></div>
|
| 149 |
+
</div>
|
| 150 |
+
<div class="flex items-center justify-between p-2 rounded hover:bg-gray-100">
|
| 151 |
+
<div class="flex items-center">
|
| 152 |
+
<i class="fas fa-robot text-blue-500 mr-2"></i>
|
| 153 |
+
<span>Claude 3</span>
|
| 154 |
+
</div>
|
| 155 |
+
<div class="w-2 h-2 bg-green-500 rounded-full"></div>
|
| 156 |
+
</div>
|
| 157 |
+
<div class="flex items-center justify-between p-2 rounded hover:bg-gray-100">
|
| 158 |
+
<div class="flex items-center">
|
| 159 |
+
<i class="fas fa-microchip text-red-500 mr-2"></i>
|
| 160 |
+
<span>Groq</span>
|
| 161 |
+
</div>
|
| 162 |
+
<div class="w-2 h-2 bg-green-500 rounded-full"></div>
|
| 163 |
+
</div>
|
| 164 |
+
<div class="flex items-center justify-between p-2 rounded hover:bg-gray-100">
|
| 165 |
+
<div class="flex items-center">
|
| 166 |
+
<i class="fas fa-server text-green-500 mr-2"></i>
|
| 167 |
+
<span>Ollama</span>
|
| 168 |
+
</div>
|
| 169 |
+
<div class="w-2 h-2 bg-gray-500 rounded-full"></div>
|
| 170 |
+
</div>
|
| 171 |
+
</div>
|
| 172 |
+
</div>
|
| 173 |
+
</div>
|
| 174 |
+
|
| 175 |
+
<!-- Resizable Handle -->
|
| 176 |
+
<div class="resize-handle"></div>
|
| 177 |
+
|
| 178 |
+
<!-- Main Content -->
|
| 179 |
+
<div class="flex-1 flex flex-col overflow-hidden">
|
| 180 |
+
<!-- Tabs -->
|
| 181 |
+
<div class="bg-white border-b">
|
| 182 |
+
<div class="flex space-x-6 px-4">
|
| 183 |
+
<button class="tab-button py-3 tab-active">AI Chat</button>
|
| 184 |
+
<button class="tab-button py-3">PRD</button>
|
| 185 |
+
<button class="tab-button py-3">Diagram</button>
|
| 186 |
+
<button class="tab-button py-3">Wireframe</button>
|
| 187 |
+
<button class="tab-button py-3">Files</button>
|
| 188 |
+
</div>
|
| 189 |
+
</div>
|
| 190 |
+
|
| 191 |
+
<!-- Tab Content -->
|
| 192 |
+
<div class="flex-1 flex overflow-hidden">
|
| 193 |
+
<!-- Left Panel - Chat/PRD/Diagram -->
|
| 194 |
+
<div class="flex-1 flex flex-col overflow-hidden">
|
| 195 |
+
<!-- AI Chat Content (default visible) -->
|
| 196 |
+
<div id="chatContent" class="flex-1 flex flex-col">
|
| 197 |
+
<div class="chat-container p-4 space-y-4">
|
| 198 |
+
<!-- AI Message -->
|
| 199 |
+
<div class="flex">
|
| 200 |
+
<div class="chat-message bg-blue-50 rounded-lg p-3">
|
| 201 |
+
<div class="flex items-center mb-1">
|
| 202 |
+
<div class="w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center text-white mr-2">
|
| 203 |
+
<i class="fas fa-robot text-xs"></i>
|
| 204 |
+
</div>
|
| 205 |
+
<div class="font-medium">AI Assistant</div>
|
| 206 |
+
</div>
|
| 207 |
+
<div class="text-sm">
|
| 208 |
+
<p>Hello! I'm your AI development assistant. How can I help you with your project today?</p>
|
| 209 |
+
<p class="mt-2">I can help with:</p>
|
| 210 |
+
<ul class="list-disc pl-5 mt-1">
|
| 211 |
+
<li>Code generation and refactoring</li>
|
| 212 |
+
<li>Debugging assistance</li>
|
| 213 |
+
<li>Project documentation</li>
|
| 214 |
+
<li>Architecture diagrams</li>
|
| 215 |
+
<li>Environment setup</li>
|
| 216 |
+
</ul>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
|
| 221 |
+
<!-- User Message -->
|
| 222 |
+
<div class="flex justify-end">
|
| 223 |
+
<div class="chat-message bg-gray-100 rounded-lg p-3">
|
| 224 |
+
<div class="flex items-center mb-1 justify-end">
|
| 225 |
+
<div class="font-medium mr-2">You</div>
|
| 226 |
+
<div class="w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center text-white">
|
| 227 |
+
<i class="fas fa-user text-xs"></i>
|
| 228 |
+
</div>
|
| 229 |
+
</div>
|
| 230 |
+
<div class="text-sm">
|
| 231 |
+
Can you help me set up a Python project with FastAPI and PostgreSQL?
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
|
| 236 |
+
<!-- AI Message with Code -->
|
| 237 |
+
<div class="flex">
|
| 238 |
+
<div class="chat-message bg-blue-50 rounded-lg p-3">
|
| 239 |
+
<div class="flex items-center mb-1">
|
| 240 |
+
<div class="w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center text-white mr-2">
|
| 241 |
+
<i class="fas fa-robot text-xs"></i>
|
| 242 |
+
</div>
|
| 243 |
+
<div class="font-medium">AI Assistant</div>
|
| 244 |
+
</div>
|
| 245 |
+
<div class="text-sm">
|
| 246 |
+
<p>Certainly! Here's how to set up a FastAPI project with PostgreSQL:</p>
|
| 247 |
+
|
| 248 |
+
<div class="code-block mt-2 mb-2">
|
| 249 |
+
<pre># First, create a virtual environment
|
| 250 |
+
python -m venv fastapi_env
|
| 251 |
+
source fastapi_env/bin/activate # On Windows use `fastapi_env\Scripts\activate`
|
| 252 |
+
|
| 253 |
+
# Install required packages
|
| 254 |
+
pip install fastapi uvicorn sqlalchemy psycopg2-binary python-dotenv
|
| 255 |
+
|
| 256 |
+
# Create a basic FastAPI app with PostgreSQL connection
|
| 257 |
+
# main.py
|
| 258 |
+
from fastapi import FastAPI
|
| 259 |
+
from sqlalchemy import create_engine
|
| 260 |
+
from sqlalchemy.ext.declarative import declarative_base
|
| 261 |
+
from sqlalchemy.orm import sessionmaker
|
| 262 |
+
|
| 263 |
+
app = FastAPI()
|
| 264 |
+
|
| 265 |
+
# Database setup
|
| 266 |
+
DATABASE_URL = "postgresql://user:password@localhost:5432/mydatabase"
|
| 267 |
+
engine = create_engine(DATABASE_URL)
|
| 268 |
+
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
| 269 |
+
Base = declarative_base()</pre>
|
| 270 |
+
</div>
|
| 271 |
+
|
| 272 |
+
<p class="mt-2">Would you like me to:</p>
|
| 273 |
+
<ol class="list-decimal pl-5 mt-1">
|
| 274 |
+
<li>Create the project structure for you?</li>
|
| 275 |
+
<li>Explain any part in more detail?</li>
|
| 276 |
+
<li>Generate a requirements.txt file?</li>
|
| 277 |
+
</ol>
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
+
</div>
|
| 281 |
+
</div>
|
| 282 |
+
|
| 283 |
+
<!-- Chat Input -->
|
| 284 |
+
<div class="p-4 border-t">
|
| 285 |
+
<div class="flex items-center space-x-2">
|
| 286 |
+
<button class="p-2 text-gray-500 hover:text-gray-700">
|
| 287 |
+
<i class="fas fa-paperclip"></i>
|
| 288 |
+
</button>
|
| 289 |
+
<div class="flex-1 relative">
|
| 290 |
+
<textarea id="chatInput" class="w-full border rounded-lg pl-4 pr-10 py-2 resize-none" rows="1" placeholder="Ask the AI to help with your project..."></textarea>
|
| 291 |
+
<button class="absolute right-2 bottom-2 text-gray-500 hover:text-blue-500">
|
| 292 |
+
<i class="fas fa-microphone"></i>
|
| 293 |
+
</button>
|
| 294 |
+
</div>
|
| 295 |
+
<button id="sendMessageBtn" class="p-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600">
|
| 296 |
+
<i class="fas fa-paper-plane"></i>
|
| 297 |
+
</button>
|
| 298 |
+
</div>
|
| 299 |
+
<div class="flex justify-between mt-2 text-xs text-gray-500">
|
| 300 |
+
<div>
|
| 301 |
+
<button class="mr-2 hover:text-blue-500">Add context</button>
|
| 302 |
+
<button class="hover:text-blue-500">Select AI model</button>
|
| 303 |
+
</div>
|
| 304 |
+
<div>
|
| 305 |
+
<span>Token count: 0/4000</span>
|
| 306 |
+
</div>
|
| 307 |
+
</div>
|
| 308 |
+
</div>
|
| 309 |
+
</div>
|
| 310 |
+
|
| 311 |
+
<!-- PRD Content (hidden by default) -->
|
| 312 |
+
<div id="prdContent" class="hidden flex-1 p-4 overflow-auto">
|
| 313 |
+
<div class="bg-white rounded-lg shadow p-4">
|
| 314 |
+
<h2 class="text-xl font-bold mb-4">Project Requirements Document</h2>
|
| 315 |
+
<div class="prose max-w-none">
|
| 316 |
+
<h3>1. Project Overview</h3>
|
| 317 |
+
<p>This project will create a FastAPI backend service with PostgreSQL database integration. The service will provide RESTful API endpoints for a future frontend application.</p>
|
| 318 |
+
|
| 319 |
+
<h3>2. Features</h3>
|
| 320 |
+
<ul>
|
| 321 |
+
<li>User authentication (JWT)</li>
|
| 322 |
+
<li>CRUD operations for core entities</li>
|
| 323 |
+
<li>Database migrations</li>
|
| 324 |
+
<li>API documentation (Swagger/OpenAPI)</li>
|
| 325 |
+
<li>Docker configuration</li>
|
| 326 |
+
</ul>
|
| 327 |
+
|
| 328 |
+
<h3>3. Technical Stack</h3>
|
| 329 |
+
<table class="min-w-full border">
|
| 330 |
+
<thead>
|
| 331 |
+
<tr class="bg-gray-50">
|
| 332 |
+
<th class="px-4 py-2 text-left">Component</th>
|
| 333 |
+
<th class="px-4 py-2 text-left">Technology</th>
|
| 334 |
+
</tr>
|
| 335 |
+
</thead>
|
| 336 |
+
<tbody>
|
| 337 |
+
<tr>
|
| 338 |
+
<td class="px-4 py-2 border">Backend Framework</td>
|
| 339 |
+
<td class="px-4 py-2 border">FastAPI</td>
|
| 340 |
+
</tr>
|
| 341 |
+
<tr>
|
| 342 |
+
<td class="px-4 py-2 border">Database</td>
|
| 343 |
+
<td class="px-4 py-2 border">PostgreSQL</td>
|
| 344 |
+
</tr>
|
| 345 |
+
<tr>
|
| 346 |
+
<td class="px-4 py-2 border">ORM</td>
|
| 347 |
+
<td class="px-4 py-2 border">SQLAlchemy</td>
|
| 348 |
+
</tr>
|
| 349 |
+
<tr>
|
| 350 |
+
<td class="px-4 py-2 border">Authentication</td>
|
| 351 |
+
<td class="px-4 py-2 border">JWT</td>
|
| 352 |
+
</tr>
|
| 353 |
+
</tbody>
|
| 354 |
+
</table>
|
| 355 |
+
|
| 356 |
+
<h3>4. API Endpoints</h3>
|
| 357 |
+
<div class="code-block">
|
| 358 |
+
<pre>GET /api/users - List all users
|
| 359 |
+
POST /api/users - Create new user
|
| 360 |
+
GET /api/users/{id} - Get user details
|
| 361 |
+
PUT /api/users/{id} - Update user
|
| 362 |
+
DELETE /api/users/{id} - Delete user</pre>
|
| 363 |
+
</div>
|
| 364 |
+
</div>
|
| 365 |
+
</div>
|
| 366 |
+
</div>
|
| 367 |
+
|
| 368 |
+
<!-- Diagram Content (hidden by default) -->
|
| 369 |
+
<div id="diagramContent" class="hidden flex-1 p-4 overflow-auto">
|
| 370 |
+
<div class="bg-white rounded-lg shadow p-4">
|
| 371 |
+
<div class="flex justify-between items-center mb-4">
|
| 372 |
+
<h2 class="text-xl font-bold">System Architecture Diagram</h2>
|
| 373 |
+
<div class="flex space-x-2">
|
| 374 |
+
<button class="px-3 py-1 bg-gray-100 rounded hover:bg-gray-200">
|
| 375 |
+
<i class="fas fa-download mr-1"></i> Export
|
| 376 |
+
</button>
|
| 377 |
+
<button class="px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600">
|
| 378 |
+
<i class="fas fa-sync mr-1"></i> Regenerate
|
| 379 |
+
</button>
|
| 380 |
+
</div>
|
| 381 |
+
</div>
|
| 382 |
+
<div class="mermaid-diagram">
|
| 383 |
+
<div class="flex justify-center items-center h-64 bg-gray-50 rounded border border-dashed border-gray-300">
|
| 384 |
+
<div class="text-center">
|
| 385 |
+
<i class="fas fa-diagram-project text-4xl text-gray-400 mb-2"></i>
|
| 386 |
+
<p class="text-gray-500">Mermaid diagram will appear here</p>
|
| 387 |
+
<p class="text-sm text-gray-400 mt-2">Example: Flowchart, Sequence Diagram, Class Diagram, etc.</p>
|
| 388 |
+
</div>
|
| 389 |
+
</div>
|
| 390 |
+
</div>
|
| 391 |
+
<div class="mt-4">
|
| 392 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Mermaid Code</label>
|
| 393 |
+
<textarea class="w-full h-32 border rounded p-2 font-mono text-sm" placeholder="Enter Mermaid diagram code here...">flowchart TD
|
| 394 |
+
A[Client] -->|HTTP Request| B(FastAPI Server)
|
| 395 |
+
B -->|Query| C[(PostgreSQL)]
|
| 396 |
+
C -->|Results| B
|
| 397 |
+
B -->|Response| A</textarea>
|
| 398 |
+
</div>
|
| 399 |
+
</div>
|
| 400 |
+
</div>
|
| 401 |
+
</div>
|
| 402 |
+
|
| 403 |
+
<!-- Resizable Handle -->
|
| 404 |
+
<div class="resize-handle"></div>
|
| 405 |
+
|
| 406 |
+
<!-- Right Panel - Files/Terminal -->
|
| 407 |
+
<div class="w-80 bg-white flex flex-col border-l">
|
| 408 |
+
<!-- Files Tab -->
|
| 409 |
+
<div class="p-3 border-b">
|
| 410 |
+
<div class="flex justify-between items-center">
|
| 411 |
+
<h3 class="font-medium">Project Files</h3>
|
| 412 |
+
<div class="flex space-x-2">
|
| 413 |
+
<button class="text-gray-500 hover:text-gray-700">
|
| 414 |
+
<i class="fas fa-sync-alt"></i>
|
| 415 |
+
</button>
|
| 416 |
+
<button class="text-gray-500 hover:text-gray-700">
|
| 417 |
+
<i class="fas fa-ellipsis-h"></i>
|
| 418 |
+
</button>
|
| 419 |
+
</div>
|
| 420 |
+
</div>
|
| 421 |
+
</div>
|
| 422 |
+
<div class="file-explorer p-2">
|
| 423 |
+
<div class="space-y-1">
|
| 424 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 425 |
+
<i class="fas fa-folder text-yellow-400 mr-2 w-4 text-center"></i>
|
| 426 |
+
<span class="text-sm">fastapi_env</span>
|
| 427 |
+
</div>
|
| 428 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 429 |
+
<i class="fas fa-file-code text-blue-400 mr-2 w-4 text-center"></i>
|
| 430 |
+
<span class="text-sm">main.py</span>
|
| 431 |
+
</div>
|
| 432 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 433 |
+
<i class="fas fa-file-alt text-gray-400 mr-2 w-4 text-center"></i>
|
| 434 |
+
<span class="text-sm">requirements.txt</span>
|
| 435 |
+
</div>
|
| 436 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 437 |
+
<i class="fas fa-file-alt text-gray-400 mr-2 w-4 text-center"></i>
|
| 438 |
+
<span class="text-sm">README.md</span>
|
| 439 |
+
</div>
|
| 440 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 441 |
+
<i class="fas fa-file-alt text-purple-400 mr-2 w-4 text-center"></i>
|
| 442 |
+
<span class="text-sm">PROTOTYPE_LOG.md</span>
|
| 443 |
+
</div>
|
| 444 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 445 |
+
<i class="fas fa-file-alt text-green-400 mr-2 w-4 text-center"></i>
|
| 446 |
+
<span class="text-sm">WORKFLOW_SUMMARY.md</span>
|
| 447 |
+
</div>
|
| 448 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 449 |
+
<i class="fas fa-file-code text-blue-400 mr-2 w-4 text-center"></i>
|
| 450 |
+
<span class="text-sm">models.py</span>
|
| 451 |
+
</div>
|
| 452 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 453 |
+
<i class="fas fa-file-code text-blue-400 mr-2 w-4 text-center"></i>
|
| 454 |
+
<span class="text-sm">schemas.py</span>
|
| 455 |
+
</div>
|
| 456 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 457 |
+
<i class="fas fa-file-code text-blue-400 mr-2 w-4 text-center"></i>
|
| 458 |
+
<span class="text-sm">crud.py</span>
|
| 459 |
+
</div>
|
| 460 |
+
<div class="file-item flex items-center p-1 hover:bg-gray-100 rounded cursor-pointer">
|
| 461 |
+
<i class="fas fa-file-code text-blue-400 mr-2 w-4 text-center"></i>
|
| 462 |
+
<span class="text-sm">database.py</span>
|
| 463 |
+
</div>
|
| 464 |
+
</div>
|
| 465 |
+
</div>
|
| 466 |
+
|
| 467 |
+
<!-- Terminal Tab -->
|
| 468 |
+
<div class="p-3 border-t border-b">
|
| 469 |
+
<div class="flex justify-between items-center">
|
| 470 |
+
<h3 class="font-medium">Terminal</h3>
|
| 471 |
+
<div class="flex space-x-2">
|
| 472 |
+
<button class="text-gray-500 hover:text-gray-700">
|
| 473 |
+
<i class="fas fa-plus"></i>
|
| 474 |
+
</button>
|
| 475 |
+
<button class="text-gray-500 hover:text-gray-700">
|
| 476 |
+
<i class="fas fa-ellipsis-h"></i>
|
| 477 |
+
</button>
|
| 478 |
+
</div>
|
| 479 |
+
</div>
|
| 480 |
+
</div>
|
| 481 |
+
<div class="terminal p-2 flex-1">
|
| 482 |
+
<div class="text-green-400">$ <span class="text-white">python -m venv fastapi_env</span></div>
|
| 483 |
+
<div class="text-green-400">$ <span class="text-white">source fastapi_env/bin/activate</span></div>
|
| 484 |
+
<div class="text-white">(fastapi_env) $ <span class="text-white">pip install fastapi uvicorn sqlalchemy psycopg2-binary</span></div>
|
| 485 |
+
<div class="text-gray-400 text-sm mt-1">Collecting fastapi</div>
|
| 486 |
+
<div class="text-gray-400 text-sm">Downloading fastapi-0.95.2-py3-none-any.whl (56 kB)</div>
|
| 487 |
+
<div class="text-gray-400 text-sm">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.5/56.5 kB 1.2 MB/s eta 0:00:00</div>
|
| 488 |
+
<div class="text-gray-400 text-sm">...</div>
|
| 489 |
+
<div class="text-gray-400 text-sm">Successfully installed fastapi-0.95.2 sqlalchemy-2.0.15 uvicorn-0.22.0</div>
|
| 490 |
+
<div class="text-green-400 mt-2">(fastapi_env) $ <span class="text-white">uvicorn main:app --reload</span></div>
|
| 491 |
+
<div class="text-gray-400 text-sm">INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)</div>
|
| 492 |
+
<div class="text-gray-400 text-sm">INFO: Started reloader process [12345] using WatchFiles</div>
|
| 493 |
+
<div class="text-gray-400 text-sm">INFO: Started server process [12347]</div>
|
| 494 |
+
<div class="text-gray-400 text-sm">INFO: Waiting for application startup.</div>
|
| 495 |
+
<div class="text-gray-400 text-sm">INFO: Application startup complete.</div>
|
| 496 |
+
<div class="text-green-400 mt-2">(fastapi_env) $ <span class="cursor-blink">█</span></div>
|
| 497 |
+
</div>
|
| 498 |
+
</div>
|
| 499 |
+
</div>
|
| 500 |
+
</div>
|
| 501 |
+
</div>
|
| 502 |
+
|
| 503 |
+
<!-- New Project Modal -->
|
| 504 |
+
<div id="newProjectModal" class="hidden fixed inset-0 bg-gray-600 bg-opacity-50 flex items-center justify-center z-50">
|
| 505 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-md">
|
| 506 |
+
<div class="p-4 border-b">
|
| 507 |
+
<h3 class="text-lg font-medium">Create New Project</h3>
|
| 508 |
+
</div>
|
| 509 |
+
<div class="p-4 space-y-4">
|
| 510 |
+
<div>
|
| 511 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Project Name</label>
|
| 512 |
+
<input type="text" class="w-full border rounded-lg px-3 py-2" placeholder="My Awesome Project">
|
| 513 |
+
</div>
|
| 514 |
+
<div>
|
| 515 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Project Description</label>
|
| 516 |
+
<textarea class="w-full border rounded-lg px-3 py-2" rows="3" placeholder="Brief description of your project..."></textarea>
|
| 517 |
+
</div>
|
| 518 |
+
<div>
|
| 519 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Project Type</label>
|
| 520 |
+
<select class="w-full border rounded-lg px-3 py-2">
|
| 521 |
+
<option>Python</option>
|
| 522 |
+
<option>Node.js</option>
|
| 523 |
+
<option>React</option>
|
| 524 |
+
<option>Go</option>
|
| 525 |
+
<option>Other</option>
|
| 526 |
+
</select>
|
| 527 |
+
</div>
|
| 528 |
+
<div>
|
| 529 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Project Location</label>
|
| 530 |
+
<div class="flex">
|
| 531 |
+
<input type="text" class="flex-1 border rounded-l-lg px-3 py-2" placeholder="/path/to/project">
|
| 532 |
+
<button class="bg-gray-200 px-3 rounded-r-lg hover:bg-gray-300">
|
| 533 |
+
<i class="fas fa-folder-open"></i>
|
| 534 |
+
</button>
|
| 535 |
+
</div>
|
| 536 |
+
</div>
|
| 537 |
+
<div class="flex items-center">
|
| 538 |
+
<input type="checkbox" id="initGit" class="mr-2">
|
| 539 |
+
<label for="initGit" class="text-sm">Initialize Git repository</label>
|
| 540 |
+
</div>
|
| 541 |
+
<div class="flex items-center">
|
| 542 |
+
<input type="checkbox" id="createEnv" class="mr-2" checked>
|
| 543 |
+
<label for="createEnv" class="text-sm">Create virtual environment</label>
|
| 544 |
+
</div>
|
| 545 |
+
</div>
|
| 546 |
+
<div class="p-4 border-t flex justify-end space-x-3">
|
| 547 |
+
<button id="cancelProjectBtn" class="px-4 py-2 border rounded-lg hover:bg-gray-100">Cancel</button>
|
| 548 |
+
<button id="confirmProjectBtn" class="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600">Create Project</button>
|
| 549 |
+
</div>
|
| 550 |
+
</div>
|
| 551 |
+
</div>
|
| 552 |
+
|
| 553 |
+
<script>
|
| 554 |
+
// Tab switching functionality
|
| 555 |
+
const tabButtons = document.querySelectorAll('.tab-button');
|
| 556 |
+
const tabContents = {
|
| 557 |
+
'chatContent': document.getElementById('chatContent'),
|
| 558 |
+
'prdContent': document.getElementById('prdContent'),
|
| 559 |
+
'diagramContent': document.getElementById('diagramContent')
|
| 560 |
+
};
|
| 561 |
+
|
| 562 |
+
tabButtons.forEach(button => {
|
| 563 |
+
button.addEventListener('click', () => {
|
| 564 |
+
// Remove active class from all tabs
|
| 565 |
+
tabButtons.forEach(btn => btn.classList.remove('tab-active'));
|
| 566 |
+
|
| 567 |
+
// Add active class to clicked tab
|
| 568 |
+
button.classList.add('tab-active');
|
| 569 |
+
|
| 570 |
+
// Hide all content
|
| 571 |
+
Object.values(tabContents).forEach(content => content.classList.add('hidden'));
|
| 572 |
+
|
| 573 |
+
// Show corresponding content
|
| 574 |
+
const tabName = button.textContent.trim();
|
| 575 |
+
if (tabName === 'AI Chat') tabContents['chatContent'].classList.remove('hidden');
|
| 576 |
+
else if (tabName === 'PRD') tabContents['prdContent'].classList.remove('hidden');
|
| 577 |
+
else if (tabName === 'Diagram') tabContents['diagramContent'].classList.remove('hidden');
|
| 578 |
+
});
|
| 579 |
+
});
|
| 580 |
+
|
| 581 |
+
// New project modal functionality
|
| 582 |
+
const newProjectBtn = document.getElementById('newProjectBtn');
|
| 583 |
+
const newProjectModal = document.getElementById('newProjectModal');
|
| 584 |
+
const cancelProjectBtn = document.getElementById('cancelProjectBtn');
|
| 585 |
+
const confirmProjectBtn = document.getElementById('confirmProjectBtn');
|
| 586 |
+
|
| 587 |
+
newProjectBtn.addEventListener('click', () => {
|
| 588 |
+
newProjectModal.classList.remove('hidden');
|
| 589 |
+
});
|
| 590 |
+
|
| 591 |
+
cancelProjectBtn.addEventListener('click', () => {
|
| 592 |
+
newProjectModal.classList.add('hidden');
|
| 593 |
+
});
|
| 594 |
+
|
| 595 |
+
confirmProjectBtn.addEventListener('click', () => {
|
| 596 |
+
newProjectModal.classList.add('hidden');
|
| 597 |
+
// Here you would typically send the project data to your backend
|
| 598 |
+
alert('Project created successfully!');
|
| 599 |
+
});
|
| 600 |
+
|
| 601 |
+
// Chat input functionality
|
| 602 |
+
const chatInput = document.getElementById('chatInput');
|
| 603 |
+
const sendMessageBtn = document.getElementById('sendMessageBtn');
|
| 604 |
+
|
| 605 |
+
function sendMessage() {
|
| 606 |
+
const message = chatInput.value.trim();
|
| 607 |
+
if (message) {
|
| 608 |
+
// Here you would typically send the message to your backend and handle the AI response
|
| 609 |
+
console.log('Message sent:', message);
|
| 610 |
+
chatInput.value = '';
|
| 611 |
+
}
|
| 612 |
+
}
|
| 613 |
+
|
| 614 |
+
sendMessageBtn.addEventListener('click', sendMessage);
|
| 615 |
+
|
| 616 |
+
chatInput.addEventListener('keypress', (e) => {
|
| 617 |
+
if (e.key === 'Enter' && !e.shiftKey) {
|
| 618 |
+
e.preventDefault();
|
| 619 |
+
sendMessage();
|
| 620 |
+
}
|
| 621 |
+
});
|
| 622 |
+
|
| 623 |
+
// Auto-resize textarea
|
| 624 |
+
chatInput.addEventListener('input', function() {
|
| 625 |
+
this.style.height = 'auto';
|
| 626 |
+
this.style.height = (this.scrollHeight) + 'px';
|
| 627 |
+
});
|
| 628 |
+
|
| 629 |
+
// File explorer click handlers
|
| 630 |
+
const fileItems = document.querySelectorAll('.file-item');
|
| 631 |
+
fileItems.forEach(item => {
|
| 632 |
+
item.addEventListener('click', () => {
|
| 633 |
+
// Here you would typically load the file content
|
| 634 |
+
console.log('File selected:', item.textContent.trim());
|
| 635 |
+
});
|
| 636 |
+
});
|
| 637 |
+
|
| 638 |
+
// Project item click handlers
|
| 639 |
+
const projectItems = document.querySelectorAll('.project-item');
|
| 640 |
+
projectItems.forEach(item => {
|
| 641 |
+
item.addEventListener('click', () => {
|
| 642 |
+
// Here you would typically load the project
|
| 643 |
+
console.log('Project selected:', item.querySelector('div > div').textContent.trim());
|
| 644 |
+
});
|
| 645 |
+
});
|
| 646 |
+
|
| 647 |
+
// Simple resizable panels (conceptual, would need more robust implementation)
|
| 648 |
+
const resizeHandles = document.querySelectorAll('.resize-handle');
|
| 649 |
+
resizeHandles.forEach(handle => {
|
| 650 |
+
handle.addEventListener('mousedown', function(e) {
|
| 651 |
+
e.preventDefault();
|
| 652 |
+
const startX = e.clientX;
|
| 653 |
+
const leftPanel = this.previousElementSibling;
|
| 654 |
+
const rightPanel = this.nextElementSibling;
|
| 655 |
+
const leftWidth = leftPanel.offsetWidth;
|
| 656 |
+
|
| 657 |
+
document.addEventListener('mousemove', doDrag);
|
| 658 |
+
document.addEventListener('mouseup', stopDrag);
|
| 659 |
+
|
| 660 |
+
function doDrag(e) {
|
| 661 |
+
const dx = e.clientX - startX;
|
| 662 |
+
const newLeftWidth = leftWidth + dx;
|
| 663 |
+
leftPanel.style.width = newLeftWidth + 'px';
|
| 664 |
+
}
|
| 665 |
+
|
| 666 |
+
function stopDrag() {
|
| 667 |
+
document.removeEventListener('mousemove', doDrag);
|
| 668 |
+
document.removeEventListener('mouseup', stopDrag);
|
| 669 |
+
}
|
| 670 |
+
});
|
| 671 |
+
});
|
| 672 |
+
</script>
|
| 673 |
+
<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=NahFam13/not-cursor" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 674 |
+
</html>
|
prompts.txt
ADDED
|
File without changes
|