How rtemplo/property-pulse-nextjs works
Project type and purpose
• This is a full-stack web application built with Next.js (App Router) for browsing, adding, editing, bookmarking, and messaging around real-estate properties.
• Key features: property listing/search, user authentication (NextAuth), image uploads (Cloudinary), messaging between users, bookmark/saved properties, user profile management.
File structure
• app/
• Hosts Next.js “App Router” pages and layouts (app/layout.tsx, app/loading.tsx, app/page.tsx)
• Feature folders: messages, profile, properties (with dynamic routes and subpages)
• API routes under app/api/auth using NextAuth
• components/
• Reusable UI pieces: Navbar, Hero, PropertyCard, Forms, MessageCard, BookmarkButton, Spinner, etc.
• models/
• Mongoose schemas: User, Property, Message
• config/
• Database connection (config/database.ts)
• Cloudinary config (config/cloudinary.ts)
• utils/
• Auth session helpers, type guards, conversion utilities
• context/
• GlobalContext for client-side state (e.g., theme, notifications)
• public/ & assets/ & _theme_files/
• Static assets and theme templates (CSS, JS, images)
• middleware.ts
• Authentication and route guards at the edge
Detailed capture of essential elements
• Middleware.ts as an edge function for route protection
• Flow of static assets from public/ and assets/ to the client via CDN
• Dynamic routing for properties/[id], nested under the app folder