Comments & Gmail sign-in (Firebase) — setup
Comments and Google (Gmail) login run on Firebase. Until you add your keys the site shows a friendly placeholder; everything else works. ~10 minutes:
- Create a project at https://console.firebase.google.com → Add project.
- Register a Web app (the
</>icon). Copy thefirebaseConfigobject. - Paste it into
assets/js/firebase-config.js(replace the emptywindow.GZE_FIREBASE). - Authentication → Sign-in method → enable Google. Under Settings →
Authorized domains, add
genz-economics.com(andlocalhostfor testing). - Firestore Database → Create database (Production mode). A
commentscollection is created automatically on the first post. -
Firestore rules — paste these (anyone can read; only signed-in users can post; authors can delete their own):
rules_version = '2'; service cloud.firestore { match /databases/{db}/documents { match /comments/{id} { allow read: if true; allow create: if request.auth != null && request.resource.data.uid == request.auth.uid && request.resource.data.text is string && request.resource.data.text.size() < 2000; allow delete: if request.auth != null && resource.data.uid == request.auth.uid; } } }
That’s it — sign-in, threaded comments, and the daily-question discussions go live. Each day’s question is its own thread, so the archive keeps every past discussion.