From 7a53d101e81e96674b7a144e67f65053d3bc88ba Mon Sep 17 00:00:00 2001 From: aman190 Date: Sat, 11 Mar 2023 17:11:59 +0530 Subject: [PATCH 1/5] Update README instructions for version .71.x setup --- README.md | 128 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 98 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 56e4a21..6d38e02 100644 --- a/README.md +++ b/README.md @@ -2,61 +2,129 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/fbf9f8e1bb7b4d2cbb1ca569014ed45b)](https://app.codacy.com/app/shehand/Go-social?utm_source=github.com&utm_medium=referral&utm_content=shehand/Go-social&utm_campaign=Badge_Grade_Dashboard) [![Build Status](https://travis-ci.org/shehand/Go-social.svg?branch=master)](https://travis-ci.org/shehand/Go-social) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/scorelab/go-social) -Today's community use mobile phones to make their life easier, and community-based mobile applications are famous among them. There are several kinds of community-based applications in use, and most of them relate to a specific domain. But core components have similar features. Addressing this issue and saving development time by introducing a common app template with customizable components for community-based mobile applications is the main purpose of this project. +Go-social is a customizable React Native app template designed for community-based mobile applications. The template provides a common foundation for building such applications, saving development time and allowing developers to focus on adding unique features and functionality specific to their community. -## Setup the project +## Features -> NOTE: If you have not yet installed react-native, use [this link](https://facebook.github.io/react-native/docs/getting-started) to install and configure react-native. **Make sure to use react-native cli rather than using expo cli**. +This app template includes the following features: -## Configure Go-social +- Customizable components +- Firebase Authentication and Real-time database +- Feed with posts and comments +- Social sharing and messaging functionality +- Notifications for new posts and comments +- Additional features such as easy theming will be implemented in the near future. -- Clone the project +## Getting Started - `git clone https://github.com/scorelab/Go-social.git` +To get started, you'll need to have the following software installed on your machine: -- Change the directory to the project folder +- `Node.js` +- `React Native CLI` +- `VSCode` and `Android Studio` (for Android development) +- `Xcode` (for iOS development) - `cd Go-social` +Once you have these installed, follow these steps: -- Install the node modules with the following command +1. Clone the repository to your machine: - `npm install` +```sh +git clone https://github.com/scorelab/Go-social.git +``` -### Configure the config.example.js file (IMPORTANT) +2. Navigate to the project directory: -> Open the project in any text editor you use. Open the `config.example.js` file in the `config` folder and follow the following steps. +```sh +npm install +``` -- Use [this link](https://console.firebase.google.com/) to **create a Firebase** project for the Go-social application. It is free for everyone. Please use the web app instead of the Android or iOS app. +3. Install all dependencies: -- Update the **Sign-in method** of Firebase [project](https://firebase.google.com/docs/auth/android/password-auth#before_you_begin) that you want to use as **Enabled** +```sh +npm install +``` -- Create a **Firebase Database** and Update the Ruleset of the real-time database to **Read/Write Allow**. +Before using the app, you'll need to configure your app. -- Use [this link](https://cloud.google.com/maps-platform/) to **generate Google Map Api key** for the map view in G-social. This is not necessary. You can use the given api key. But it is not guaranteed that the given key will always work. It is better to have your own key. Enable all maps, routes, places in your key. +### Go-social app Configuration ~[IMPORTANT!] -- Now you need a **Facebook app id** if you want to enable Facebook login for Go-social. Use [this link](https://developers.facebook.com/) for that and make sure to enable both email/password and Facebook sign-in method in Firebase. +To configure your app, follow these steps: -So place your Firebase details and Google map API key in **config.example.js** file and **rename it** to **config.js**. +##### Firebase Setup: -- To make Google map and Facebook login to work, you have to follow these extra steps.\* +1. Go to the [Firebase Console](https://console.firebase.google.com/) and create a new project for the Go-social application. This is free for everyone. It's recommended to use the **Web App** instead of the Android or iOS app. -1. Find the file name `AndroidManifest.xml` which is located in `android/app/src/main` path. Place your **Google map API key** in there. +2. To enable `Authentication` and `Storage` for your app, activate them in the Firebase console `Build` section after creating and registering the app. +3. Enable `Sign-in methods` Email/Password and Facebook in the Authentication section of your Firebase app. +4. Create a `Firebase Realtime Database` and update its ruleset to allow read and write access. +5. Update the Firebase configuration object in `config/config.js` with app-specific config details obtained from the Firebase console app settings. - > Ex : +1. Generate a `Google Maps API Key` using this [Link](https://mapsplatform.google.com/) for G-social's map view, or use the provided key (not guaranteed to always work). Ensure the key has all maps, routes, and places enabled +2. After obtaining your Google Maps API key, replace the example key with your own. + > - For Android open `android/app/src/main/AndroidManifest.xml` and replace -1. Find the file name as `strings.xml` located in `android/app/src/main/res/values`. Place your **Facebook app id** in there. +```sh + +``` - > Ex: **2349388348405699** +> - For IOS open `ios/Go_social/AppDelegate.m` and replace -So now you are ready to run Go-social. +```sh +[GMSServices provideAPIKey:@"AIzaSyDmwJddIPTcALyZtj7p9mFFlkMvpMkati8"]; +``` -## Run Go-social +##### Facebook Authentication Setup: -- Run the app +1. To enable `Facebook login` for Go-social, obtain a Facebook app id using the provided [link](https://developers.facebook.com/) and enable both email/password and Facebook sign-in method in Firebase. +2. After setting up Facebook authentication, use your Facebook App ID and App Secret to enable the "Facebook" `Sign-in method` in Firebase. +3. Update the following file in your repository: + > - For Android open `android/app/src/main/res/values/strings.xml` and replace - `npx react-native run-android` +```sh +2349388348405699 +``` - Then enable the remote Js debugging. +> - For iOS open `ios/Go_social/info.plist` and replace + +```sh +... +fb{YOUR_APP_ID} +... +FacebookAppID +{YOUR_APP_ID} +FacebookDisplayName +{YOUR_APP_NAME} +... +``` + +### Run Go-social + +Now you are ready to run Go-social +(for android) + +```sh +npx react-native run-android +``` + +(for iOS) + +```sh +npx react-native run-ios +``` + +## Contributing + +Contributions to this project are welcome! To contribute, follow these steps: + +[Contribution Guidelines](https://github.com/scorelab/Go-social/blob/14e5dfcdfb59888efc318bb4835e3577d5d09532/.github/CONTRIBUTING.md) + +1. Fork the repository to your own GitHub account +2. Clone the forked repository to your machine +3. Make your changes and commit them with descriptive commit messages +4. Push your changes to your forked repository +5. Open a pull request from your forked repository to the original repository From df739e2f261e20bf513dc8d6af92de0ff424d310 Mon Sep 17 00:00:00 2001 From: aman190 Date: Sat, 11 Mar 2023 21:42:20 +0530 Subject: [PATCH 2/5] Reformatted and added suggested change in readme. --- README.md | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 6d38e02..bff8e29 100644 --- a/README.md +++ b/README.md @@ -4,53 +4,44 @@ Go-social is a customizable React Native app template designed for community-based mobile applications. The template provides a common foundation for building such applications, saving development time and allowing developers to focus on adding unique features and functionality specific to their community. -## Features - -This app template includes the following features: - -- Customizable components -- Firebase Authentication and Real-time database -- Feed with posts and comments -- Social sharing and messaging functionality -- Notifications for new posts and comments -- Additional features such as easy theming will be implemented in the near future. - ## Getting Started To get started, you'll need to have the following software installed on your machine: -- `Node.js` -- `React Native CLI` -- `VSCode` and `Android Studio` (for Android development) -- `Xcode` (for iOS development) +- [`Node.js`](https://nodejs.org/en/) +- [`React Native CLI`](https://reactnative.dev/docs/environment-setup) +- [`VSCode`](https://code.visualstudio.com/) and [`Android Studio`](https://developer.android.com/studio) (for Android development) +- [`Xcode`](https://developer.apple.com/xcode/) (for iOS development) Once you have these installed, follow these steps: 1. Clone the repository to your machine: -```sh -git clone https://github.com/scorelab/Go-social.git -``` + ```sh + git clone https://github.com/scorelab/Go-social.git + ``` 2. Navigate to the project directory: -```sh -npm install -``` + ```sh + cd Go-social + ``` 3. Install all dependencies: -```sh -npm install -``` + ```sh + npm install + # Or + yarn install + ``` Before using the app, you'll need to configure your app. -### Go-social app Configuration ~[IMPORTANT!] +## Go-social app Configuration ~[IMPORTANT!] To configure your app, follow these steps: -##### Firebase Setup: +#### A. Firebase Setup: 1. Go to the [Firebase Console](https://console.firebase.google.com/) and create a new project for the Go-social application. This is free for everyone. It's recommended to use the **Web App** instead of the Android or iOS app. @@ -59,7 +50,7 @@ To configure your app, follow these steps: 4. Create a `Firebase Realtime Database` and update its ruleset to allow read and write access. 5. Update the Firebase configuration object in `config/config.js` with app-specific config details obtained from the Firebase console app settings. -##### Google Maps Setup: +#### B. Google Maps Setup: 1. Generate a `Google Maps API Key` using this [Link](https://mapsplatform.google.com/) for G-social's map view, or use the provided key (not guaranteed to always work). Ensure the key has all maps, routes, and places enabled 2. After obtaining your Google Maps API key, replace the example key with your own. @@ -78,15 +69,15 @@ To configure your app, follow these steps: [GMSServices provideAPIKey:@"AIzaSyDmwJddIPTcALyZtj7p9mFFlkMvpMkati8"]; ``` -##### Facebook Authentication Setup: +#### C. Facebook Authentication Setup: 1. To enable `Facebook login` for Go-social, obtain a Facebook app id using the provided [link](https://developers.facebook.com/) and enable both email/password and Facebook sign-in method in Firebase. 2. After setting up Facebook authentication, use your Facebook App ID and App Secret to enable the "Facebook" `Sign-in method` in Firebase. -3. Update the following file in your repository: +3. Update the following file in your repository: `Example app_id: 2349388348405699` > - For Android open `android/app/src/main/res/values/strings.xml` and replace ```sh -2349388348405699 +{YOUR_APP_ID} ``` > - For iOS open `ios/Go_social/info.plist` and replace @@ -109,12 +100,16 @@ Now you are ready to run Go-social ```sh npx react-native run-android +# Or +yarn react-native run-android ``` (for iOS) ```sh npx react-native run-ios +# Or +yarn react-native run-ios ``` ## Contributing From ebb3592c59033282cf176a8abbdd35c2304c80d2 Mon Sep 17 00:00:00 2001 From: aman190 Date: Sat, 11 Mar 2023 22:02:46 +0530 Subject: [PATCH 3/5] Updated contributing guideline --- .github/CONTRIBUTING.md | 12 ++++++++++-- README.md | 10 +--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d7fe15d..853b6e8 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,7 +1,15 @@ # Contributing -When contributing to this repository, please first discuss the change you wish to make via issue, -email, or any other method with the owners of this repository before making a change. +Thank you for your interest in contributing to our project! We welcome all contributions, whether it's a bug fix, feature suggestion, or documentation improvement. + +Before you start contributing, please take a moment to read the following guidelines: + +1. Initiate a discussion with the repository owners, this can be done through an `Github Issue`. [Issue_Template](https://github.com/scorelab/Go-social/blob/14e5dfcdfb59888efc318bb4835e3577d5d09532/.github/ISSUE_TEMPLATE.md). +2. Please ensure that you discuss the change you intend to make before proceeding. +3. `Fork` the repository to your own GitHub account +4. `Clone` the forked repository to your machine +5. Make your changes and commit them with descriptive commit messages +6. Open a `Pull request` from your forked repository to the original repository. [Pull_Request_Template](https://github.com/scorelab/Go-social/blob/14e5dfcdfb59888efc318bb4835e3577d5d09532/.github/PULL_REQUEST_TEMPLATE.md) Please note we have a code of conduct, please follow it in all your interactions with the project. diff --git a/README.md b/README.md index bff8e29..8f2d760 100644 --- a/README.md +++ b/README.md @@ -114,12 +114,4 @@ yarn react-native run-ios ## Contributing -Contributions to this project are welcome! To contribute, follow these steps: - -[Contribution Guidelines](https://github.com/scorelab/Go-social/blob/14e5dfcdfb59888efc318bb4835e3577d5d09532/.github/CONTRIBUTING.md) - -1. Fork the repository to your own GitHub account -2. Clone the forked repository to your machine -3. Make your changes and commit them with descriptive commit messages -4. Push your changes to your forked repository -5. Open a pull request from your forked repository to the original repository +Contributions to this project are welcome! To contribute, follow our [Contribution Guidelines](https://github.com/scorelab/Go-social/blob/14e5dfcdfb59888efc318bb4835e3577d5d09532/.github/CONTRIBUTING.md) From 3a05135895ad36d6259671d145f9458aae62f765 Mon Sep 17 00:00:00 2001 From: aman190 Date: Mon, 13 Mar 2023 10:10:01 +0530 Subject: [PATCH 4/5] Updated suggested changes in contributing.md --- .github/CONTRIBUTING.md | 9 +++------ README.md | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 853b6e8..9e2d8cb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,12 +4,9 @@ Thank you for your interest in contributing to our project! We welcome all contr Before you start contributing, please take a moment to read the following guidelines: -1. Initiate a discussion with the repository owners, this can be done through an `Github Issue`. [Issue_Template](https://github.com/scorelab/Go-social/blob/14e5dfcdfb59888efc318bb4835e3577d5d09532/.github/ISSUE_TEMPLATE.md). -2. Please ensure that you discuss the change you intend to make before proceeding. -3. `Fork` the repository to your own GitHub account -4. `Clone` the forked repository to your machine -5. Make your changes and commit them with descriptive commit messages -6. Open a `Pull request` from your forked repository to the original repository. [Pull_Request_Template](https://github.com/scorelab/Go-social/blob/14e5dfcdfb59888efc318bb4835e3577d5d09532/.github/PULL_REQUEST_TEMPLATE.md) +1. Initiate a discussion with the repository owners, either by creating a `GitHub Issue` or using any other communication method, to discuss your intended changes before making any modifications. +2. Maintain a `Fork` copy of the code base as a developer and it would be easy to contribute if the developer has a `Clone` copy in local development workspace. +3. Commit your changes with clear messages and open a `Pull Request` from your forked repository to the original one for contribution. Please note we have a code of conduct, please follow it in all your interactions with the project. diff --git a/README.md b/README.md index 8f2d760..a39e8c6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Go-social is a customizable React Native app template designed for community-bas ## Getting Started -To get started, you'll need to have the following software installed on your machine: +To get started, you'll need to have the following softwares installed on your machine: - [`Node.js`](https://nodejs.org/en/) - [`React Native CLI`](https://reactnative.dev/docs/environment-setup) @@ -52,7 +52,7 @@ To configure your app, follow these steps: #### B. Google Maps Setup: -1. Generate a `Google Maps API Key` using this [Link](https://mapsplatform.google.com/) for G-social's map view, or use the provided key (not guaranteed to always work). Ensure the key has all maps, routes, and places enabled +1. Generate a `Google Maps API Key` using this [Link](https://mapsplatform.google.com/) for Go-social's map view, or use the provided key (not guaranteed to always work). Ensure the key has all maps, routes, and places enabled 2. After obtaining your Google Maps API key, replace the example key with your own. > - For Android open `android/app/src/main/AndroidManifest.xml` and replace From f850d2fc131685438efdeac90e373a2b6b22dfd7 Mon Sep 17 00:00:00 2001 From: aman190 Date: Tue, 28 Mar 2023 16:35:54 +0530 Subject: [PATCH 5/5] Updated facebook config in readme.md --- README.md | 6 +++++- android/app/build.gradle | 1 + android/app/src/main/AndroidManifest.xml | 21 +++++++++++++++++++-- android/app/src/main/res/values/strings.xml | 2 ++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a39e8c6..06aeb0a 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,9 @@ To configure your app, follow these steps: > - For Android open `android/app/src/main/res/values/strings.xml` and replace ```sh -{YOUR_APP_ID} +YOUR_APP_ID +fb1234 +PLACE_YOUR_CLIENT_TOKEN_HERE ``` > - For iOS open `ios/Go_social/info.plist` and replace @@ -90,6 +92,8 @@ To configure your app, follow these steps: {YOUR_APP_ID} FacebookDisplayName {YOUR_APP_NAME} +FacebookClientToken +{YOUR_CLIENT_TOKEN_HERE} ... ``` diff --git a/android/app/build.gradle b/android/app/build.gradle index 0845c3b..59e3429 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -152,6 +152,7 @@ dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") + implementation 'com.facebook.android:facebook-android-sdk:11.1.0' // Import the BoM for the Firebase platform implementation platform('com.google.firebase:firebase-bom:31.2.3') diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index c57e0f5..2b0d99a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,11 +1,13 @@ - + - + + + + + + + + + + + + + diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 284c98a..1b53b90 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,4 +1,6 @@ Go_social 2349388348405699 + fb1234 + PLACE_YOUR_CLIENT_TOKEN_HERE