How kellybytes/property-pulse works
Property Pulse is a Next.js real-estate marketplace. Users authenticate, browse or search listings, view a property, bookmark it, and send an inquiry; owners create and manage listings and handle incoming messages. The graph preserves the documented media, mapping, pagination, and unread-message capabilities. Relationships are based on excerpts, SOURCE INDEX references, or README statements; some documented integrations are shown as unverified where implementation wiring was not sampled.
Main entry points: [id]/page.jsx Property detail · database.js MongoDB connection · properties/page.jsx Listing browse · authOptions.js Auth configuration
Components 28
Identity
- Auth configuration
utils/authOptions.js - Auth route
app/api/auth/[...nextauth]/route.js - Session lookup
utils/getSessionUser.js - Route protection
middleware.js
Listing discovery
- Home page
app/page.jsx - Search form
components/PropertySearchForm.jsx - Search results
app/properties/search-results/page.jsx - Listing browse
app/properties/page.jsx - Property detail
app/properties/[id]/page.jsx - Listing cards and views
components/PropertyCard.jsx - Bookmarks
components/BookmarkButton.jsx
Listing management
- Listing forms
components/PropertyAddForm.jsx - Listing actions
app/actions - Owner profile
app/profile/page.jsx
Messaging
- Inquiry form
components/PropertyContactForm.jsx - Message actions
app/actions - Owner inbox
app/messages/page.jsx - Message controls
components/MessageCard.jsx - Unread count state
context/GlobalContext.js
Data and integrations
- Property model
models/Property.js - User model
models/User.js - Message model
models/Message.js - MongoDB connection
config/database.js - Cloudinary media
config/cloudinary.js - Map and geocoding
components/PropertyMap.jsx - Document serialization
utils/convertToObject.js
Other components
- User
- Google OAuth
Connections 41
- User → Auth route: signs in
- Auth route → Auth configuration: uses options
app/api/auth/[...nextauth]/route.js - Auth configuration → Google OAuth: authenticates with
utils/authOptions.js - Auth configuration → MongoDB connection: connects to
utils/authOptions.js - Auth configuration → User model: finds or creates
utils/authOptions.js - Session lookup → Auth configuration: reads session
utils/getSessionUser.js - User → Home page: visits
- Home page → Listing browse: offers listings
app/page.jsx - Home page → Search form: offers search
app/page.jsx - Search form → Search results: routes query
components/PropertySearchForm.jsx - Search results → MongoDB connection: connects to
app/properties/search-results/page.jsx - Search results → Property model: queries listings
app/properties/search-results/page.jsx - Listing browse → MongoDB connection: connects to
app/properties/page.jsx - Listing browse → Property model: queries listings
app/properties/page.jsx - Listing browse → Listing cards and views: renders cards
app/properties/page.jsx - Search results → Listing cards and views: renders cards
app/properties/search-results/page.jsx - Listing cards and views → Property detail: opens listing
- Property detail → MongoDB connection: connects to
app/properties/[id]/page.jsx - Property detail → Property model: loads listing
app/properties/[id]/page.jsx - Property detail → Bookmarks: renders control
app/properties/[id]/page.jsx - Property detail → Inquiry form: renders inquiry
app/properties/[id]/page.jsx - Property detail → Map and geocoding: shows location
- User → Listing forms: submits listing
- Listing forms → Listing actions: calls add action
components/PropertyAddForm.jsx - Listing actions → MongoDB connection: connects to
app/actions/addProperty.js - Listing actions → Property model: creates or updates
app/actions/addProperty.js - Listing actions → Cloudinary media: uploads images
app/actions/addProperty.js - Owner profile → Session lookup: gets user
app/profile/page.jsx - Owner profile → MongoDB connection: connects to
app/profile/page.jsx - Owner profile → Property model: loads owner listings
app/profile/page.jsx - Owner profile → Listing cards and views: renders listings
app/profile/page.jsx - Inquiry form → Message actions: calls add action
components/PropertyContactForm.jsx - Message actions → Message model: stores inquiry
app/actions/getUnreadMessageCount.js - Owner inbox → MongoDB connection: connects to
app/messages/page.jsx - Owner inbox → Message model: loads inbox
app/messages/page.jsx - Owner inbox → Message controls: renders messages
app/messages/page.jsx - Message controls → Message actions: marks or deletes
components/MessageCard.jsx - Unread count state → Message actions: fetches unread count
context/GlobalContext.js - Message actions → Message model: updates messages
app/actions/getUnreadMessageCount.js - Listing browse → Document serialization: serializes results
- Property detail → Document serialization: serializes listing
app/properties/[id]/page.jsx