Set Up Firebase Collections for the Real Estate App
The Real Estate app uses Firestore for listings, categories, filters, saved listings, reviews, users, and optional map/location data. Configure these collections before testing production-like listing flows.
Quick Answer
Enable Firebase Auth, Firestore, and Storage, replace native Firebase config files, import or create real estate data, verify the collection names in app config, set the home category, deploy rules/indexes, then confirm listing feed, details, search, filters, images, and saved listings work.
Core Collections
Common collection names:
serverConfig: {
collections: {
listings: 'real_estate_listings',
savedListings: 'real_estate_saved_listings',
categories: 'real_estate_categories',
filters: 'real_estate_filters',
reviews: 'real_estate_reviews',
},
}
Search the app config before changing names:
rg "real_estate_|serverConfig|savedListings|listings" src
If you rename a collection, update every source, rule, index, Function, and seed file that references the old name.
Required Data
At minimum, create or import:
| Data | Purpose |
|---|---|
| Categories | Used by home sections, category filters, and listing grouping. |
| Listings | Main property data shown in feed and detail screens. |
| Filters | Search and filter UI options. |
| Reviews | Listing or agent review data if enabled. |
| Saved listings | User-specific favorites if accounts are enabled. |
Listings should include required fields used by the UI, such as title, price, location, photos, category id, description, and agent/contact data depending on the app version.
Import Seed Data
If the package includes seed JSON files, use:
After import, replace demo listing content with real properties, images, addresses, prices, coordinates, agent data, and legal copy before production.
Configure Home Content
Some versions use a configured category for the home screen hero or main listing section.
Example:
homeConfig: {
mainCategoryID: 'category-document-id',
mainCategoryName: 'Houses',
}
Use a real document id from the real_estate_categories collection. If the id is
wrong, the home screen may be empty even when listings exist.
Images and Storage
Property photos can come from Firebase Storage or external HTTPS URLs.
Before release:
- upload production images to a storage/CDN location you control;
- confirm image URLs load in a browser;
- deploy Storage rules if using Firebase Storage;
- avoid stale demo image URLs;
- verify gallery and thumbnail performance.
Verification Checklist
- Firestore is enabled.
- Firebase config files point to your project.
- Categories exist.
- Listings exist and reference valid categories.
- Home category id exists.
- Images load from valid URLs or Storage paths.
- Search/filter queries work and required indexes exist.
- Saved listings work for signed-in users if enabled.
- Firestore rules protect user-specific saved listings and private data.
Troubleshooting
| Problem | Fix |
|---|---|
| Listing feed is empty | Check collection names, seed import, rules, and required indexes. |
| Home section is empty | Check homeConfig.mainCategoryID and category/listing references. |
| Images are broken | Replace demo URLs, check Storage rules, and verify HTTPS access. |
| Favorites fail | Check Auth state, saved listing collection name, and user-specific rules. |
| Search/filter fails | Check filter collection data, field names, and Firestore indexes. |