The Food AR Web App was build inorder to fetch the review from the Food AR App. The app fetch details like Name, Phonenumber and Review of the Customer and store it in the Firesstore database. The data from the Firestore database is fetched using an API Key and also it Firebase configuration and is displayed in the webapp in the form of cards. When the reviews are added in the Food AR app it gets added in the firestore database as well get updated in the webapp as new cards formed for each review.
Deployed Link: FOODAR WEB APP for seeing the reviews by the customer.
Follow these steps to connect Firestore with WebStorm:
- Download and install WebStorm from JetBrains.
- Open WebStorm and create a new Empty Project.
- Open the Terminal in WebStorm.
- Run the following command to initialize a package.json file:
npm init -y
- Install Firebase SDK using npm:
npm install firebase
-
Create a Firebase Project
- Go to Firebase Console.
- Click Create a Project → Follow the steps → Enable Firestore.
-
Add Firestore to Web App
- In Firebase Console, go to Project Settings.
- Scroll to Your Apps → Click Add App → Select Web.
- Register your app and click Next.
- Copy the Firebase configuration.
-
Create Firebase Config File in WebStorm
- Inside WebStorm, create a file
firebase-config.js
. - Paste the following code and replace your Firebase config:
import { initializeApp } from "firebase/app"; import { getFirestore } from "firebase/firestore"; // Your Firebase configuration (from Firebase Console) const firebaseConfig = { apiKey: "YOUR_API_KEY", authDomain: "YOUR_AUTH_DOMAIN", projectId: "YOUR_PROJECT_ID", storageBucket: "YOUR_STORAGE_BUCKET", messagingSenderId: "YOUR_MESSAGING_SENDER_ID", appId: "YOUR_APP_ID" }; // Initialize Firebase const app = initializeApp(firebaseConfig); const db = getFirestore(app); export { db };
- Inside WebStorm, create a file
- In Firestore Database → Rules tab → Click Edit Rules.
- Set rules to allow read/write for testing:
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if true; } } }
- Click Publish.
Desktop | Mobile |
---|---|
![]() |
![]() |