mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03: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? Feature — the visual redesign itself. Part 5 of 6 in a stack that splits the library redesign into reviewable pieces. The four PRs beneath it carry the build, content and Markdown work; what's left here is layout, navigation and styling. ## What is the current behavior? The library is laid out like a documentation site: a sidebar tree of framework folders, a homepage that lists links, and a guide page that opens with prose. That shape suits reference material, but the library's job is to help someone find a block and install it — and the sidebar is the only way to discover one. ## What is the new behavior? The homepage is the catalog itself — blocks grouped by what they do (authentication, database, storage, realtime, messaging, AI, foundations) rather than by framework, each with a preview of what it renders, filterable by category. Navigation moves into a site header whose Explore menu opens the same categories, so the catalog is reachable from any page and the per-page sidebar tree is gone. A guide opens with what the reader came for: the block's name, the install command, and a preview pane with tabs — the running component and its files — before any prose. The file tree that used to sit mid-page under "Folder structure" is one of those tabs. Every guide also offers a copy of the agent prompt that points at its Markdown. Getting-started pages get the same treatment: the quickstart is now a framework-tabbed walkthrough rather than a wall of setup links. ## Additional context `BlockOverviewTabs` renders Preview and Files here. #50369, stacked on top of this one, adds the third "What's added" tab — it is the only part of the redesign that depends on the new resource analyzer, which is why it sits above this PR rather than below it. Also removes what the redesign orphaned: the table-of-contents component and its `remark` / `mdast-util-toc` dependencies, and the sidebar nav and command-item configuration the new header replaced. The block source changes are typography only — auth card titles move from `text-2xl` to `font-medium text-lg tracking-normal` — which is what regenerates the auth registry artifacts. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a redesigned Supabase Library catalog with categorized blocks, framework-aware navigation, previews, file views, and installation actions. * Added framework-specific quickstart guides for Next.js, React, Vue, Nuxt, React Router, and TanStack Start. * Added copy-to-clipboard prompts, “Open in v0” actions, starter templates, and richer visual previews. * **Improvements** * Updated documentation layouts, FAQ content, typography, navigation, accessibility, and responsive behavior. * Improved mobile navigation, framework selection, and standardized block installation guidance. * Refined authentication and social-login block presentation with more consistent heading styles. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
76 lines
3.0 KiB
Plaintext
76 lines
3.0 KiB
Plaintext
---
|
|
title: SaaS Starter
|
|
description: A Next.js subscription app with Supabase Auth and Stripe billing
|
|
preview: |-
|
|
<BlockOverview name="saas-starter">
|
|
<div className="library-component-preview h-80 overflow-hidden border md:h-96">
|
|
<CatalogPreview kind="dashboard" />
|
|
</div>
|
|
</BlockOverview>
|
|
---
|
|
|
|
The [Supabase Community subscription template](https://github.com/supabase-community/nextjs-subscription-payments) includes authentication, subscription checkout, a customer portal, and database migrations. Its components and billing routes are installed together when you create the app.
|
|
|
|
## Installation
|
|
|
|
### Create the app
|
|
|
|
Scaffold the complete template with the [Next.js CLI](https://nextjs.org/docs/app/api-reference/cli/create-next-app):
|
|
|
|
```bash
|
|
npx create-next-app@latest my-saas --example https://github.com/supabase-community/nextjs-subscription-payments --use-pnpm
|
|
cd my-saas
|
|
```
|
|
|
|
The scaffold uses the template's dependency versions and includes its authentication implementation. Review dependency updates before deploying your app.
|
|
|
|
## Start Supabase
|
|
|
|
Install [Docker](https://docs.docker.com/get-started/get-docker/) and the [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started). Copy the template's environment files, then start its local database and migrations:
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
cp .env.local.example .env.local
|
|
pnpm supabase:start
|
|
```
|
|
|
|
Use the values printed by `pnpm supabase:status` to fill in `.env.local`:
|
|
|
|
```env
|
|
NEXT_PUBLIC_SUPABASE_URL=your-local-api-url
|
|
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-local-anon-key
|
|
SUPABASE_SERVICE_ROLE_KEY=your-local-service-role-key
|
|
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your-stripe-test-publishable-key
|
|
STRIPE_SECRET_KEY=your-stripe-test-secret-key
|
|
STRIPE_WEBHOOK_SECRET=your-local-webhook-signing-secret
|
|
```
|
|
|
|
These names match the template. Keep `SUPABASE_SERVICE_ROLE_KEY`, `STRIPE_SECRET_KEY`, and `STRIPE_WEBHOOK_SECRET` in server environment variables.
|
|
|
|
## Connect Stripe
|
|
|
|
Install the [Stripe CLI](https://docs.stripe.com/stripe-cli), sign in, and keep webhook forwarding running in a separate terminal:
|
|
|
|
```bash
|
|
pnpm stripe:login
|
|
pnpm stripe:listen
|
|
```
|
|
|
|
Copy the listener's signing secret into `STRIPE_WEBHOOK_SECRET`. Start the app in another terminal:
|
|
|
|
```bash
|
|
pnpm dev
|
|
```
|
|
|
|
Load the template's sample test products after the app and webhook listener are running:
|
|
|
|
```bash
|
|
pnpm stripe:fixtures
|
|
```
|
|
|
|
Open [the app](http://localhost:3000), create an account, and test a subscription. Configure the [Stripe customer portal](https://dashboard.stripe.com/test/settings/billing/portal) to let customers change or cancel their plans.
|
|
|
|
## Deploy the app
|
|
|
|
Follow the template's [deployment setup](https://github.com/supabase-community/nextjs-subscription-payments#step-by-step-setup) for the hosted database, Auth URLs, production Stripe keys, and webhook endpoint. The template's [package scripts](https://github.com/supabase-community/nextjs-subscription-payments/blob/main/package.json) cover local migrations and billing fixtures.
|