Skip to content

Commit e707ce6

Browse files
author
Mike Barnes
committed
More docs updates
1 parent eaac814 commit e707ce6

File tree

1 file changed

+28
-63
lines changed

1 file changed

+28
-63
lines changed

README.md

Lines changed: 28 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,77 +4,28 @@
44

55
A templated Vite, TS, React, PowerSync and Supabase project to get you started quickly with building offline-first applications with PowerSync and Supabase.
66

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:
22-
23-
```bash
24-
npx degit powersync-community/vite-react-ts-powersync-supabase
25-
```
26-
27-
> **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:
35-
36-
```bash
37-
git clone https://github.com/powersync-community/vite-react-ts-powersync-supabase.git
38-
```
39-
40-
</details>
41-
42-
<details>
43-
<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-
547
# Usage
558

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:
9+
## Install dependencies
6510

6611
```bash
67-
cd vite-react-ts-powersync-supabase
6812
npm install
6913
```
7014

71-
## Local Setup
15+
## Local Development
7216

73-
First, copy the environment template file:
17+
### Prerequisites
18+
- Docker Desktop
19+
- [Supabase CLI](supabase.com/docs/guides/local-development/cli/getting-started)
20+
21+
Follow the two steps below to run the entire PowerSync + Supabase stack locally using Docker without requiring any sign up.
22+
23+
1. Copy the environment template file:
7424
```bash
7525
cp .env.local.template .env.local
7626
```
77-
Then run the start-up commands for the various services:
27+
28+
2. Run the start-up commands for the various services:
7829
```bash
7930
npm run dev:supabase
8031
npm run dev:powersync
@@ -83,9 +34,11 @@ npm run dev:ui
8334

8435
Navigate to the local Vite URL e.g. http://localhost:5173/ Voilà!
8536

86-
## Cloud Setup
37+
## Cloud Development
38+
39+
To run the hosted versions of PowerSync + Supabase, follow the steps below.
8740

88-
### Requirements
41+
### Prerequisites
8942

9043
| Tool/Service | Version / Info | Notes |
9144
|------------------|----------------------------|--------------------------------------------------------|
@@ -110,7 +63,7 @@ Follow these steps to set up your backend with Supabase and PowerSync (Or you ca
11063
<details>
11164
<summary><strong>Option 2: Setup using the Supabase CLI</strong></summary>
11265

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:
11467
1. Login to your Supabase Account `npx supabase login`
11568
2. Initialize your project `npx supabase init`
11669
3. Enable "anonymous sign-ins" for the project [here](https://supabase.com/dashboard/project/_/auth/providers)
@@ -244,3 +197,15 @@ VITE_POWERSYNC_URL=
244197
2. Select your project
245198
3. Navigate to your PowerSync instance
246199
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.
210+
211+
</details>

0 commit comments

Comments
 (0)