This document describes the Firebase integration for QuantumStack, including its configuration and security rules.
The backend uses Firebase Admin SDK for interacting with Firebase services.
Configure the following in your .env file:
FIREBASE_PROJECT_ID: Your Firebase project ID.FIREBASE_CLIENT_EMAIL: Your Firebase service account email.FIREBASE_PRIVATE_KEY: Your Firebase service account private key (with\ncharacters).
The CommunityService handles data operations via Firebase Admin.
Currently, Firestore rules are configured to ensure that only authenticated users can access their own data.
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /communities/{communityId} {
allow read: if true;
allow write: if request.auth != null;
}
}
}Firebase Auth is used for user authentication and authorization.
name: Stringdescription: StringmembersCount: NumberlastActive: Timestamp
name: Stringinterests: ArraycommunityId: Stringemail: String (optional)