🔀 Fork of Bluesky (https://github.com/bluesky-social/social-app) with minor adjustments for https://zio.blue
 
 
 
 
 
 
Go to file
Paul Frazee d7b1a2e0ee Scroll to highlighted post in threads 2022-11-22 12:56:56 -06:00
.bundle
__tests__ Refactor: create src/lib to reflect actual sharing of that code 2022-11-22 12:02:31 -06:00
android Change appid to xyz.blueskyweb.app 2022-11-14 13:13:08 -06:00
ios Add web linking and proper share controls 2022-11-21 16:07:26 -06:00
public Add tabs explainer and fix 'black screen' during onboard 2022-11-17 11:21:04 -06:00
src Scroll to highlighted post in threads 2022-11-22 12:56:56 -06:00
.buckconfig
.eslintrc.js (WIP) Add initial API client 2022-06-10 11:55:09 -05:00
.gitignore
.prettierrc.js
.ruby-version
.watchmanconfig
Gemfile
README.md Add icons 2022-07-19 16:04:45 -05:00
babel.config.js Add staging env 2022-11-11 15:02:19 -06:00
index.js Rename mobile start-point index.js to avoid build issues 2022-09-09 11:29:22 -05:00
metro.config.js Rename bundle-id to xyz.blueskyweb.pubsq in android 2022-06-15 21:49:03 -05:00
package.json Poll periodically for new posts 2022-11-17 12:33:19 -06:00
todos.txt Add a server instance selector and drop env vars 2022-11-15 15:09:50 -06:00
tsconfig.json
yarn.lock Poll periodically for new posts 2022-11-17 12:33:19 -06:00

README.md

Social App

In-progress social app.

Uses:

TODOs

  • Handle the "unauthed" state better than changing route definitions
    • Currently it's possible to get a 404 if the auth state changes

Build instructions

  • Setup your environment using the react native instructions.
  • After initial setup:
    • cd ios ; pod install
  • Start the dev servers
    • yarn dev-pds
    • yarn dev-wallet
  • Run the dev app
    • iOS: yarn ios
    • Android: yarn android
    • Web: yarn web
  • Tips
    • npx react-native info Checks what has been installed.
    • On M1 macs, you need to exclude "arm64" from the target architectures
      • Annoyingly this must be re-set via XCode after every pod install
    • The android simulator won't be able to access localhost services unless you run adb reverse tcp:{PORT} tcp:{PORT}
      • For instance, the localhosted dev-wallet will need adb reverse tcp:3001 tcp:3001
    • For some reason, the typescript compiler chokes on platform-specific files (e.g. foo.native.ts) but only when compiling for Web thus far. Therefore we always have one version of the file which doesn't use a platform specifier, and that should bee the Web version. (More info.)

Various notes

Env vars

Set using the .env file or using bash.

REACT_APP_AUTH_LOBBY = 'http://localhost:3001'

Build behaviors

The metro.config.js file rewrites a couple of imports. This is partly to work around missing features in Metro, and partly to patch the bundle. Affected imports include:

  • ucans
  • one-webcrypto

Cryptography

For native builds, we must provide a polyfill of webcrypto. We use a custom native module AppSecureRandom (based on react-native-securerandom) for the CRNG and msrcrypto for the cryptography.

NOTE Keys are not currently stored securely.

Polyfills

./platform/polyfills.*.ts adds polyfills to the environment. Currently this includes:

  • webcrypto
  • TextEncoder / TextDecoder

Auth flow

The auth flow is based on a browser app which is specified by the REACT_APP_AUTH_LOBBY env var. The app redirects to that location with the UCAN request, and then waits for a redirect back. In the native platforms with proper support, it will do this using an in-app browser. In native without in-app browser, or in the Web platform, it will handle this with redirects. The ucan is extracted from the hash fragment of the "return url" which is provided either by the in-app browser in response or detected during initial setup in the case of redirects.