You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-63Lines changed: 28 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,77 +4,28 @@
4
4
5
5
A templated Vite, TS, React, PowerSync and Supabase project to get you started quickly with building offline-first applications with PowerSync and Supabase.
6
6
7
-
# How to use this template
8
-
9
-
There are a few ways you can use this template. We recommend using the first option for a quick start.
10
-
11
-
<details>
12
-
<summary><strong>1. Generate from template (Recommended)</strong></summary>
13
-
14
-
Generate a repository from this [template](https://github.com/powersync-community/vite-react-ts-powersync-supabase/generate).
15
-
16
-
</details>
17
-
18
-
<details>
19
-
<summary><strong>2. Use degit</strong></summary>
20
-
21
-
Use [degit](https://github.com/Rich-Harris/degit) to scaffold the project:
> **Note**: `degit` is a tool that downloads the latest version of a repository without the git history, giving you a clean starting point. Add a second argument to specify your project name (e.g., my-app).
28
-
29
-
</details>
30
-
31
-
<details>
32
-
<summary><strong>3. Clone the repository</strong></summary>
33
-
34
-
Clone the repository directly and install dependencies:
<summary><strong>4. Start with bolt.new</strong></summary>
44
-
45
-
Start the project using [bolt.new](https://bolt.new):
46
-
47
-
- Open this [link](https://bolt.new/github.com/powersync-community/vite-react-ts-powersync-supabase/tree/main) to load the project.
48
-
- You will see a configuration error in the preview window because the `.env.local` file has not yet been defined.
49
-
- Create a new `.env.local` file and populate it with the appropriate Supabase and PowerSync credentials, as specified in the `.env.local.template` file included in this repository (refer to step 4 "Set up environment").
50
-
- Save the file — the app should launch automatically.
51
-
52
-
</details>
53
-
54
7
# Usage
55
8
56
-
## Prerequisites
57
-
- Node 20.js or higher and npm.
58
-
- Docker Desktop (if you want to run the entire stack locally, more details to follow).
59
-
60
-
There are two ways to run the project:
61
-
1. Run the full stack locally. No signups required.
62
-
2. Connect your local client to PowerSync Cloud and Supabase.
63
-
64
-
After cloning the repository, navigate to the project directory and install the dependencies:
@@ -110,7 +63,7 @@ Follow these steps to set up your backend with Supabase and PowerSync (Or you ca
110
63
<details>
111
64
<summary><strong>Option 2: Setup using the Supabase CLI</strong></summary>
112
65
113
-
If you prefer using the Supabase CLI, you can set up your project as follows:
66
+
If you prefer using the Supabase CLI to develop the database locally and push it to a Supabase cloud later, you can set up your project as follows:
114
67
1. Login to your Supabase Account `npx supabase login`
115
68
2. Initialize your project `npx supabase init`
116
69
3. Enable "anonymous sign-ins" for the project [here](https://supabase.com/dashboard/project/_/auth/providers)
@@ -244,3 +197,15 @@ VITE_POWERSYNC_URL=
244
197
2. Select your project
245
198
3. Navigate to your PowerSync instance
246
199
4. Copy the "Instance URL" for `VITE_POWERSYNC_URL`
200
+
201
+
<details>
202
+
<summary><strong>4. Start with bolt.new</strong></summary>
203
+
204
+
Start the project using [bolt.new](https://bolt.new):
205
+
206
+
- Open this [link](https://bolt.new/github.com/powersync-community/vite-react-ts-powersync-supabase/tree/main) to load the project.
207
+
- You will see a configuration error in the preview window because the `.env.local` file has not yet been defined.
208
+
- Create a new `.env.local` file and populate it with the appropriate Supabase and PowerSync credentials, as specified in the `.env.local.template` file included in this repository (refer to step 4 "Set up environment").
209
+
- Save the file — the app should launch automatically.
0 commit comments