Skip to content

Commit 50f3ac6

Browse files
authored
Merge pull request #2027 from appwrite/add-react-native-quickstart
Add react native quick-start + light and dark screenshots in all sites quickstarts
2 parents e6db475 + ba8eff4 commit 50f3ac6

File tree

14 files changed

+128
-2
lines changed

14 files changed

+128
-2
lines changed

src/routes/docs/products/sites/develop/+page.markdoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@ Your site's dependencies should be managed by the package manager of each langua
173173

174174
---
175175

176+
- {% icon icon="react-native" size="m" /%}
177+
- **React Native**
178+
- `npm`
179+
- `npm install`
180+
- `npm run build`
181+
- `./dist`
182+
183+
---
184+
176185
- {% icon icon="js" size="m" /%}
177186
- **Other JavaScript**
178187
- `npm`

src/routes/docs/products/sites/frameworks/+page.markdoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ This means you can focus on building your application while Appwrite handles the
6868

6969
---
7070

71+
- {% icon icon="react-native" size="m" /%}
72+
- [**React Native**](/docs/products/sites/quick-start/react-native)
73+
- `Static`
74+
75+
---
76+
7177
- {% icon icon="js" size="m" /%}
7278
- [**Other JavaScript**](/docs/products/sites/quick-start/vanilla)
7379
- `Static`

src/routes/docs/products/sites/quick-start/+page.markdoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Before deploying your web app with Git, create a new Site attached to your GitHu
1919
![Create site wizard](/images/docs/sites/create-site-wizard.png)
2020
{% /only_light %}
2121

22-
1. In the Appwrite Console's sidebar, click **Sites**.
23-
2. Click on the **Create site** button.
22+
1. In the Appwrite Console's sidebar, click **Sites**.
23+
2. Click on the **Create site** button.
2424
3. After clicking on **Connect Git repository**, select your repository.
2525
4. After connecting to GitHub, (optionally) add a name and site ID.
2626
5. Verify that the correct framework is selected.
@@ -61,6 +61,9 @@ Learn how to quickly setup a web app developed using any of the following framew
6161
{% cards_item href="/docs/products/sites/quick-start/flutter" title="Flutter" icon="icon-flutter" %}
6262
{% /cards_item %}
6363

64+
{% cards_item href="/docs/products/sites/quick-start/react-native" title="React Native" icon="icon-react-native" %}
65+
{% /cards_item %}
66+
6467
{% cards_item href="/docs/products/sites/quick-start/vanilla" title="Vanilla JS" icon="icon-js" %}
6568
{% /cards_item %}
6669

