mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? A getting-started page that sits between the architecture overview (what the pieces are) and the existing guides (how to build one). Explains which product features to add, and when, as you are building. ## What is the current behavior? - Architecture lists the services. Quickstarts show one setup. Nothing says which block to add next. ## What is the new behavior? The page tells you which Supabase piece to add next. The links open the guide that shows you how. A short table at the top maps a need to a piece: store data, know who is calling, keep rows private, handle files, run server logic, show live updates, go to production. Under that are the same seven pieces, in the order most apps grow. Stop at the last one your app needs. Every section has the same four parts: - The situation that means you need this piece - The idea to remember - The mistake to avoid - A few links to the existing guide One warning sits in the database section. The Next.js quickstart leaves its sample table public so the page can load. Come back here before that table holds private data. ## Additional context - Page: `the-supabase-way-to-build.mdx`. Tiles: `the-supabase-way-to-build.data.ts`. Nav: second item under Build with AI tools. - Explainer only. It links out for the how. - Needs an SME read. Placement is interim. ### [The Supabase way to build (Preview)](https://docs-git-nikrichers-docs-1389-experimental-the-9beaf4-supabase.vercel.app/docs/guides/getting-started/the-supabase-way-to-build) <img width="2222" height="15924" alt="Image2026-10-26_01-54-16_PM" src="https://github.com/user-attachments/assets/caf02275-6c7e-4b35-be7f-659953e86bd6" /> ### Test plan - [ ] Preview renders, and the sidebar entry is second under Build with AI tools. - [ ] Each section has a Build it group of links. - [ ] Database stage points at API keys and says the quickstart's public read is temporary. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the “The Supabase Way to Build” guide, covering Database, Auth, RLS, Realtime, Storage, Edge Functions, and production hardening. - Added curated “Build it” links for each section to help readers find relevant guides. - Included guidance on securing data, files, credentials, and browser-accessible resources. - **Documentation** - Updated the Getting Started navigation to link to the new guide. - Clarified Storage policies, RLS behavior, public buckets, and secure secret management. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Nik Richers <nik@validmind.ai> Co-authored-by: Miranda Limonczenko <miranda.limonczenko@supabase.io>
73 lines
2.1 KiB
TypeScript
73 lines
2.1 KiB
TypeScript
'use client'
|
|
|
|
import type { ContentListingIcon } from '~/lib/content-listings.schema'
|
|
import {
|
|
Auth,
|
|
Axiom,
|
|
Database,
|
|
Datadog,
|
|
EdgeFunctions,
|
|
Grafana,
|
|
Last9,
|
|
Otlp,
|
|
Realtime,
|
|
Sentry,
|
|
Storage,
|
|
} from 'icons'
|
|
import { BadgeCheck, Braces, Cloud, Server, Shield } from 'lucide-react'
|
|
import type { ReactNode } from 'react'
|
|
|
|
type IconKind = Extract<ContentListingIcon, { kind: string }>['kind']
|
|
|
|
const ICON_KIND_COMPONENTS: Record<IconKind, ReactNode> = {
|
|
braces: <Braces className="h-5 w-5" strokeWidth={1.5} />,
|
|
otlp: <Otlp className="h-5 w-5" />,
|
|
datadog: <Datadog className="h-5 w-5" />,
|
|
grafana: <Grafana className="h-5 w-5" />,
|
|
cloud: <Cloud className="h-5 w-5" strokeWidth={1.5} />,
|
|
sentry: <Sentry className="h-5 w-5" />,
|
|
axiom: <Axiom className="h-5 w-5" />,
|
|
last9: <Last9 className="h-5 w-5" />,
|
|
server: <Server className="h-5 w-5" strokeWidth={1.5} />,
|
|
}
|
|
|
|
const PRODUCT_ICONS = {
|
|
database: Database,
|
|
auth: Auth,
|
|
rls: Shield,
|
|
storage: Storage,
|
|
functions: EdgeFunctions,
|
|
realtime: Realtime,
|
|
production: BadgeCheck,
|
|
} as const
|
|
|
|
export function resolveContentListingIcon(
|
|
icon: ContentListingIcon | undefined
|
|
): ReactNode | string | undefined {
|
|
if (typeof icon === 'string' && icon in PRODUCT_ICONS) {
|
|
const Icon = PRODUCT_ICONS[icon as keyof typeof PRODUCT_ICONS]
|
|
return <Icon className="h-5 w-5" strokeWidth={1.5} />
|
|
}
|
|
if (icon && typeof icon === 'object') {
|
|
return (
|
|
<span
|
|
className="flex h-10 w-10 items-center justify-center rounded-full text-base font-semibold"
|
|
style={{ color: icon.color, backgroundColor: icon.bg }}
|
|
>
|
|
{ICON_KIND_COMPONENTS[icon.kind]}
|
|
</span>
|
|
)
|
|
}
|
|
// GlassPanel picks -light via next-themes; class-based dark: is more reliable for
|
|
// Reflex (near-black light mark vanishes on dark cards if theme resolution lags).
|
|
if (typeof icon === 'string' && icon.endsWith('/reflex-icon')) {
|
|
return (
|
|
<>
|
|
<img src={`${icon}-light.svg`} alt="" className="w-5 dark:hidden" />
|
|
<img src={`${icon}.svg`} alt="" className="w-5 hidden dark:block" />
|
|
</>
|
|
)
|
|
}
|
|
return icon
|
|
}
|