Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Jun 11, 2024
1 parent da8e73b commit dd4c6a7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ pnpm dev

```sh
# in another tab
cd apps/frontend
cd apps/app
cp .env.example .env
pnpm dev
```

Expand Down Expand Up @@ -117,10 +118,9 @@ TODO better version where the token is also never exposed to the network so not

## Todos

- create a new invitation needs a change in react-native-libsodium (use noble?)
- show pending changes in the sidebar and the list

- deploy to production (before move the repo & cleanup readme and make on initial commit)
- cleanup readme and make on initial commit
- logo

- web: focus on input after adding item
Expand All @@ -132,5 +132,6 @@ TODO better version where the token is also never exposed to the network so not
- allow to delete list (needs a tombstone and properly cleanup local stores)
- allow to create lists locally

- lock down OPAQUE public key in the clients
- allow to sync lists in the background
- fix websocket session auth in secsync
2 changes: 2 additions & 0 deletions apps/app/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXPO_PUBLIC_API_ENDPOINT=http://localhost:3030/api
EXPO_PUBLIC_SECSYNC_WS_ENDPOINT=ws://localhost:3030
2 changes: 2 additions & 0 deletions apps/app/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXPO_PUBLIC_API_ENDPOINT=http://localhost:3030/api
EXPO_PUBLIC_SECSYNC_WS_ENDPOINT=ws://localhost:3030
13 changes: 11 additions & 2 deletions apps/app/eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@
}
},
"preview": {
"distribution": "internal"
"distribution": "internal",
"env": {
"EXPO_PUBLIC_API_ENDPOINT": "https://lini-api-production.fly.dev/api",
"EXPO_PUBLIC_SECSYNC_WS_ENDPOINT": "wss://lini-api-production.fly.dev"
}
},
"production": {}
"production": {
"env": {
"EXPO_PUBLIC_API_ENDPOINT": "https://lini-api-production.fly.dev/api",
"EXPO_PUBLIC_SECSYNC_WS_ENDPOINT": "wss://lini-api-production.fly.dev"
}
}
},
"submit": {
"production": {}
Expand Down
2 changes: 1 addition & 1 deletion apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"main": "src/AppEntry.ts",
"version": "1.0.0",
"scripts": {
"dev": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start --dev-client -c",
"dev": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start --dev-client",
"ts:check": "tsc --noEmit",
"test": "jest",
"lint": "echo \"Lint not setup\" # expo lint"
Expand Down
3 changes: 1 addition & 2 deletions apps/app/src/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ const DARK_THEME: Theme = {
colors: NAV_THEME.dark,
};

// TODO PROD API URL
const apiUrl = "http://localhost:3030/api";
const apiUrl = process.env.EXPO_PUBLIC_API_ENDPOINT;

// Catch any errors thrown by the Layout component.
export { ErrorBoundary } from "expo-router";
Expand Down
5 changes: 1 addition & 4 deletions apps/app/src/components/document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ import { position } from "../utils/position";
import { serialize } from "../utils/serialize";
import { trpc } from "../utils/trpc";

const websocketEndpoint =
process.env.NODE_ENV === "development"
? "ws://localhost:3030"
: "wss://secsync.fly.dev";
const websocketEndpoint = process.env.EXPO_PUBLIC_SECSYNC_WS_ENDPOINT as string;

type Props = {
documentId: string;
Expand Down

0 comments on commit dd4c6a7

Please sign in to comment.