Spaces:
Running
Running
é possível cnetar uma base no supabase?
Browse files- README.md +8 -5
- index.html +227 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: SupaConnect Wizardry 🧙
|
| 3 |
+
colorFrom: yellow
|
| 4 |
+
colorTo: blue
|
| 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,228 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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=1.0">
|
| 6 |
+
<title>SupaConnect - Supabase Dashboard</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 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/feather-icons/dist/feather.min.js"></script>
|
| 11 |
+
<script src="https://unpkg.com/@supabase/supabase-js@2"></script>
|
| 12 |
+
<style>
|
| 13 |
+
.gradient-bg {
|
| 14 |
+
background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
|
| 15 |
+
}
|
| 16 |
+
.card-hover {
|
| 17 |
+
transition: all 0.3s ease;
|
| 18 |
+
}
|
| 19 |
+
.card-hover:hover {
|
| 20 |
+
transform: translateY(-5px);
|
| 21 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 22 |
+
}
|
| 23 |
+
</style>
|
| 24 |
+
</head>
|
| 25 |
+
<body class="min-h-screen bg-gray-50">
|
| 26 |
+
<div class="gradient-bg text-white">
|
| 27 |
+
<div class="container mx-auto px-4 py-12">
|
| 28 |
+
<header class="flex justify-between items-center mb-8">
|
| 29 |
+
<div class="flex items-center space-x-2">
|
| 30 |
+
<i data-feather="database" class="w-8 h-8"></i>
|
| 31 |
+
<h1 class="text-3xl font-bold">SupaConnect</h1>
|
| 32 |
+
</div>
|
| 33 |
+
<button id="authButton" class="bg-white text-indigo-600 px-6 py-2 rounded-full font-medium hover:bg-gray-100 transition">
|
| 34 |
+
Sign In
|
| 35 |
+
</button>
|
| 36 |
+
</header>
|
| 37 |
+
|
| 38 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-12">
|
| 39 |
+
<div>
|
| 40 |
+
<h2 class="text-4xl font-bold mb-4">Supabase Magic at Your Fingertips</h2>
|
| 41 |
+
<p class="text-xl mb-6 opacity-90">Connect, manage, and visualize your Supabase data with this powerful dashboard.</p>
|
| 42 |
+
<div class="flex space-x-4">
|
| 43 |
+
<button id="getStartedBtn" class="bg-white text-indigo-600 px-8 py-3 rounded-full font-bold hover:bg-gray-100 transition">
|
| 44 |
+
Get Started
|
| 45 |
+
</button>
|
| 46 |
+
<button class="bg-transparent border-2 border-white text-white px-8 py-3 rounded-full font-bold hover:bg-white hover:bg-opacity-10 transition">
|
| 47 |
+
Documentation
|
| 48 |
+
</button>
|
| 49 |
+
</div>
|
| 50 |
+
</div>
|
| 51 |
+
<div class="flex items-center justify-center">
|
| 52 |
+
<div class="bg-white bg-opacity-10 p-6 rounded-2xl backdrop-blur-md border border-white border-opacity-20 w-full max-w-md">
|
| 53 |
+
<div class="flex justify-between items-center mb-6">
|
| 54 |
+
<h3 class="text-xl font-semibold">Quick Connect</h3>
|
| 55 |
+
<i data-feather="zap" class="w-5 h-5"></i>
|
| 56 |
+
</div>
|
| 57 |
+
<div class="space-y-4">
|
| 58 |
+
<div class="bg-white bg-opacity-5 p-4 rounded-lg">
|
| 59 |
+
<label class="block text-sm mb-1 opacity-80">Project URL</label>
|
| 60 |
+
<input type="text" id="supabaseUrl" placeholder="https://yourproject.supabase.co" class="w-full bg-transparent border-b border-white border-opacity-30 py-2 focus:outline-none focus:border-opacity-100">
|
| 61 |
+
</div>
|
| 62 |
+
<div class="bg-white bg-opacity-5 p-4 rounded-lg">
|
| 63 |
+
<label class="block text-sm mb-1 opacity-80">API Key</label>
|
| 64 |
+
<input type="password" id="supabaseKey" placeholder="your-anon-key" class="w-full bg-transparent border-b border-white border-opacity-30 py-2 focus:outline-none focus:border-opacity-100">
|
| 65 |
+
</div>
|
| 66 |
+
<button id="connectBtn" class="w-full bg-white text-indigo-600 py-3 rounded-lg font-medium hover:bg-gray-100 transition flex items-center justify-center">
|
| 67 |
+
<i data-feather="link" class="w-4 h-4 mr-2"></i>
|
| 68 |
+
Connect to Supabase
|
| 69 |
+
</button>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<div class="container mx-auto px-4 py-16">
|
| 78 |
+
<div class="text-center mb-16">
|
| 79 |
+
<h2 class="text-3xl font-bold mb-4">Supabase Features Made Simple</h2>
|
| 80 |
+
<p class="text-gray-600 max-w-2xl mx-auto">Manage your database, authentication, storage, and more through our intuitive interface.</p>
|
| 81 |
+
</div>
|
| 82 |
+
|
| 83 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-16">
|
| 84 |
+
<div class="bg-white p-8 rounded-xl shadow-md card-hover">
|
| 85 |
+
<div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-6">
|
| 86 |
+
<i data-feather="database" class="text-indigo-600 w-6 h-6"></i>
|
| 87 |
+
</div>
|
| 88 |
+
<h3 class="text-xl font-bold mb-3">Database Explorer</h3>
|
| 89 |
+
<p class="text-gray-600 mb-4">Browse, query, and manage your Postgres tables with a beautiful interface.</p>
|
| 90 |
+
<a href="#" class="text-indigo-600 font-medium inline-flex items-center">
|
| 91 |
+
Try it now <i data-feather="arrow-right" class="w-4 h-4 ml-2"></i>
|
| 92 |
+
</a>
|
| 93 |
+
</div>
|
| 94 |
+
<div class="bg-white p-8 rounded-xl shadow-md card-hover">
|
| 95 |
+
<div class="w-12 h-12 bg-pink-100 rounded-lg flex items-center justify-center mb-6">
|
| 96 |
+
<i data-feather="users" class="text-pink-600 w-6 h-6"></i>
|
| 97 |
+
</div>
|
| 98 |
+
<h3 class="text-xl font-bold mb-3">User Management</h3>
|
| 99 |
+
<p class="text-gray-600 mb-4">View and manage your Supabase Auth users with advanced filtering options.</p>
|
| 100 |
+
<a href="#" class="text-indigo-600 font-medium inline-flex items-center">
|
| 101 |
+
Try it now <i data-feather="arrow-right" class="w-4 h-4 ml-2"></i>
|
| 102 |
+
</a>
|
| 103 |
+
</div>
|
| 104 |
+
<div class="bg-white p-8 rounded-xl shadow-md card-hover">
|
| 105 |
+
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-6">
|
| 106 |
+
<i data-feather="hard-drive" class="text-purple-600 w-6 h-6"></i>
|
| 107 |
+
</div>
|
| 108 |
+
<h3 class="text-xl font-bold mb-3">Storage Browser</h3>
|
| 109 |
+
<p class="text-gray-600 mb-4">Upload, organize, and manage your files in Supabase Storage buckets.</p>
|
| 110 |
+
<a href="#" class="text-indigo-600 font-medium inline-flex items-center">
|
| 111 |
+
Try it now <i data-feather="arrow-right" class="w-4 h-4 ml-2"></i>
|
| 112 |
+
</a>
|
| 113 |
+
</div>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<div class="bg-gray-50 rounded-xl p-8 mb-16">
|
| 117 |
+
<div class="flex flex-col md:flex-row items-center">
|
| 118 |
+
<div class="md:w-1/2 mb-8 md:mb-0">
|
| 119 |
+
<h3 class="text-2xl font-bold mb-4">Ready to connect your Supabase project?</h3>
|
| 120 |
+
<p class="text-gray-600 mb-6">Get started in seconds and unlock the full potential of your Supabase backend.</p>
|
| 121 |
+
<button id="connectCtaBtn" class="bg-indigo-600 text-white px-8 py-3 rounded-full font-bold hover:bg-indigo-700 transition flex items-center">
|
| 122 |
+
<i data-feather="database" class="w-5 h-5 mr-2"></i>
|
| 123 |
+
Connect Now
|
| 124 |
+
</button>
|
| 125 |
+
</div>
|
| 126 |
+
<div class="md:w-1/2 flex justify-center">
|
| 127 |
+
<div class="bg-white p-6 rounded-xl shadow-md max-w-md w-full">
|
| 128 |
+
<div class="flex items-center mb-4">
|
| 129 |
+
<div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
|
| 130 |
+
<div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
|
| 131 |
+
<div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
|
| 132 |
+
<div class="flex-1"></div>
|
| 133 |
+
<i data-feather="maximize-2" class="text-gray-400 w-4 h-4"></i>
|
| 134 |
+
</div>
|
| 135 |
+
<div class="bg-gray-100 p-4 rounded-lg overflow-x-auto">
|
| 136 |
+
<code class="text-sm text-gray-800">
|
| 137 |
+
// Initialize Supabase client<br>
|
| 138 |
+
const supabase = createClient(<br>
|
| 139 |
+
'https://yourproject.supabase.co',<br>
|
| 140 |
+
'your-anon-key'<br>
|
| 141 |
+
);<br><br>
|
| 142 |
+
// Example query<br>
|
| 143 |
+
const { data, error } = await supabase<br>
|
| 144 |
+
.from('todos')<br>
|
| 145 |
+
.select('*')<br>
|
| 146 |
+
.limit(10);
|
| 147 |
+
</code>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
</div>
|
| 154 |
+
|
| 155 |
+
<footer class="bg-gray-100 py-12">
|
| 156 |
+
<div class="container mx-auto px-4">
|
| 157 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
| 158 |
+
<div class="flex items-center space-x-2 mb-6 md:mb-0">
|
| 159 |
+
<i data-feather="database" class="text-indigo-600 w-6 h-6"></i>
|
| 160 |
+
<span class="font-bold text-gray-800">SupaConnect</span>
|
| 161 |
+
</div>
|
| 162 |
+
<div class="flex space-x-6">
|
| 163 |
+
<a href="#" class="text-gray-600 hover:text-indigo-600 transition">Docs</a>
|
| 164 |
+
<a href="#" class="text-gray-600 hover:text-indigo-600 transition">GitHub</a>
|
| 165 |
+
<a href="#" class="text-gray-600 hover:text-indigo-600 transition">Twitter</a>
|
| 166 |
+
<a href="#" class="text-gray-600 hover:text-indigo-600 transition">Terms</a>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
<div class="border-t border-gray-200 mt-8 pt-8 text-center text-gray-500 text-sm">
|
| 170 |
+
<p>© 2023 SupaConnect. Not affiliated with Supabase.</p>
|
| 171 |
+
</div>
|
| 172 |
+
</div>
|
| 173 |
+
</footer>
|
| 174 |
+
|
| 175 |
+
<script>
|
| 176 |
+
// Initialize Supabase client
|
| 177 |
+
const supabase = createClient(
|
| 178 |
+
'https://yourproject.supabase.co',
|
| 179 |
+
'your-anon-key'
|
| 180 |
+
);
|
| 181 |
+
|
| 182 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 183 |
+
feather.replace();
|
| 184 |
+
|
| 185 |
+
// Connect button functionality
|
| 186 |
+
document.getElementById('connectBtn').addEventListener('click', () => {
|
| 187 |
+
const supabaseUrl = document.getElementById('supabaseUrl').value;
|
| 188 |
+
const supabaseKey = document.getElementById('supabaseKey').value;
|
| 189 |
+
|
| 190 |
+
if (supabaseUrl && supabaseKey) {
|
| 191 |
+
try {
|
| 192 |
+
// Initialize client with user's credentials
|
| 193 |
+
const supabase = createClient(supabaseUrl, supabaseKey);
|
| 194 |
+
localStorage.setItem('supabaseUrl', supabaseUrl);
|
| 195 |
+
localStorage.setItem('supabaseKey', supabaseKey);
|
| 196 |
+
|
| 197 |
+
// Show success message
|
| 198 |
+
alert('Successfully connected to Supabase!');
|
| 199 |
+
// Redirect to dashboard (would be implemented in a real app)
|
| 200 |
+
// window.location.href = 'dashboard.html';
|
| 201 |
+
} catch (error) {
|
| 202 |
+
console.error('Error connecting to Supabase:', error);
|
| 203 |
+
alert('Failed to connect. Please check your URL and API key.');
|
| 204 |
+
}
|
| 205 |
+
} else {
|
| 206 |
+
alert('Please enter both your Supabase URL and API key.');
|
| 207 |
+
}
|
| 208 |
+
});
|
| 209 |
+
|
| 210 |
+
// Get started and CTA buttons
|
| 211 |
+
const ctaButtons = ['getStartedBtn', 'connectCtaBtn'];
|
| 212 |
+
ctaButtons.forEach(btnId => {
|
| 213 |
+
document.getElementById(btnId).addEventListener('click', () => {
|
| 214 |
+
document.getElementById('supabaseUrl').focus();
|
| 215 |
+
});
|
| 216 |
+
});
|
| 217 |
+
|
| 218 |
+
// Check for stored credentials
|
| 219 |
+
const storedUrl = localStorage.getItem('supabaseUrl');
|
| 220 |
+
const storedKey = localStorage.getItem('supabaseKey');
|
| 221 |
+
if (storedUrl && storedKey) {
|
| 222 |
+
document.getElementById('supabaseUrl').value = storedUrl;
|
| 223 |
+
document.getElementById('supabaseKey').value = storedKey;
|
| 224 |
+
}
|
| 225 |
+
});
|
| 226 |
+
</script>
|
| 227 |
+
</body>
|
| 228 |
</html>
|