Home > Development > Guides > Working With > ---
Firebase Setup
This project uses Firebase for authentication and other services. The google-services.json file contains sensitive credentials and is not included in version control.
Local Development Setup
1. Get Firebase Configuration
- Go to the Firebase Console
- Select your project:
archeryapprentice-48e09 - Go to Project Settings > General
- Download the
google-services.jsonfile - Place it in the
app/directory
2. Verify Setup
# The file should exist here:
app/google-services.json
# And should contain your project configurationCI/CD Setup
The CI/CD pipeline generates google-services.json from GitHub Secrets. Configure these in your repository settings.
Required GitHub Secrets
FIREBASE_PROJECT_NUMBER: Your Firebase project numberFIREBASE_PROJECT_ID: Your Firebase project ID (e.g.,archeryapprentice-48e09)FIREBASE_STORAGE_BUCKET: Your Firebase storage bucketFIREBASE_MOBILE_SDK_APP_ID: Your mobile SDK app IDFIREBASE_OAUTH_CLIENT_ID: Your OAuth client IDFIREBASE_API_KEY: Your Firebase API key
Setting Up Secrets
- Go to your GitHub repository
- Navigate to Settings > Secrets and variables > Actions
- Add each secret with the corresponding value from your
google-services.json
Security Notes
⚠️ Important Security Practices:
- Never commit
google-services.jsonto version control - The file is automatically ignored by
.gitignore - Use environment variables or secrets for CI/CD environments
- Rotate API keys periodically for security
- Keep Firebase console access restricted to authorized team members
Template File
A template file (google-services.json.template) is provided showing the expected structure with placeholder variables.
Firebase Services Used
Authentication
- Email/Password authentication
- Google Sign-in provider
- Anonymous authentication for testing
- Account linking capabilities
Firestore Database
- Tournaments: Tournament data and real-time sync
- Participants: Tournament participant information
- Scores: Real-time score submission and leaderboards
- Security: Comprehensive security rules
Cloud Functions (Planned)
- Tournament lifecycle management
- Score validation and anti-cheating
- Leaderboard calculations
- Notifications and announcements
Troubleshooting
google-services.json Not Found
# Verify file location
ls -la app/google-services.json
# If missing, download from Firebase ConsoleAuthentication Not Working
- Verify SHA-1 fingerprints are configured in Firebase Console
- Check that google-services.json is in app/ directory
- Ensure Firebase Authentication is enabled in console
- Verify internet connection for first-time setup
Firestore Security Rules Blocking Access
- Review security rules in Firebase Console
- Check user authentication state
- Verify user permissions for tournament access
- Review Firestore logs for detailed error messages
Related Documentation
- Firebase-Integration-Plan - Complete Firebase integration strategy
- Tournament-Discovery - Tournament system implementation
- System-Architecture - Overall system architecture
Last Updated: 2025
Source: docs/firebase/FIREBASE_SETUP.md