src/routes/docs/products/sites/quick-start/angular/+page.markdoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ Push this project to a [GitHub repo](https://github.com/new).
2121
{% section #step-2 step=2 title="Create Appwrite project" %}
2222
Head to the [Appwrite Console](https://cloud.appwrite.io).
2323

24+
{% only_dark %}
2425
![Create Appwrite project](/images/docs/quick-starts/dark/create-project.png)
26+
{% /only_dark %}
27+
{% only_light %}
28+
![Create Appwrite project](/images/docs/quick-starts/create-project.png)
29+
{% /only_light %}
2530

2631
If this is your first time using Appwrite, create an account and create your first project.
2732
{% /section %}

src/routes/docs/products/sites/quick-start/astro/+page.markdoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ Push this project to a [GitHub repo](https://github.com/new).
2020
{% section #step-2 step=2 title="Create Appwrite project" %}
2121
Head to the [Appwrite Console](https://cloud.appwrite.io).
2222

23+
{% only_dark %}
2324
![Create Appwrite project](/images/docs/quick-starts/dark/create-project.png)
25+
{% /only_dark %}
26+
{% only_light %}
27+
![Create Appwrite project](/images/docs/quick-starts/create-project.png)
28+
{% /only_light %}
2429

2530
If this is your first time using Appwrite, create an account and create your first project.
2631
{% /section %}

src/routes/docs/products/sites/quick-start/flutter/+page.markdoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ Push this project to a [GitHub repo](https://github.com/new).
2626
{% section #step-2 step=2 title="Create Appwrite project" %}
2727
Head to the [Appwrite Console](https://cloud.appwrite.io).
2828

29+
{% only_dark %}
2930
![Create Appwrite project](/images/docs/quick-starts/dark/create-project.png)
31+
{% /only_dark %}
32+
{% only_light %}
33+
![Create Appwrite project](/images/docs/quick-starts/create-project.png)
34+
{% /only_light %}
3035

3136
If this is your first time using Appwrite, create an account and create your first project.
3237
{% /section %}

src/routes/docs/products/sites/quick-start/nextjs/+page.markdoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ Push this project to a [GitHub repo](https://github.com/new).
2020
{% section #step-2 step=2 title="Create Appwrite project" %}
2121
Head to the [Appwrite Console](https://cloud.appwrite.io).
2222

23+
{% only_dark %}
2324
![Create Appwrite project](/images/docs/quick-starts/dark/create-project.png)
25+
{% /only_dark %}
26+
{% only_light %}
27+
![Create Appwrite project](/images/docs/quick-starts/create-project.png)
28+
{% /only_light %}
2429

2530
If this is your first time using Appwrite, create an account and create your first project.
2631
{% /section %}

src/routes/docs/products/sites/quick-start/nuxt/+page.markdoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ Push this project to a [GitHub repo](https://github.com/new).
2020
{% section #step-2 step=2 title="Create Appwrite project" %}
2121
Head to the [Appwrite Console](https://cloud.appwrite.io).
2222

23+
{% only_dark %}
2324
![Create Appwrite project](/images/docs/quick-starts/dark/create-project.png)
25+
{% /only_dark %}
26+
{% only_light %}
27+
![Create Appwrite project](/images/docs/quick-starts/create-project.png)
28+
{% /only_light %}
2429

2530
If this is your first time using Appwrite, create an account and create your first project.
2631
{% /section %}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: article
3+
title: Deploy a React Native app to Appwrite Sites
4+
description: Learn how to setup and deploy React Native apps on Appwrite Sites.
5+
---
6+
7+
{% section #step-1 step=1 title="Create React Native app" %}
8+
9+
First, you must either create a React Native app or setup the [React Native starter template](https://github.com/appwrite/templates-for-sites).
10+
11+
Open your terminal, and run the following command.
12+
13+
```bash
14+
npx create-expo-app my-app
15+
```
16+
17+
Once the app is created, navigate to the project directory, open the `package.json` file and add the following line under `scripts`:
18+
19+
```json
20+
"build": "expo export --platform web"
21+
```
22+
23+
Push this project to a [GitHub repo](https://github.com/new).
24+
{% /section %}
25+
26+
{% section #step-2 step=2 title="Create Appwrite project" %}
27+
Head to the [Appwrite Console](https://cloud.appwrite.io).
28+
29+
{% only_dark %}
30+
![Create Appwrite project](/images/docs/quick-starts/dark/create-project.png)
31+
{% /only_dark %}
32+
{% only_light %}
33+
![Create Appwrite project](/images/docs/quick-starts/create-project.png)
34+
{% /only_light %}
35+
36+
If this is your first time using Appwrite, create an account and create your first project.
37+
{% /section %}
38+
39+
{% section #step-3 step=3 title="Create site" %}
40+
Head to the **Sites** page in your Appwrite project, click on the **Create site** button, and select **Connect a repository**.
41+
42+
Connect your GitHub account and select the repository you intend to deploy.
43+
44+
1. Select the **production branch** and **root directory** from your repo.
45+
2. Verify that the **correct framework** is selected. In case an incorrect framework is visible, pick **React Native** from the drop-down list.
46+
3. Confirm the **install command**, **build command**, and **output directory** in the build settings. The default build settings for React Native are:
47+
- **Install command:** `npm install`
48+
- **Build command:** `npm run build`
49+
- **Output directory:** `./dist`
50+
4. Add any **environment variables** required by the site.
51+
52+
Click on the **Deploy** button.
53+
{% /section %}
54+
55+
{% section #step-4 step=4 title="Visit site" %}
56+
After successful deployment, click on the **Visit site** button.
57+
58+
{% /section %}

src/routes/docs/products/sites/quick-start/react/+page.markdoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ Push this project to a [GitHub repo](https://github.com/new).
2020
{% section #step-2 step=2 title="Create Appwrite project" %}
2121
Head to the [Appwrite Console](https://cloud.appwrite.io).
2222

23+
{% only_dark %}
2324
![Create Appwrite project](/images/docs/quick-starts/dark/create-project.png)
25+
{% /only_dark %}
26+
{% only_light %}
27+
![Create Appwrite project](/images/docs/quick-starts/create-project.png)
28+
{% /only_light %}
2429

2530
If this is your first time using Appwrite, create an account and create your first project.
2631
{% /section %}

0 commit comments

Comments
 (0)