# Quickstart template **Category:** Task content. **Reader question:** "How do I get set up with my framework?" A quickstart takes a reader from nothing to an app in their framework that reads data from a Supabase project, in one sitting. Each framework gets one page in `content/guides/getting-started/quickstarts/`, and every page has the same steps, so a reader who has followed one can follow any. Leave out explanations and extra features, and link to a tutorial or an explainer instead. When a page needs more than reading data to make sense, such as sign-in or file uploads, write a tutorial. ## Frontmatter Set the following fields, and leave out `description`. The docs use the subtitle as the page's meta description: - `title`: `Use Supabase with `, such as `Use Supabase with Next.js`. Keep it to 35 characters or fewer. - `subtitle`: one sentence that says what the reader builds, starting with `Learn how to`. - `breadcrumb`: `Framework Quickstarts`. ## Headings, in order The following outline lists the page's headings for a guide that uses `quickstart_db_setup.mdx`. Override each numbered heading's ID with the one shown, and number the headings from where the partial before them leaves off: ```text ## Prerequisites <- optional ## 1. Create a Supabase project <- partial ## 2. Set up your database <- partial ## 3. Create a app [#create-an-app] ## 4. Set up AI tooling (optional) [#set-up-ai-tooling] ## 5. Install the Supabase client library [#install-the-client-library] <- optional ## 6. Declare Supabase environment variables [#declare-environment-variables] ## 7. Create the Supabase client [#create-the-client] <- optional ## 8. Query data from the app [#query-data] ## 9. Start the app [#start-the-app] ## Production requirements <- partial ## Next steps ``` The following headings vary by framework: - **Prerequisites**: add it only for tools the framework doesn't already imply, such as Java 17 for Spring Boot. - **Steps 1 and 2**: take them from a partial. See [Use the shared partials](#use-the-shared-partials). - **Install the Supabase client library**: name it for what the reader does, such as `Install dependencies`, and keep its ID. Leave it out when the scaffold installs the packages. - **Declare Supabase environment variables**: leave it out of mobile apps, which put the placeholders in the client step. - **Create the Supabase client**: leave it out when the scaffold already creates the client. - **A step the framework needs**: add it between the others, with an ID that names what it does, such as `## 6. Configure Astro for SSR [#configure-astro-for-ssr]`. Put at least one sentence under every heading. ## Write the opening Start the page with ``, before any heading. Add the slug as a key in `apps/docs/data/ai-prompts.data.ts`. Then add `## Prerequisites` if the page needs it, followed by the first partial. ## Use the shared partials Every quickstart shares the same text for the same steps. Use the following partials instead of copying their text: | Partial | Step | Use it when | | ------------------------------------ | ----------------------- | ------------------------------------------------------------------------------------------------------------ | | `quickstart_db_setup.mdx` | 1 and 2 | The app reads the sample `instruments` table through a Supabase client library | | `quickstart_create_project.mdx` | 1 | The app connects to Postgres through its own ORM. Add one sentence saying it uses the framework's own tables | | `quickstart_ai_tooling.mdx` | Set up AI tooling | Always | | `api_settings.mdx` | Environment variables | The app uses a Supabase client library | | `quickstart_connection_string.mdx` | Environment variables | The app connects to Postgres through one session pooler string | | `quickstart_mobile_env_note.mdx` | Environment variables | A mobile app uses `YOUR_SUPABASE_URL` placeholders instead of a `.env` file | | `quickstart_going_to_production.mdx` | Production requirements | Always. It supplies its own heading, so don't add one | ## Write the steps Every step does one thing the reader can check. Follow these rules for the steps that differ between frameworks: - **Environment variables**: read credentials from environment variables, never literal values in code. Add the `Open Connect panel` button before the code block. - **Client**: when the scaffold creates the client, say where the file lives in the step that first imports it. - **Query**: handle the error before using the data, in the language's own way, such as `try`/`catch` in Kotlin. The `getInstruments` function in the React quickstart is the model. - **Writes**: when the app inserts or updates data, add the grants and RLS policies in an earlier step. `quickstart_db_setup.mdx` grants `select` to `anon` only. - **Start the app**: say where the app runs, such as its local URL or the Unity editor, and what the reader sees there. ## Write next steps List the following links in this order: the framework's Auth guide, or [Auth](/docs/guides/auth) when there isn't one, then importing data, then Storage, then the [Supabase UI Library](/library). Link the UI Library only for frameworks in `supportedFrameworks` in `apps/ui-library/config/docs.ts`. ## Add the page to navigation Add the page to `apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts`. To show it on the getting started pages too, add it to `getting-started.data.ts`, `FrameworkQuickstarts.constants.ts`, and `GettingStarted.frameworks.ts`. These three need a square icon in `apps/docs/public/img/icons/` with an explicit fill color, so it shows in dark mode. ## Example The following example shows the first steps of [Use Supabase with React](/docs/guides/getting-started/quickstarts/reactjs), with the code removed. The steps after it follow the outline in the same way: ```mdx --- title: 'Use Supabase with React' subtitle: 'Learn how to create a Supabase project, add some sample data to your database, and query the data from a React app.' breadcrumb: 'Framework Quickstarts' --- <$Partial path="quickstart_db_setup.mdx" /> ## 3. Create a React app [#create-an-app] Create a React app using a [Vite](https://vite.dev/guide/) template. ## 4. Set up AI tooling (optional) [#set-up-ai-tooling] <$Partial path="quickstart_ai_tooling.mdx" /> ``` ## Checklist Before you open a pull request, check the following: - [ ] The page starts with ``, and its slug is in `ai-prompts.data.ts`. - [ ] The headings follow the outline, numbered without gaps, and each numbered heading ends with the ID the outline gives it. - [ ] Shared steps use their partial instead of copied text. - [ ] Credentials come from environment variables, or from placeholders in a mobile client step, and every query handles its error. - [ ] Next steps links the UI Library only for a supported framework. - [ ] The page is in `NavigationMenu.constants.ts`.