- Create Firebase Project
- Create "web" app within firebase to get config values"
- Install firebase in your project "npm i firebase
- Create a config file in your project
- Add authentication for email/password and Google
- Create a user from Firebase
- Enable Firestore
- Add rules for firestore
- Enable storage
- Add rules for storage
- Create 3 composite indexes for advanced querying
- Collection: Listing
- Query Scope: Collection
| Field | |
|---|---|
| type | Ascending |
| timestamp | Descending |
- Collection: Listing
- Query Scope: Collection
| Field | |
|---|---|
| userRef | Ascending |
| timestamp | Descending |
- Collection: Listing
- Query Scope: Collection
| Field | |
|---|---|
| offer | Ascending |
| timestamp | Descending |
- Create dummy listing with sample data
| Field | Value |
|---|---|
| name | Beautiful Stratford Condo |
| type | rent |
| userRef | ID OF A USER |
| bedrooms | 2 |
| bathrooms | 2 |
| parking | true |
| furnished | false |
| offer | true |
| regularPrice | 2500 |
| discountedPrice | 2000 |
| location | 8601 West Peachtree St Stratford, CT 06614 |
| geolocation | lat: 41.205590 lng: -73.150530 |
| imageUrls | ['https://images.unsplash.com/photo-1586105251261-72a756497a11?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1258&q=80', 'https://images.unsplash.com/photo-1554995207-c18c203602cb?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1470&q=80'] |