[READ-ONLY] Mirror of https://github.com/flo-bit/atproto-notify.
3.3 kB
notify.atmo.tools — mobile (Expo / React Native)#
iOS + Android app: sign in with atproto, register for push, and get full dashboard parity with the web (inbox, apps, requests, channels, settings).
- Bundle id / package:
tools.atmo.notifs.app - OAuth host:
https://notify.atmo.tools(serves the client metadata + docs) - OAuth client_id:
https://notify.atmo.tools/mobile/oauth-client-metadata.json - Redirect scheme:
tools.atmo.notify://oauth/callback(reverse-DNS of the host) - Relay:
https://notifs.atmo.tools(did:web:notifs.atmo.tools)
Run it#
From this directory (the app is a workspace in the monorepo):
pnpm install # at the repo root
npx expo install --fix # reconcile native module versions to the SDK
npx expo start # Metro; press i / a, or use a dev build
The version pins in
package.jsonare a best-effort starting point. Runnpx expo install --fixonce so everyexpo-*/react-nativepackage matches the installed Expo SDK. Typed routes (.expo/types) are generated byexpo start/expo customize, so run the app once beforepnpm typecheck.
Push notifications need a development build (Expo Go can't get a native device push token):
eas build --profile development # then: npx expo start --dev-client
Architecture#
lib/auth/—@atproto/oauth-client-exposingleton + aSessionProviderReact context (useSession).client-metadata.tsmust stay byte-compatible with the JSON the website serves.lib/relay/—callRelay()mints a service-auth JWT on the user's PDS (com.atproto.server.getServiceAuth,aud = did:web:notifs.atmo.tools) and calls the relay;queries.tswraps each endpoint as a React Query hook.lib/push/— request permission, get the native APNs/FCM token (getDevicePushTokenAsync), callregisterDevice; handle foreground + tapped notifications and deep-link to/notif/<id>.lib/db/—expo-sqliteinbox cache;sync.tsreconciles with the relay'slistNotifications(newest-first, keyset floor). The inbox renders from the local DB; push + pull-to-refresh keep it fresh.lib/theme/— color/scale tokens (useColors()), light/dark via the system scheme.app/— Expo Router. Onboarding (welcome → sign-in → permissions → ready), then tabs Inbox / Apps / Settings. Pending requests live atop the Apps tab with an approval bottom sheet.notif/[id]andapps/[did]are detail screens.
Build & deploy#
- Dev:
eas build --profile developmentthennpx expo start --dev-client. - TestFlight / Play Internal:
eas build --profile productiontheneas submit. - An Apple Developer account ($99/yr) is needed for TestFlight / App Store; the free Google Play tier allows internal testing.
- APNs / FCM credentials are configured on the relay — see
DEVELOPMENT.md.
Notes / assumptions#
- The exact
@atproto/oauth-client-expoAPI (e.g.signIn/restorereturn shapes) is pinned to0.0.10; if you bump it, re-checklib/auth/session.tsx. - Native push requires the iOS Push entitlement (App ID) and an Android FCM setup (google-services) — these are part of the EAS build, not the JS.