Progressive Web App to solve poverty,hunger and impact of climate change.
This project uses google technologies like Firebase, Tensorflow , Google cloud , Google Map and Progressive web app
To clone this repository, follow these steps:
Open your terminal/command prompt and navigate to the directory where you want to clone the repository.
1 - git clone https://github.com/Rimjhim20/SAViour-Eco.git
Now Website is running at http://localhost:3000/
After creating your React app, change directory to your project's root folder and install the Firebase package by running:
npm install firebase
The next step is to create a Firebase project and link it with your React app. Go to the Firebase console:
2.Enter a project name, then click Continue.
3.Click Continue on the next page. 4.Select your Firebase account from the dropdown or click Create a new account if you don't already have one. 5.Finally, click Create project.
6.Click Continue once the process completes. 7.Next, click the Web icon (</>) towards the top-left of the following page to set up Firebase for the web. 8.Enter a nickname for your app in the provided field. Then click Register app. 9. Copy the generated code and keep it for the following step (discussed in the following section). 10. Click Continue to the console. 11. There are many options on the following page. Scroll down and select Cloud Firestore since you only need to set up a database in this case. 12.Next, click Create database. 13. Click Next. Select your preferred Firestore location from the dropdown. 14. Then click Enable to create a Firestore database.
#Initialize Firebase in Your React App Create a new folder inside your project src directory. You can call this firebase_setup. Next, create a firebase.js file inside that folder. Then paste the code generated earlier into this file. For example, to enter your app's Firebase secret key in the .env file:
REACT_APP_apiKey = yourFirebaseAccessKey
Thus, you can fine-tune the generated code as follows:
import { initializeApp } from "firebase/app";
import { getFirestore } from "@firebase/firestore"
const firebaseConfig = {
apiKey: process.env.REACT_APP_apiKey,
authDomain: process.env.REACT_APP_authDomain,
projectId: process.env.REACT_APP_projectId,
storageBucket: process.env.REACT_APP_storageBucket,
messagingSenderId: process.env.REACT_APP_messagingSenderId,
appId: process.env.REACT_APP_appId,
measurementId: process.env.REACT_APP_measurementId
};
const app = initializeApp(firebaseConfig);
export const firestore = getFirestore(app)