Skip to content

Commit c49678e

Browse files
author
dng
authored
Merge pull request supabase#11819 from supabase/docs/tutorials
Update tutorials
2 parents c667d64 + cbb20b0 commit c49678e

19 files changed

+169
-376
lines changed

apps/docs/components/MDX/project_setup.mdx

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,19 @@ import UserManagementSQLTemplate from './user_management_quickstart_sql_template
22
import { Tabs } from 'ui'
33
export const TabPanel = Tabs.Panel
44

5-
# Project set up
5+
## Project setup
66

7-
Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabase
8-
and then creating a "schema" inside the database.
7+
Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabase and then creating a "schema" inside the database.
98

10-
## Create a project
9+
### Create a project
1110

12-
1. Go to [app.supabase.com](https://app.supabase.com).
13-
1. Click on "New Project".
11+
1. [Create a new project](https://app.supabase.com) in the Supabase Dashboard.
1412
1. Enter your project details.
1513
1. Wait for the new database to launch.
1614

17-
## Set up the database schema
15+
### Set up the database schema
1816

19-
Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,
20-
or you can just copy/paste the SQL from below and run it yourself.
17+
Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor, or you can just copy/paste the SQL from below and run it yourself.
2118

2219
<Tabs
2320
scrollable
@@ -31,15 +28,6 @@ or you can just copy/paste the SQL from below and run it yourself.
3128
2. Click **User Management Starter**.
3229
3. Click **Run**.
3330

34-
<video width="99%" muted playsInline controls="true">
35-
<source
36-
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/docs/sql-user-management-starter.mp4"
37-
type="video/mp4"
38-
muted
39-
playsInline
40-
/>
41-
</video>
42-
4331
</TabPanel>
4432
<TabPanel id="sql" label="SQL">
4533

@@ -48,20 +36,10 @@ or you can just copy/paste the SQL from below and run it yourself.
4836
</TabPanel>
4937
</Tabs>
5038

51-
## Get the API Keys
39+
### Get the API Keys
5240

5341
Now that you've created some database tables, you are ready to insert data using the auto-generated API.
54-
We just need to get the URL and `anon` key from the API settings.
55-
56-
1. Go to the [Settings](https://app.supabase.com/project/_/settings) page in the Dashboard.
57-
2. Click **API** in the sidebar.
58-
3. Find your API `URL`, `anon`, and `service_role` keys on this page.
42+
We just need to get the Project URL and `anon` key from the API settings.
5943

60-
<video width="99%" muted playsInline controls="true">
61-
<source
62-
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/docs/api/api-url-and-key.mp4"
63-
type="video/mp4"
64-
muted
65-
playsInline
66-
/>
67-
</video>
44+
1. Go to the [API Settings](https://app.supabase.com/project/_/settings/api) page in the Dashboard.
45+
1. Find your Project `URL`, `anon`, and `service_role` keys on this page.
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
This example provides the steps to build a basic user management app. It includes:
1+
This tutorial demonstrates how to build a basic user management app. The app authenticates and identifies the user, stores their profile information in the database, and allows the user to log in, update their profile details, and upload a profile photo. The app uses:
22

3-
- Supabase [Database](/docs/guides/database): a Postgres database for storing your user data.
4-
- Supabase [Auth](/docs/guides/auth): users can sign in with magic links (no passwords, only email).
5-
- Supabase [Storage](/docs/guides/storage): users can upload a photo.
6-
- [Row Level Security](/docs/guides/auth#row-level-security): data is protected so that individuals can only access their own data.
7-
- Instant [APIs](/docs/guides/api): APIs will be automatically generated when you create your database tables.
8-
9-
By the end of this guide you'll have an app which allows users to login and update some basic profile details:
3+
- [Supabase Database](/docs/guides/database) - a Postgres database for storing your user data and [Row Level Security](/docs/guides/auth#row-level-security) so data is protected and users can only access their own information.
4+
- [Supabase Auth](/docs/guides/auth) - users log in through magic links sent to their email (without having to set up passwords).
5+
- [Supabase Storage](/docs/guides/storage) - users can upload a profile photo.

apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const gettingstarted = {
5151
{
5252
name: 'Framework Quickstarts',
5353
items: [
54-
{ name: 'ReactJS', url: '/guides/getting-started/quickstarts/reactjs', items: [] },
54+
{ name: 'React', url: '/guides/getting-started/quickstarts/reactjs', items: [] },
5555
{ name: 'NextJS', url: '/guides/getting-started/quickstarts/nextjs', items: [] },
5656
{ name: 'Flutter', url: '/guides/getting-started/quickstarts/flutter', items: [] },
5757
{ name: 'SvelteKit', url: '/guides/getting-started/quickstarts/sveltekit', items: [] },
@@ -63,7 +63,7 @@ export const gettingstarted = {
6363
name: 'Web app tutorials',
6464
items: [
6565
{
66-
name: 'Next.js',
66+
name: 'NextJS',
6767
url: '/guides/getting-started/tutorials/with-nextjs',
6868
items: [],
6969
},

apps/docs/pages/guides/getting-started.mdx

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,23 @@ export const meta = {
3636

3737
</div>
3838

39-
### Tutorials
39+
### Framework Quickstarts
40+
41+
<div className="grid lg:grid-cols-12 gap-6 not-prose">
42+
{quickstarts.map((item) => {
43+
return (
44+
<Link href={`/${item.href}`} key={item.title} passHref>
45+
<a className={'col-span-4'}>
46+
<GlassPanel title={item.title} span="col-span-6" background={false} icon={item.icon}>
47+
{item.description}
48+
</GlassPanel>
49+
</a>
50+
</Link>
51+
)
52+
})}
53+
</div>
54+
55+
### Web App Tutorials
4056

4157
<div className="grid lg:grid-cols-12 gap-6 not-prose">
4258
{webapps.map((item) => {
@@ -52,6 +68,46 @@ export const meta = {
5268
})}
5369
</div>
5470

71+
### Mobile Tutorials
72+
73+
<div className="grid lg:grid-cols-12 gap-6 not-prose">
74+
{mobile.map((item) => {
75+
return (
76+
<Link href={`/${item.href}`} key={item.title} passHref>
77+
<a className={'col-span-4'}>
78+
<GlassPanel title={item.title} span="col-span-6" background={false} icon={item.icon}>
79+
{item.description}
80+
</GlassPanel>
81+
</a>
82+
</Link>
83+
)
84+
})}
85+
</div>
86+
87+
export const quickstarts = [
88+
{
89+
title: 'React',
90+
href: '/guides/getting-started/quickstarts/reactjs',
91+
description:
92+
'Learn how to create a Supabase project, add some sample data to your database, and query the data from a React app.',
93+
icon: '/docs/img/icons/react-icon',
94+
},
95+
{
96+
title: 'NextJS',
97+
href: '/guides/getting-started/quickstarts/nextjs',
98+
description:
99+
'Learn how to create a Supabase project, add some sample data to your database, and query the data from a NextJS app.',
100+
icon: '/docs/img/icons/nextjs-icon',
101+
},
102+
{
103+
title: 'Flutter',
104+
href: '/guides/getting-started/quickstarts/flutter',
105+
description:
106+
'Learn how to create a Supabase project, add some sample data to your database, and query the data from a Flutter app.',
107+
icon: '/docs/img/icons/flutter-icon',
108+
},
109+
]
110+
55111
export const webapps = [
56112
{
57113
title: 'NextJS',
@@ -109,6 +165,9 @@ export const webapps = [
109165
'Learn how to build a user management app with SvelteKit and Supabase Database, Auth, and Storage functionality.',
110166
icon: '/docs/img/icons/svelte-icon',
111167
},
168+
]
169+
170+
export const mobile = [
112171
{
113172
title: 'Flutter',
114173
href: '/guides/getting-started/tutorials/with-flutter',

apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import Layout from '~/layouts/DefaultGuideLayout'
22

33
export const meta = {
4-
id: 'with-angular',
5-
title: 'Quickstart: Angular',
4+
title: 'Build a User Management App with Angular',
65
description: 'Learn how to use Supabase in your Angular App.',
7-
sidebar_label: 'Angular',
86
}
97

108
<QuickstartIntro />
119

1210
![Supabase User Management example](/docs/img/user-management-demo.png)
1311

14-
### GitHub
15-
16-
Should you get stuck while working through the guide, refer to [this repo](https://github.com/supabase/supabase/tree/master/examples/user-management/angular-user-management).
12+
<Admonition type="note">
13+
If you get stuck while working through this guide, refer to the [full example on
14+
GitHub](https://github.com/supabase/supabase/tree/master/examples/user-management/angular-user-management).
15+
</Admonition>
1716

1817
<ProjectSetup />
1918

@@ -192,11 +191,7 @@ export class AuthComponent {
192191
/>
193192
</div>
194193
<div>
195-
<button
196-
type="submit"
197-
class="button block"
198-
[disabled]="loading"
199-
>
194+
<button type="submit" class="button block" [disabled]="loading">
200195
{{ loading ? 'Loading' : 'Send magic link' }}
201196
</button>
202197
</div>
@@ -529,13 +524,8 @@ export class AccountComponent implements OnInit {
529524

530525
<StorageManagement />
531526

532-
## Next steps
533-
534527
At this stage you have a fully functional application!
535528

536-
- Got a question? [Ask here](https://github.com/supabase/supabase/discussions).
537-
- Sign in: [app.supabase.com](https://app.supabase.com)
538-
539529
export const Page = ({ children }) => <Layout meta={meta} children={children} />
540530

541531
export default Page

apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import Layout from '~/layouts/DefaultGuideLayout'
22

33
export const meta = {
4-
id: 'with-expo',
5-
title: 'Quickstart: Expo',
4+
title: 'Build a User Management App with Expo',
65
description: 'Learn how to use Supabase in your React Native App.',
7-
sidebar_label: 'Expo',
8-
hide_table_of_contents: false,
96
}
107

118
<QuickstartIntro />
129

1310
![Supabase User Management example](/docs/img/supabase-flutter-demo.png)
1411

15-
### GitHub
16-
17-
Should you get stuck while working through the guide, refer to [this repo](https://github.com/supabase/supabase/tree/master/examples/user-management/expo-user-management).
12+
<Admonition type="note">
13+
If you get stuck while working through this guide, refer to the [full example on
14+
GitHub](https://github.com/supabase/supabase/tree/master/examples/user-management/expo-user-management).
15+
</Admonition>
1816

1917
<ProjectSetup />
2018

@@ -504,13 +502,8 @@ expo prebuild
504502

505503
<StorageManagement />
506504

507-
## Next steps
508-
509505
At this stage you have a fully functional application!
510506

511-
- Got a question? [Ask here](https://github.com/supabase/supabase/discussions).
512-
- Sign in: [app.supabase.com](https://app.supabase.com)
513-
514507
export const Page = ({ children }) => <Layout meta={meta} children={children} />
515508

516509
export default Page

apps/docs/pages/guides/getting-started/tutorials/with-flutter.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import Layout from '~/layouts/DefaultGuideLayout'
22

33
export const meta = {
4-
id: 'with-flutter',
5-
title: 'Quickstart: Flutter',
4+
title: 'Build a User Management App with Flutter',
65
description: 'Learn how to use Supabase in your Flutter App.',
7-
sidebar_label: 'Flutter',
86
}
97

108
<QuickstartIntro />
119

1210
![Supabase User Management example](/docs/img/supabase-flutter-demo.png)
1311

14-
### GitHub
15-
16-
Should you get stuck while working through the guide, refer to [this repo](https://github.com/supabase/supabase/tree/master/examples/user-management/flutter-user-management).
12+
<Admonition type="note">
13+
If you get stuck while working through this guide, refer to the [full example on
14+
GitHub](https://github.com/supabase/supabase/tree/master/examples/user-management/flutter-user-management).
15+
</Admonition>
1716

1817
<ProjectSetup />
1918

@@ -77,7 +76,7 @@ Add an intent-filter to enable deep linking:
7776
</manifest>
7877
```
7978

80-
For iOS, edit the ios/Runner/Info.plist file.
79+
For iOS, edit the ios/Runner/Info.plist file.
8180

8281
Add CFBundleURLTypes to enable deep linking:
8382

@@ -797,14 +796,13 @@ class _AccountPageState extends State<AccountPage> {
797796

798797
<StorageManagement />
799798

800-
Congratulations, that is it! You have now built a fully functional user management app using Flutter and Supabase!
799+
Congratulations, you've built a fully functional user management app using Flutter and Supabase!
801800

802801
## See also
803802

804803
- [Flutter Tutorial: building a Flutter chat app](https://supabase.com/blog/flutter-tutorial-building-a-chat-app)
805804
- [Flutter Tutorial - Part 2: Authentication and Authorization with RLS](https://supabase.com/blog/flutter-authentication-and-authorization-with-rls)
806805

807-
808806
export const Page = ({ children }) => <Layout meta={meta} children={children} />
809807

810808
export default Page

apps/docs/pages/guides/getting-started/tutorials/with-ionic-angular.mdx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import Layout from '~/layouts/DefaultGuideLayout'
22

33
export const meta = {
4-
id: 'with-ionic-angular',
5-
title: 'Quickstart: Ionic Angular',
4+
title: 'Build a User Management App with Ionic Angular',
65
description: 'Learn how to use Supabase in your Ionic Angular App.',
7-
sidebar_label: 'Ionic Angular',
86
}
97

108
<QuickstartIntro />
119

1210
![Supabase User Management example](/docs/img/ionic-demos/ionic-angular-account.png)
1311

14-
### GitHub
15-
16-
Should you get stuck while working through the guide, refer to [this repo](https://github.com/mhartington/supabase-ionic-angular).
12+
<Admonition type="note">
13+
If you get stuck while working through this guide, refer to the [full example on
14+
GitHub](https://github.com/mhartington/supabase-ionic-angular).
15+
</Admonition>
1716

1817
<ProjectSetup />
1918

@@ -526,14 +525,9 @@ template: `
526525

527526
<StorageManagement />
528527

529-
## Next steps
530-
531528
At this stage you have a fully functional application!
532529

533-
- Got a question? [Ask here](https://github.com/supabase/supabase/discussions).
534-
- Sign in: [app.supabase.com](https://app.supabase.com)
535-
536-
## Resources
530+
## See also
537531

538532
- [Authentication in Ionic Angular with Supabase](https://supabase.com/blog/authentication-in-ionic-angular)
539533

0 commit comments

Comments
 (0)