mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem * the getting started page is a stack of content listings: an overview, use cases, framework quickstarts and tutorials * a new reader must find a path in that list, and the page gives no commands or agent prompt for their setup ## Solution * adds a stepper to the getting started page, so a reader gets the steps and an agent prompt for their setup * adds the `docs-getting-started-v2` posthog flag, so the stepper and the current page can run as an a/b test * adds events for stepper choices, link clicks and prompt copies, so the test can compare the two pages * adds a markdown export of the stepper, so the `.md` page lists every path for agents * moves the iso shapes from kb into `ui-patterns`, so the docs feature cards use the same shapes as the kb heroes * changes the edge functions shape to a flat puzzle piece, because the old shape had too many parts <!-- linear:table-colwidths:397,397 --> <table> <thead> <tr> <th>state</th> <th>preview</th> </tr> </thead> <tbody> <tr> <td>after</td> <td> https://github.com/user-attachments/assets/7127d817-4240-4d08-a1c9-6ada1b1b2563 </td> </tr> </tbody> </table> ## Review instructions 1. open [/docs/guides/getting-started?docs-getting-started-v2=stepper](<https://docs-git-docs-getting-started-explorations-supabase.vercel.app/docs/guides/getting-started?docs-getting-started-v2=stepper>) and make sure that the stepper shows with agent selected 2. select next.js and the auth card, then make sure that the setup prompt names next.js and has a step for auth 3. open [/docs/guides/getting-started?docs-getting-started-v2=stepper&start=cli&fw=nextjs](<https://docs-git-docs-getting-started-explorations-supabase.vercel.app/docs/guides/getting-started?docs-getting-started-v2=stepper&start=cli&fw=nextjs>) and make sure that connect your app shows the install command and the quickstart button ## Checklist Check all before review: - [X] I have read [CONTRIBUTING.md](<https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md>) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](<https://github.com/supabase/supabase/tree/master/apps/docs/style-guide>)
116 lines
3.2 KiB
TypeScript
116 lines
3.2 KiB
TypeScript
import { setupCommand } from '~/components/HomePageCover.constants'
|
|
import { type IsoShapeName } from 'ui-patterns/IsoShape/IsoShape.shapes'
|
|
|
|
import { FRAMEWORKS } from './GettingStarted.frameworks'
|
|
|
|
export interface ExploreItem {
|
|
id: string
|
|
name: string
|
|
feature: string
|
|
description: string
|
|
href: string
|
|
shape: IsoShapeName
|
|
shapeClassName?: string
|
|
}
|
|
|
|
interface Choices {
|
|
start: Start
|
|
fw: string | null
|
|
features: string[]
|
|
}
|
|
|
|
interface NextStep {
|
|
id: string
|
|
title: string
|
|
description: string
|
|
href: string
|
|
}
|
|
|
|
type Start = (typeof START_OPTIONS)[number]['id']
|
|
|
|
export const START_OPTIONS = [
|
|
{ id: 'agent', label: 'Agent', description: 'Your AI agent sets up Supabase for you.' },
|
|
{ id: 'cli', label: 'CLI', description: 'Run Supabase on your machine.' },
|
|
{
|
|
id: 'dashboard',
|
|
label: 'Dashboard',
|
|
description: 'Create a hosted project in the cloud.',
|
|
},
|
|
] as const
|
|
|
|
export const EXPLORE_ITEMS: ExploreItem[] = [
|
|
{
|
|
id: 'auth',
|
|
name: 'Add users',
|
|
feature: 'Auth',
|
|
description: 'Sign users in with email, passwordless links, OAuth, or phone.',
|
|
href: '/guides/auth',
|
|
shape: 'Auth',
|
|
},
|
|
{
|
|
id: 'ai-tools',
|
|
name: 'Connect your AI agent',
|
|
feature: 'AI tools',
|
|
description: 'Install the Supabase plugin, which bundles the MCP server and agent skills.',
|
|
href: '/guides/ai-tools',
|
|
shape: 'Platform',
|
|
shapeClassName: 'origin-left scale-90',
|
|
},
|
|
{
|
|
id: 'storage',
|
|
name: 'Handle files and uploads',
|
|
feature: 'Storage',
|
|
description: 'Store and serve files with access policies.',
|
|
href: '/guides/storage/quickstart',
|
|
shape: 'Storage',
|
|
},
|
|
{
|
|
id: 'realtime',
|
|
name: 'Reflect changes live',
|
|
feature: 'Realtime',
|
|
description: 'Listen to database changes, broadcast messages, and track presence.',
|
|
href: '/guides/realtime',
|
|
shape: 'Realtime',
|
|
},
|
|
{
|
|
id: 'functions',
|
|
name: 'Add server-side logic',
|
|
feature: 'Edge Functions',
|
|
description: 'Run TypeScript close to your users, for webhooks, emails, and AI calls.',
|
|
href: '/guides/functions/quickstart',
|
|
shape: 'Edge Functions',
|
|
shapeClassName: 'origin-left scale-75',
|
|
},
|
|
]
|
|
|
|
export const parseChoices = (params: { get: (key: string) => string | null }): Choices => ({
|
|
start: START_OPTIONS.find((option) => option.id === params.get('start'))?.id ?? 'agent',
|
|
fw: FRAMEWORKS.find((framework) => framework.slug === params.get('fw'))?.slug ?? null,
|
|
features: EXPLORE_ITEMS.filter((item) =>
|
|
(params.get('features') ?? '').split(',').includes(item.id)
|
|
).map((item) => item.id),
|
|
})
|
|
|
|
export const CREATE_PROJECT_URL = 'https://supabase.com/dashboard/new'
|
|
|
|
export const LOCAL_COMMANDS = [
|
|
setupCommand.installCli,
|
|
setupCommand.initialize,
|
|
setupCommand.start,
|
|
].join('\n')
|
|
|
|
export const NEXT_STEPS: NextStep[] = [
|
|
{
|
|
id: 'row-level-security',
|
|
title: 'Secure your data',
|
|
description: 'Control who can read and write each row with Row Level Security.',
|
|
href: '/guides/database/postgres/row-level-security',
|
|
},
|
|
{
|
|
id: 'production',
|
|
title: 'Go to production',
|
|
description: 'Check security, performance, and availability before you launch.',
|
|
href: '/guides/deployment/going-into-prod',
|
|
},
|
|
]
|