mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 12:25:05 +03:00
Remove old content
This commit is contained in:
1 parent
c9e08bc169
commit
29da83b806
8 files changed
+5
-230
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { WhatWillILearn } from '@/components/what-will-i-learn'
|
||||
import Link from 'next/link'
|
||||
import { Activity, BookOpen, Database, Gauge, Wrench } from 'lucide-react'
|
||||
import { BookOpen, Database } from 'lucide-react'
|
||||
import { Badge, Button, Card, CardDescription, CardHeader } from 'ui'
|
||||
|
||||
// Horizontal grid line component
|
||||
@@ -19,31 +19,6 @@ export default function Home() {
|
||||
icon: Database,
|
||||
level: 'Beginner',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'Project: Smart Office',
|
||||
description: 'Build a realtime room-booking dashboard using Supabase.',
|
||||
chapters: 15,
|
||||
icon: Activity,
|
||||
level: 'Intermediate',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: 'Supabase Internals: Performance & Scaling',
|
||||
description: 'Learn how to profile queries, tune indexes, and scale Postgres with Supabase.',
|
||||
chapters: 20,
|
||||
icon: Gauge,
|
||||
level: 'Advanced',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: 'Supabase Internals: Debugging & Operations',
|
||||
description:
|
||||
'Understand how to diagnose slow queries, use read replicas, and manage production workloads.',
|
||||
chapters: 20,
|
||||
icon: Wrench,
|
||||
level: 'Advanced',
|
||||
},
|
||||
]
|
||||
return (
|
||||
<main className="relative lg:-ml-10">
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
import {
|
||||
BarChart3,
|
||||
CalendarRange,
|
||||
Database,
|
||||
History,
|
||||
Lock,
|
||||
Network,
|
||||
Rocket,
|
||||
Timer,
|
||||
} from 'lucide-react'
|
||||
import Image from 'next/image'
|
||||
import { Database, Lock, Network, Rocket } from 'lucide-react'
|
||||
import { Card, CardDescription, CardHeader, CardTitle } from 'ui'
|
||||
|
||||
const learningTracks = [
|
||||
@@ -83,56 +73,6 @@ export function WhatWillILearn() {
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<div className="mt-8">
|
||||
<h4 className="text-lg font-bold mb-2">Smart Office project</h4>
|
||||
<p className="text-base text-foreground-light">
|
||||
In the Smart Office project, you'll learn how to build a full-featured Dashboard:
|
||||
</p>
|
||||
<div className="grid grid-cols-12 gap-12 mt-6">
|
||||
<div className="col-span-6">
|
||||
<Image
|
||||
src={'/img/smart-office.png'}
|
||||
alt="Smart Office project dashboard screenshot"
|
||||
className="w-full h-auto"
|
||||
width={1000}
|
||||
height={875}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-6">
|
||||
<ul className="grid gap-6 text-foreground-light ">
|
||||
<li className="grid grid-cols-[auto,1fr] gap-3 border-b border-border/40 pb-3">
|
||||
<span className="flex h-9 w-9 items-center justify-center rounded-md bg-brand-500/10 text-brand-500">
|
||||
<Timer className="h-5 w-5" />
|
||||
</span>
|
||||
<span>Real-time room monitoring that tracks live occupancy, sensor readings</span>
|
||||
</li>
|
||||
<li className="grid grid-cols-[auto,1fr] gap-3 border-b border-border/40 pb-3">
|
||||
<span className="flex h-9 w-9 items-center justify-center rounded-md bg-brand-500/10 text-brand-500">
|
||||
<CalendarRange className="h-5 w-5" />
|
||||
</span>
|
||||
<span>Booking management with live status filters, calendar integrations.</span>
|
||||
</li>
|
||||
<li className="grid grid-cols-[auto,1fr] gap-3 border-b border-border/40 pb-3">
|
||||
<span className="flex h-9 w-9 items-center justify-center rounded-md bg-brand-500/10 text-brand-500">
|
||||
<History className="h-5 w-5" />
|
||||
</span>
|
||||
<span>
|
||||
Advanced analytics that surface 30+ days of utilization trends and patterns.
|
||||
</span>
|
||||
</li>
|
||||
<li className="grid grid-cols-[auto,1fr] gap-3">
|
||||
<span className="flex h-9 w-9 items-center justify-center rounded-md bg-brand-500/10 text-brand-500">
|
||||
<BarChart3 className="h-5 w-5" />
|
||||
</span>
|
||||
<span>
|
||||
Detect capacity issues, open facilities tasks, and track resolution SLAs without
|
||||
leaving the app.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -7,7 +7,6 @@ export const courses: SidebarNavGroup = {
|
||||
title: 'Foundations',
|
||||
href: '/foundations',
|
||||
items: [
|
||||
// ✅ Always visible (no requiresAuth)
|
||||
{
|
||||
title: 'Introduction',
|
||||
href: '/foundations/introduction',
|
||||
@@ -40,7 +39,6 @@ export const courses: SidebarNavGroup = {
|
||||
title: 'Edge Functions',
|
||||
href: '/foundations/edge-functions',
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Vector Search',
|
||||
href: '/foundations/vector',
|
||||
@@ -48,21 +46,6 @@ export const courses: SidebarNavGroup = {
|
||||
],
|
||||
commandItemLabel: 'Foundations',
|
||||
},
|
||||
{
|
||||
title: 'Project: Smart Office',
|
||||
href: '/projects/smart-office',
|
||||
commandItemLabel: 'Project: Smart Office',
|
||||
},
|
||||
{
|
||||
title: 'Performance & Scaling',
|
||||
href: '/internals/performance-scaling',
|
||||
commandItemLabel: 'Supabase Internals: Performance & Scaling',
|
||||
},
|
||||
{
|
||||
title: 'Debugging & Operations',
|
||||
href: '/internals/debugging-operations',
|
||||
commandItemLabel: 'Supabase Internals: Debugging & Operations',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
title: Grafana
|
||||
description: 'Learn how to use Grafana'
|
||||
chapterNumber: 8
|
||||
---
|
||||
|
||||
This is an internal guide for Grafana.
|
||||
It doesn't have an external equivalent.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
title: Realtime
|
||||
description: 'Learn how to build real-time applications with Supabase.'
|
||||
chapterNumber: 6
|
||||
---
|
||||
|
||||
This is the internal realtime guide.
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
title: Platform Kit
|
||||
description: The easiest way to build platforms on top of Supabase
|
||||
---
|
||||
|
||||
<video width="100%" muted autoPlay controls>
|
||||
<source
|
||||
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/marketing/blog/platform-kit/platform-kit.mp4"
|
||||
type="video/mp4"
|
||||
/>
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
|
||||
## Installation
|
||||
|
||||
See the [Supabase Platform Kit documentation](https://supabase.com/docs) for installation instructions.
|
||||
|
||||
## Introduction
|
||||
|
||||
The Platform Kit is a collection of customizable API's, hooks and components you can use to provide an embedded Supabase experience within your own platform. It comes in the form of a single dialog that enables the management of database, authentication, storage, users, secrets, logs, and performance monitoring.
|
||||
|
||||
**Features**
|
||||
|
||||
- Database, Auth, Storage, User, Secrets, Logs, and Performance management
|
||||
- Responsive dialog/drawer interface (desktop & mobile)
|
||||
- API proxy for Management API
|
||||
- AI-powered SQL generation (optional)
|
||||
- Customize to your liking
|
||||
|
||||
## Who is it for
|
||||
|
||||
Anyone who is providing Postgres databases to their users.
|
||||
|
||||
## Usage
|
||||
|
||||
Embed the manager dialog in your app and manage its state:
|
||||
|
||||
```tsx
|
||||
import { useState } from 'react'
|
||||
import { useMobile } from '@/hooks/use-mobile'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import SupabaseManagerDialog from '@/components/supabase-manager'
|
||||
|
||||
export default function Example() {
|
||||
const [open, setOpen] = useState(false)
|
||||
const projectRef = 'your-project-ref' // Replace with your actual project ref
|
||||
const isMobile = useMobile()
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button onClick={() => setOpen(true)}>Open Supabase Manager</Button>
|
||||
<SupabaseManagerDialog
|
||||
projectRef={projectRef}
|
||||
open={open}
|
||||
onOpenChange={setOpen}
|
||||
isMobile={isMobile}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. **Set up environment variables:** in your `.env.local` file:
|
||||
|
||||
```bash
|
||||
SUPABASE_MANAGEMENT_API_TOKEN=your-personal-access-token
|
||||
NEXT_PUBLIC_ENABLE_AI_QUERIES=true
|
||||
OPENAI_API_KEY=your-openai-api-key
|
||||
```
|
||||
|
||||
2. **Add project-level authentication checks** in your API proxy at `app/api/supabase-proxy/[...path]/route.ts` as well as your ai/sql route at `app/api/ai/sql/route.ts` to ensure only authorized users can access their own project resources.
|
||||
|
||||
3. **Add a Toaster for notifications:**
|
||||
Place the following component at the root of your app (e.g., in your `layout.tsx` or `App.tsx`) to enable toast notifications:
|
||||
|
||||
```tsx
|
||||
import { Toaster } from '@/components/ui/sonner'
|
||||
|
||||
export default function RootLayout({ children }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<head />
|
||||
<body>
|
||||
<main>{children}</main>
|
||||
<Toaster />
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
That's it! The default setup uses your Supabase personal access token for the Management API.
|
||||
|
||||
## Security
|
||||
|
||||
- Never expose your Management API token to the client
|
||||
- Always implement authentication and permission checks in your proxy
|
||||
|
||||
## Further reading
|
||||
|
||||
- [Supabase Management API](https://supabase.com/docs/reference/api/introduction)
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { createContext, useContext, useEffect, useState } from 'react'
|
||||
|
||||
type Course = 'foundations' | 'smart-office' | 'performance-scaling' | 'debugging-operations'
|
||||
type Course = 'foundations'
|
||||
type CourseContextType = {
|
||||
course: Course
|
||||
setCourse: (course: Course) => void
|
||||
@@ -16,18 +16,13 @@ export function FrameworkProvider({ children }: { children: React.ReactNode }) {
|
||||
// Initialize from localStorage on mount (client-side only)
|
||||
useEffect(() => {
|
||||
const storedCourse = localStorage.getItem('preferredCourse')
|
||||
const validCourses: Course[] = [
|
||||
'foundations',
|
||||
'smart-office',
|
||||
'performance-scaling',
|
||||
'debugging-operations',
|
||||
]
|
||||
const validCourses: Course[] = ['foundations']
|
||||
if (storedCourse && validCourses.includes(storedCourse as Course)) {
|
||||
setCourseState(storedCourse as Course)
|
||||
}
|
||||
}, [])
|
||||
|
||||
// Update localStorage when framework changes
|
||||
// Update localStorage when course changes
|
||||
const setCourse = (newCourse: Course) => {
|
||||
setCourseState(newCourse)
|
||||
localStorage.setItem('preferredCourse', newCourse)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 306 KiB |
Reference in new issue
Block a user