Skip to content

Commit be8d8d8

Browse files
authored
Merge pull request #83 from powersync-ja/todolist-demo-vite
Switch from NextJS -> Vite for demos
2 parents aede9e7 + 1aed928 commit be8d8d8

File tree

123 files changed

+2755
-1709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+2755
-1709
lines changed

.changeset/fair-flowers-type.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@journeyapps/powersync-sdk-react-native": minor
3+
"@journeyapps/powersync-sdk-common": minor
4+
"@journeyapps/powersync-sdk-web": minor
5+
---
6+
7+
Fix PowerSyncBackendConnector.fetchCredentials type to allow returning null

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ _Bad connectivity is everywhere, and we're tired of it. PowerSync is on a missio
3939

4040
Demo applications are located in the [`demos/`](./demos/) directory. Also see our [Demo Apps / Example Projects](https://docs.powersync.com/resources/demo-apps-example-projects) gallery which lists all projects by the backend and client-side framework they use.
4141

42-
- [demos/nextjs-supabase-todolist](./demos/nextjs-supabase-todolist/): A Next.js to-do list example app using the PowerSync Web SDK and a Supabase backend.
43-
- [demos/yjs-nextjs-supabase-text-collab](./demos/yjs-nextjs-supabase-text-collab/README.md): A Next.js real-time text editing collaboration example app powered by [Yjs](https://github.com/yjs/yjs) CRDTs and [Tiptap](https://tiptap.dev/), using the PowerSync Web SDK and a Supabase backend.
42+
- [demos/react-supabase-todolist](./demos/react-supabase-todolist/): A React to-do list example app using the PowerSync Web SDK and a Supabase backend.
43+
- [demos/yjs-react-supabase-text-collab](./demos/yjs-react-supabase-text-collab/README.md): A React real-time text editing collaboration example app powered by [Yjs](https://github.com/yjs/yjs) CRDTs and [Tiptap](https://tiptap.dev/), using the PowerSync Web SDK and a Supabase backend.
4444
- [demos/react-native-supabase-todolist](./demos/react-native-supabase-todolist): A React Native to-do list example app using a Supabase backend.
4545
- [demos/angular-supabase-todolist](./demos/angular-supabase-todolist/README.md) An Angular to-do list example app using the PowerSync Web SDK and a Supabase backend.
4646
- [demos/example-webpack](./demos/example-webpack/README.md): A minimal example demonstrating bundling with Webpack.
4747
- [demos/example-vite](./demos/example-vite/README.md): A minimal example demonstrating bundling with Vite.
48+
- [demos/example-nextjs](./demos/example-nextjs/README.md): An example demonstrating setup with Next.js.
4849

4950
# Development
5051

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copy to .env.local, and complete these variables.
2+
# Leave blank to test local-only.
3+
NEXT_PUBLIC_POWERSYNC_URL=
4+
NEXT_PUBLIC_POWERSYNC_TOKEN=
File renamed without changes.

demos/example-nextjs/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# PowerSync Next.js example
2+
3+
This example is built using [Next.js](https://nextjs.org/) and the [PowerSync JS web SDK](https://docs.powersync.com/client-sdk-references/js-web).
4+
5+
To see it in action:
6+
7+
1. Make sure to run `pnpm build:packages` in the root directory of this Git repo.
8+
2. Copy `.env.local.template` to `.env.local`, and complete the environment variables. You can generate a [temporary development token](https://docs.powersync.com/usage/installation/authentication-setup/development-tokens), or leave blank to test with local-only data.
9+
3. `pnpm start`
10+
4. Open the localhost URL in the browser displayed in the terminal output.

demos/example-nextjs/package.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "@journeyapps/powersync-example-nextjs",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"build": "next build",
7+
"clean": "rm -rf .next",
8+
"watch": "next dev",
9+
"start": "next start",
10+
"lint": "next lint"
11+
},
12+
"dependencies": {
13+
"@emotion/react": "^11.11.4",
14+
"@emotion/styled": "^11.11.0",
15+
"@fontsource/roboto": "^5.0.12",
16+
"@journeyapps/powersync-react": "workspace:*",
17+
"@journeyapps/powersync-sdk-web": "workspace:*",
18+
"@journeyapps/wa-sqlite": "~0.1.1",
19+
"@lexical/react": "^0.11.3",
20+
"@mui/icons-material": "^5.15.12",
21+
"@mui/material": "^5.15.12",
22+
"fast-glob": "^3.3.2",
23+
"formik": "^2.4.5",
24+
"highlight.js": "^11.9.0",
25+
"js-logger": "^1.6.1",
26+
"lato-font": "^3.0.0",
27+
"lexical": "^0.11.3",
28+
"lodash": "^4.17.21",
29+
"lowlight": "^2.9.0",
30+
"next": "14.1.0",
31+
"next-images": "1.8.5",
32+
"react": "^18.2.0",
33+
"react-dom": "^18.2.0",
34+
"remixicon": "^2.5.0",
35+
"shiki": "^0.10.1",
36+
"simplify-js": "^1.2.4",
37+
"uuid": "9.0.1"
38+
},
39+
"devDependencies": {
40+
"@types/lodash": "^4.14.202",
41+
"@types/node": "^20.11.25",
42+
"@types/react": "^18.2.64",
43+
"@types/react-dom": "^18.2.21",
44+
"@types/uuid": "9.0.8",
45+
"autoprefixer": "^10.4.18",
46+
"babel-loader": "^9.1.3",
47+
"css-loader": "^6.10.0",
48+
"eslint": "^8.57.0",
49+
"eslint-config-next": "14.0.0",
50+
"postcss": "^8.4.35",
51+
"sass": "^1.71.1",
52+
"sass-loader": "^13.3.3",
53+
"style-loader": "^3.3.4",
54+
"tailwindcss": "^3.4.1"
55+
}
56+
}

0 commit comments

Comments
 (0)