setup_md = '''# Firebase Setup Guide for Gauntlet Tiers
This guide will help you set up Firebase Realtime Database so your tier list data syncs across all devices in real-time.
- Go to Firebase Console
- Click "Create a project"
- Enter project name:
gauntlet-tiers(or any name you prefer) - Disable Google Analytics (optional)
- Click "Create project"
- In the Firebase Console, click "Build" in the left sidebar
- Click "Realtime Database"
- Click "Create Database"
- Choose location (default is fine)
- IMPORTANT: Start in "test mode" for now (we'll secure it later)
- Click "Enable"
- Click the gear icon (⚙️) next to "Project Overview" and select "Project settings"
- In the "General" tab, scroll down to "Your apps" section
- Click the "</>" icon to add a web app
- Register app with nickname: "Gauntlet Tiers Web"
- Click "Register"
- Copy the
firebaseConfigobject (it looks like this):
const firebaseConfig = {
apiKey: "AIzaSy...",
authDomain: "your-project.firebaseapp.com",
databaseURL: "https://your-project-default-rtdb.firebaseio.com",
projectId: "your-project",
storageBucket: "your-project.appspot.com",
messagingSenderId: "123456789",
appId: "1:123456789:web:abcdef"
};You need to update the Firebase config in these files:
index.htmltierlist.htmladmin.html
Replace YOUR_API_KEY, YOUR_PROJECT_ID, etc. with your actual values from Step 3.
Example - Find this in each HTML file:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
databaseURL: "https://YOUR_PROJECT_ID-default-rtdb.firebaseio.com",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_PROJECT_ID.appspot.com",
messagingSenderId: "YOUR_SENDER_ID",
appId: "YOUR_APP_ID"
};Replace with your actual config:
const firebaseConfig = {
apiKey: "AIzaSy...",
authDomain: "gauntlet-tiers.firebaseapp.com",
databaseURL: "https://gauntlet-tiers-default-rtdb.firebaseio.com",
projectId: "gauntlet-tiers",
storageBucket: "gauntlet-tiers.appspot.com",
messagingSenderId: "123456789",
appId: "1:123456789:web:abcdef"
};For the tier list to work publicly (anyone can view, only admin can edit):
- In Firebase Console, go to Realtime Database
- Click "Rules" tab
- Replace the rules with:
{
"rules": {
"tiers": {
".read": true,
".write": "auth != null && auth.token.email === 'support.gauntlettiers@gmail.com'"
}
}
}For testing (less secure, allows anyone to edit):
{
"rules": {
".read": true,
".write": true
}
}- Click "Publish"
- Create a new GitHub repository
- Upload all the website files
- Go to Settings > Pages
- Select "Deploy from a branch" → "main" → "/ (root)"
- Wait 2-3 minutes for deployment
- Your site is live at
https://yourusername.github.io/repository-name/
- Open your deployed website on your phone
- Open the same website on your computer
- As admin, add a player to any tier
- Magic: The player appears on both devices instantly!
- Firebase Realtime Database stores all tier list data in the cloud
- When you add/edit/delete a player, it updates the database
- All connected devices receive the update instantly
- Data persists even if users clear their browser cache
The rules above allow:
- Anyone to view the tier list (
.read: true) - Only admin (support.gauntlettiers@gmail.com) to edit
For production, you should:
- Set up Firebase Authentication properly
- Use more secure rules
- Validate data structure
"Permission denied" error:
- Check your database rules allow writes
- For testing, use
.write: true
Data not syncing:
- Check your
databaseURLin the config - Make sure it ends with
firebaseio.com
"Firebase not initialized" error:
- Check that
firebase-app.jsis loading - Check browser console for errors
Firebase Spark Plan (free) includes:
- 100 simultaneous connections
- 1 GB stored data
- 10 GB/month downloaded data
This is plenty for a tier list website!
- Firebase docs: https://firebase.google.com/docs/database
- Check browser console (F12) for error messages
- Verify your config values match exactly '''
with open('/mnt/kimi/output/gauntlet-tiers/FIREBASE_SETUP.md', 'w') as f: f.write(setup_md)
print("FIREBASE_SETUP.md created with detailed instructions")
with open('/mnt/kimi/output/gauntlet-tiers/README.md', 'r') as f: readme = f.read()
readme += '''
To make the tier list work across all devices with shared data:
- Follow the detailed guide in
FIREBASE_SETUP.md - Get your free Firebase project at https://firebase.google.com
- Update the config in all HTML files
- Deploy to GitHub Pages
Without Firebase: Each device sees its own local data only With Firebase: All devices see the same data in real-time