A blood donor management app with react native and firebase. This app was developed to help Asroy Bidyapith with their blood management activity in Ashuganj and nearby areas. Feel free to clone it for your own locality.
The app is available here.
First of all you will need to install and configure Android SDK. Follow the Building Projects with Native Code
section in this official guide.
Then clone and rename this project. Renaming can be tricky. Try using this package.
Create a firebase project here.
A google-services.json
file contains all of the information required by the Firebase Android SDK to connect to your Firebase project. To automatically generate the json file, follow this guide. Once downloaded, place this file in the root of the project at android/app/google-services.json
. Replace the existing file.
Create a realtime database from firebase console with these following security rules.
{
"rules": {
"contact_info": {
"$uid": {
".read": "data.child('hidden').val() != true || $uid === auth.uid || root.child('users').child(auth.uid).child('admin').val() == true",
".write": "(data.child('hidden').val() != true || $uid === auth.uid || root.child('users').child(auth.uid).child('admin').val() == true) && data.child('admin').val() === newData.child('admin').val()"
}
},
"users": {
".read": true,
"$uid": {
".write": "$uid === auth.uid || root.child('users').child(auth.uid).child('admin').val() == true"
}
}
}
}
Follow the Getting Started Guide for Facebook Android SDK to set up a Facebook app. You don't need to follow the whole guide, just create a new facebook app, update the strings.xml
and add the Key Hash
Install the dependencies with yarn install
.
Now you should be able to run the project with react-native run-android
If you need any help, feel free to ping me.
If you clone this project, please keep a link back to Asroy Bidyapith. (and maybe the original project too!)