Firebase Import Guide
This guide explains how to import your journal entries from the old Firebase database into HiveJournal.
Prerequisites
- Access to your old Firebase project
- Your Firebase User ID (UID) from the old system
- Firebase Service Account JSON key
Step 1: Get Your Firebase User ID (UID)
Your Firebase UID is the unique identifier for your account in the old Firebase system. You can find it in:
- The
users.txtfile (if you have it) - Your old Firebase app's authentication records
- The Firebase Console under Authentication → Users
Example UID format: Y0Yp0tF1afZ58TBgdPyeDxI84zG2
Step 2: Get Firebase Service Account JSON
Option A: From Firebase Console (Recommended)
-
Go to Firebase Console
- Navigate to Firebase Console
- Select your project (e.g.,
hive-qlife)
-
Open Project Settings
- Click the gear icon (⚙️) next to "Project Overview" in the left sidebar
- Select "Project settings"
-
Go to Service Accounts Tab
- Click on the "Service accounts" tab at the top
- You should see "Firebase Admin SDK" section
-
Generate New Private Key
- Scroll down to find the "Generate new private key" button
- Click the button
- A warning dialog will appear explaining that this key provides full access to your Firebase project
- Click "Generate key" to confirm
-
Download the JSON File
- A JSON file will automatically download to your computer
- The file will be named something like
hive-qlife-firebase-adminsdk-xxxxx-xxxxxxxxxx.json - Important: Keep this file secure! It provides full access to your Firebase project.
-
Copy the JSON Content
- Open the downloaded JSON file in a text editor
- Copy the entire contents (all the JSON)
- You'll paste this into the Firebase Import section in Settings
Option B: From Google Cloud Console
-
Go to Google Cloud Console
- Navigate to Google Cloud Console
- Select your project (e.g.,
hive-qlife)
-
Navigate to IAM & Admin → Service Accounts
- In the left sidebar, expand "IAM & Admin"
- Click on "Service accounts"
-
Select Firebase Admin SDK Service Account
- Find the service account named
firebase-adminsdk-xxxxx@your-project.iam.gserviceaccount.com - Click on it to open details
- Find the service account named
-
Create Key
- Click on the "Keys" tab
- Click "Add Key" → "Create new key"
- Select "JSON" format
- Click "Create"
- The JSON file will download automatically
Step 3: Import Your Entries
-
Go to Settings
- In HiveJournal, navigate to Settings (
/dashboard/settings) - Scroll down to the "Firebase Import" section
- In HiveJournal, navigate to Settings (
-
Enter Your Information
- Firebase UID: Paste your Firebase user ID
- Firebase Service Account JSON: Paste the entire contents of the downloaded JSON file
-
Preview Import
- Click "Preview Import" to see what entries would be imported
- Review the preview to verify the entries look correct
- The preview shows up to 50 entries (all entries will be imported)
-
Import Entries
- If the preview looks good, click "Import X Entries"
- Wait for the import to complete
- You'll see a success message with the number of entries imported
Security Notes
⚠️ Important Security Information:
- The Firebase Service Account JSON provides full access to your Firebase project
- Never share this JSON file publicly or commit it to version control
- The JSON is only used during the import process and is not stored on our servers
- After importing, you can delete the downloaded JSON file if you want (you can always generate a new one)
Troubleshooting
"Invalid Firebase service account JSON"
- Make sure you copied the entire JSON file contents
- Check that the JSON is valid (no missing brackets, quotes, etc.)
- Try generating a new key if the current one doesn't work
"No entries found to import"
- Verify your Firebase UID is correct
- Check that you have entries in the old Firebase database
- Make sure the service account has read access to Firestore
"Decryption failed" or entries show encrypted text
- This usually means the salt token couldn't be found
- The importer will try to use a fallback token, but some entries might not decrypt correctly
- Contact support if you're having persistent decryption issues
What Gets Imported
- Journal Entries: All "emotions" from Firebase are imported as journal entries
- Titles: Entries starting with
#will have the title extracted - Content: The
currentandcausefields are combined into the entry content - Timestamps: Original creation dates are preserved
- Visibility: All imported entries are set to private (
uservisibility) by default - Notebooks: Entries are imported without a notebook (can be assigned later)
After Import
Once imported, you can:
- View your entries in the Dashboard
- Assign entries to notebooks
- Edit entries to add moods, tags, or adjust content
- Change visibility settings if you want to share entries