CV Builder uses Firebase for authentication, Firestore for data storage, and Firebase Storage for profile images. This guide walks through the complete Firebase setup process.
Choose “Start in production mode” (we’ll add rules next)
Select a location (choose closest to your users)
Click “Enable”
2
Set Up Collections
The app will automatically create collections on first use:
resumes - Main CV documents (one per user)
versions - Saved versions/snapshots
3
Configure Security Rules
Go to the Rules tab and add the following rules:
rules_version = '2';service cloud.firestore {match /databases/{database}/documents {// Helper function to check if user is authenticatedfunction isAuthenticated() { return request.auth != null;}// Helper function to check if user owns the documentfunction isOwner(userId) { return isAuthenticated() && request.auth.uid == userId;}// Resumes collection - one document per usermatch /resumes/{userId} { // Users can only read/write their own resume allow read, write: if isOwner(userId);}// Versions collection - saved snapshotsmatch /versions/{versionId} { // Users can read/write only their own versions allow read, write: if isAuthenticated() && request.resource.data.userId == request.auth.uid; // For reads, check existing document allow read: if isAuthenticated() && resource.data.userId == request.auth.uid;}}}
Click Publish to apply the rules.
These rules ensure users can only access their own data. Each resume document is stored with the user’s UID as the document ID.
Click “Next” to accept default security rules (we’ll update them)
Choose a location
Click “Done”
2
Set Up Folder Structure
The app stores profile images at:
profile-images/{userId}/{filename}
3
Configure Security Rules
Go to the Rules tab and add:
rules_version = '2';service firebase.storage {match /b/{bucket}/o {// Profile images - users can only upload to their own foldermatch /profile-images/{userId}/{allPaths=**} { // Allow read access to all authenticated users allow read: if request.auth != null; // Allow write only to own folder allow write: if request.auth != null && request.auth.uid == userId // Limit file size to 5MB && request.resource.size < 5 * 1024 * 1024 // Only allow image files && request.resource.contentType.matches('image/.*'); // Allow delete only to own folder allow delete: if request.auth != null && request.auth.uid == userId;}}}
interface ResumeDocument { data: CVData; // The actual resume data updatedAt: Timestamp; // Last update time createdAt: Timestamp; // Creation time currentVersionId?: string; // ID of current version snapshot}
interface VersionDocument { id: string; // Auto-generated version ID userId: string; // Owner's user ID data: CVData; // Snapshot of resume data versionName: string; // User-provided name description?: string; // Optional description tags?: string[]; // Optional tags createdAt: Timestamp; // When version was created isAutoSave: boolean; // Whether this was an auto-save}