luandro committed ...Latest: fecb6b4 on 4/13/2018, 11:01:08 AM | |
📄 | .babelrc |
📄 | .buckconfig |
📄 | .flowconfig |
📄 | .gitattributes |
📄 | .gitignore |
📄 | .watchmanconfig |
📄 | README.md |
📁 | __tests__ |
📁 | android |
📄 | app.json |
📄 | index.android.js |
📁 | ios |
📄 | package-lock.json |
📄 | package.json |
📁 | patches |
📄 | rn-cli.config.js |
📁 | src |
📁 | tools |
P2P Boilerplate
An as easy as possible to use boilerplate for creating peer-to-peer React Native applications using Secure Scuttlebot and Dat protocols behind a GraphQL layer.
Based on MMMMM, dat-installer and ssb-graphql.
- Scuttlebot Server :white_check_mark:
- Scuttlebot Client :white_check_mark:
- GraphQL SSB :white_check_mark:
- Pull/Push Scuttlebot data :white_check_mark:
- GraphQL Dat :x:
- Set Dat storage path :x:
- Pull/Push Dat data :x:
- Easy app rebranding :x:
Install dependencies
Use node v8.9.x
and npm v5.6.x
.
Mac OS note: You might need realpath
, install it through coreutils:
brew update
brew install coreutils
Usage
Doesn't work well on emulators, so make sure you have react-native setup and your device ready.
Clone and install:
git clone https://github.com/luandro/p2pboilerplate.git
cd p2pboilerplate
npm i
We also need to run npm run prepare
in order to patch the necessary packages. We should fork these instead of using the hack.
Now run npm run build
which takes care of building back-end and front-end, will also run react-native run-android
to start emulation and logging.
In case you want to play with the back-end, run npm run node
which will concurrently run Babel watch and nodemon for the application. You can check the GraphQL playground at http://localhost:4000/playground.
Troubleshooting
- Check Android files for duplicate declarations:
android/settings.gradle
android/app/build.gradle
android/app/src/main/java/com/p2pboilerplate/MainApplication.java
Use
adb logcat *:S nodejs:V ReactNative:V ReactNati veJS:V
to log NodeJS applications.Use
adb reverse tcp:8081 tcp:8081
to reconnect to the server
Built with git-ssb-web