How joshdigitalconcept/staynest works
StayNest is a Firebase-backed accommodation marketplace. Guests browse listings, inspect property details, and book; hosts create and manage listings, while users manage profiles, favorites, and messages. Administrative routes cover marketplace operations including listings, users, finance, disputes, reviews, content, and trust and safety. The sampled code confirms Firestore-backed listing queries and profile booking reads, plus listing-card favorite and delete writes. Most route implementations were not sampled, so their internal interactions are not asserted.
Main entry points: index.ts Firebase services · property-card.tsx Listing cards · page.tsx Profile and bookings · admin Admin console
Components 22
Guest marketplace
- Browse listings
src/app/page.tsx - Search
src/app/search/page.tsx - Listing cards
src/components/property-card.tsx - Property details
src/app/properties/[id]/page.tsx - Booking flow
src/app/book/[id]/page.tsx - Favorites
src/app/favorites/page.tsx
Host and account
- Host
- Listing creation
src/app/host/create - Listing management
src/app/properties/edit/[id]/page.tsx - Profile and bookings
src/app/profile/page.tsx - Account settings
src/app/account - Messaging
src/app/messages/page.tsx
Administration
- Admin console
src/app/admin - Content management
src/app/admin/content/page.tsx - Platform settings
src/app/admin/settings/page.tsx - Trust and safety
src/app/admin/trust-safety/page.tsx
Firebase platform
- Firebase services
src/firebase/index.ts - Firestore
- Marketplace data types
src/lib/types.ts - Image upload
src/lib/image-upload.ts
Other components
- Guest
- Administrator
Connections 28
- Guest → Browse listings: browses
- Browse listings → Firestore: queries listings
src/app/page.tsx - Browse listings → Listing cards: renders
src/app/page.tsx - Listing cards → Property details: links to
src/components/property-card.tsx - Listing cards → Firestore: writes favorites
src/components/property-card.tsx - Listing cards → Firestore: deletes listing
src/components/property-card.tsx - Property details → Firebase services: uses services
src/app/properties/[id]/page.tsx - Booking flow → Firebase services: uses services
src/app/book/[id]/page.tsx - Search → Firestore: searches listings
- Host → Listing creation: creates listings
- Listing creation → Image upload: uploads photos
- Host → Listing management: manages listings
- Host → Profile and bookings: manages account
- Profile and bookings → Firestore: reads listings and bookings
src/app/profile/page.tsx - Profile and bookings → Firebase services: uses services
src/app/profile/page.tsx - Host → Account settings: updates settings
- Host → Messaging: sends messages
- Administrator → Admin console: operates
- Admin console → Content management: manages content
- Admin console → Platform settings: configures platform
- Admin console → Trust and safety: handles safety
- Content management → Firebase services: uses services
src/app/admin/content/page.tsx - Platform settings → Firebase services: uses services
src/app/admin/settings/page.tsx - Trust and safety → Firebase services: uses services
src/app/admin/trust-safety/page.tsx - Firebase services → Firestore: initializes
src/firebase/index.ts - Profile and bookings → Marketplace data types: uses domain types
src/app/profile/page.tsx - Booking flow → Marketplace data types: uses domain types
src/app/book/[id]/page.tsx - Content management → Image upload: uses uploads
src/app/admin/content/page.tsx