Skip to content

Commit 28fc45e

Browse files
committed
Resolve conflict
2 parents 63dfb60 + b4cd43f commit 28fc45e

Some content is hidden

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

63 files changed

+7822
-1754
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
EXPO_PUBLIC_SUPABASE_URL=https://durbqntqcbthnzeyncft.supabase.co
2+
EXPO_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImR1cmJxbnRxY2J0aG56ZXluY2Z0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTYzOTk0MDksImV4cCI6MjAxMTk3NTQwOX0.mbYtqYHt6vX1K5p9KjjLgiCmveWkHdSUH3dgdVTHBNs
3+
EXPO_PUBLIC_POWERSYNC_URL=https://652c8d6e54e498b08255ab81.powersync.journeyapps.com
4+
EXPO_PUBLIC_EAS_PROJECT_ID=c08eefc9-7b5b-487e-85c7-22e14b7287c0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.expo
2+
node_modules
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
extends: ["universe", "universe/shared/typescript-analysis"],
3+
overrides: [
4+
{
5+
files: ["*.ts", "*.tsx", "*.d.ts"],
6+
parserOptions: {
7+
project: "./tsconfig.json",
8+
tsconfigRootDir: __dirname,
9+
},
10+
},
11+
],
12+
ignorePatterns: ["*.typegen.ts", "database.types.ts"],
13+
env: {
14+
node: true,
15+
},
16+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
node_modules/
2+
.expo/
3+
dist/
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
13+
# macOS
14+
.DS_Store
15+
16+
# Temporary files created by Metro to check the health of the file watcher
17+
.metro-health-check*
18+
19+
# .env
20+
*.ipa
21+
*.tar.gz
22+
.tamagui
23+
ios/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PowerChat - Demo app for the PowerSync React Native Client SDK
2+
3+
This is a demo app built to showcase how to use PowerSync to built an offline-first React Native app. The app is built with Expo/React Native, and uses Supabase as the backend. The following video gives an overview of the implemented functionality:
4+
5+
<https://github.com/journeyapps/powersync-supabase-react-native-group-chat-demo/assets/91166910/f93c484a-437a-44b3-95ab-f5864a99ca1f>
6+
7+
Here are some steps to keep in mind when building/deploying your own version of this app:
8+
9+
1. Deploy a Supabase backend based on the configuration and migrations contained in the [supabase](./supabase) folder. The API URL and public API Key from your Supabase project need to be replaced in the [.env](./.env) file.
10+
11+
2. Create a PowerSync instance using the [PowerSync dashboard](https://powersync.journeyapps.com/) and connect the instance to your Supabase backend. Copy the Sync Rules from the [sync-rules.yml](./sync-rules.yml) of this repository into the sync-rules.yaml within the PowerSync dashboard. Copy the PowerSync instance URL from the dashboard and replace it in the [.env](./.env) file.
12+
13+
3. Create an Expo project and replace the EAS project id in the [.env](./.env) file.
14+
15+
> Please note: If you leave the values within the [.env](./.env) file as they are (none of them are sensitive secret's btw), you can try the app with the demo backend without spinning up your own Supabase backend and PowerSync instance (as long at the demo backend is around, at least).
16+
17+
Here are some helpful links:
18+
19+
- [PowerSync Website](https://www.powersync.com/)
20+
- [PowerSync Docs](https://docs.powersync.com/)
21+
- [PowerSync React Native Client SDK](https://github.com/journeyapps/powersync-js/tree/main/packages/powersync-sdk-react-native)
22+
- [Supabase Docs](https://supabase.com/docs)
23+
- [Expo Docs](https://docs.expo.dev/)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { type ExpoConfig } from "expo/config";
2+
3+
const projectId = process.env.EXPO_PUBLIC_EAS_PROJECT_ID;
4+
5+
const config: ExpoConfig = {
6+
name: "PowerChat",
7+
slug: "powerchat",
8+
scheme: "powerchat",
9+
version: "1.0.0",
10+
orientation: "portrait",
11+
icon: "./assets/icon.png",
12+
userInterfaceStyle: "automatic",
13+
splash: {
14+
image: "./assets/splash.png",
15+
resizeMode: "contain",
16+
backgroundColor: "#cb62ff",
17+
},
18+
updates: {
19+
url: `https://u.expo.dev/${projectId}`,
20+
},
21+
assetBundlePatterns: ["**/*"],
22+
ios: {
23+
supportsTablet: true,
24+
bundleIdentifier: "com.powerchat",
25+
config: {
26+
usesNonExemptEncryption: false,
27+
},
28+
jsEngine: "jsc",
29+
},
30+
experiments: {
31+
tsconfigPaths: true,
32+
},
33+
android: {
34+
adaptiveIcon: {
35+
foregroundImage: "./assets/adaptive-icon.png",
36+
backgroundColor: "#ffffff",
37+
},
38+
},
39+
web: {
40+
favicon: "./assets/favicon.png",
41+
bundler: "metro",
42+
},
43+
extra: {
44+
eas: {
45+
projectId,
46+
},
47+
},
48+
runtimeVersion: {
49+
policy: "sdkVersion",
50+
},
51+
plugins: [
52+
"expo-router"
53+
]
54+
};
55+
56+
export default config;
554 KB
Loading
554 KB
Loading
2.07 MB
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = function (api) {
2+
api.cache(true);
3+
return {
4+
presets: ["babel-preset-expo"],
5+
plugins: [
6+
[
7+
"@tamagui/babel-plugin",
8+
{
9+
components: ["tamagui"],
10+
config: "./src/tamagui.config.ts",
11+
},
12+
],
13+
"@babel/plugin-transform-async-generator-functions",
14+
"react-native-reanimated/plugin",
15+
],
16+
};
17+
};

0 commit comments

Comments
 (0)