Migration
Migrate from Firebase
A step-by-step guide for migrating from Firebase to EEv3. Most migrations complete in 1–2 weeks depending on complexity.
Feature Mapping
| Firebase | EEv3 | Notes |
|---|---|---|
| Firebase Auth | ee.auth | SSO, MFA, RBAC included. Social providers supported. |
| Cloud Firestore | ee.database | Document + relational. Supports SQL and NoSQL queries. |
| Cloud Storage | ee.storage | S3-compatible API. Built-in CDN and image transforms. |
| Cloud Functions | ee.compute | Edge functions with global deployment. No cold starts. |
| Firebase Hosting | ee.hosting | Static and SSR hosting. Custom domains with auto-SSL. |
| Google Analytics | ee.analytics | Event tracking, funnels, cohorts. No sampling. |
1. Migrate Authentication
Export your Firebase Auth users via the Firebase Admin SDK or CLI. Import them into EEv3 using the bulk import endpoint. Password hashes are compatible — users won't need to reset passwords.
Before (Firebase)
// Firebase Auth
import { getAuth, signInWithEmailAndPassword } from 'firebase/auth'
const auth = getAuth()
const result = await signInWithEmailAndPassword(auth, email, password)
const user = result.userAfter (EEv3)
// EEv3 Auth
import { createClient } from '@evileye/sdk'
const ee = createClient({ token: process.env.EE_TOKEN!, entity: 'my-app' })
const result = await ee.auth.login({ email, password })
const user = result.data.user2. Migrate Database
Export Firestore collections using firebase emulators:export or the Admin SDK. EEv3 accepts JSON imports and automatically maps document structure.
Before (Firestore)
// Firestore
import { getFirestore, doc, getDoc, setDoc } from 'firebase/firestore'
const db = getFirestore()
const snap = await getDoc(doc(db, 'users', userId))
const user = snap.data()
await setDoc(doc(db, 'users', userId), { name: 'Alice', role: 'admin' })After (EEv3)
// EEv3 Database
const user = await ee.database.findOne('users', { id: userId })
await ee.database.upsert('users', {
id: userId,
name: 'Alice',
role: 'admin',
})3. Migrate Storage
Use the EEv3 migration tool to sync your Cloud Storage bucket directly. It preserves file structure, metadata, and access patterns.
Before (Firebase Storage)
// Firebase Storage
import { getStorage, ref, uploadBytes, getDownloadURL } from 'firebase/storage'
const storage = getStorage()
const storageRef = ref(storage, 'uploads/photo.jpg')
await uploadBytes(storageRef, file)
const url = await getDownloadURL(storageRef)After (EEv3)
// EEv3 Storage
const result = await ee.storage.upload({
key: 'uploads/photo.jpg',
body: file,
contentType: 'image/jpeg',
})
const url = result.data.urlGotchas & Differences
- Security rules vs RBAC — Firebase security rules are replaced by EEv3's role-based access control system. Map your rules to roles and permissions.
- Real-time listeners — Firestore's onSnapshot becomes EEv3's streaming API. The subscription model is different.
- Cloud Functions triggers — Firebase function triggers map to EEv3 webhooks. Register event handlers instead of function triggers.
- Pricing model— Firebase charges per read/write. EEv3 charges per API call with included quotas per tier.
Estimated Timeline
Most Firebase migrations complete in 1–2 weeks. Complex migrations with custom Cloud Functions may take 3–4 weeks.
Back to Migration Guides