You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sojourn is a full-stack Airbnb-inspired listings platform built exclusively for Indian destinations. Users can explore, list, and review stays across categories with interactive maps, image uploads, and secure authentication.
Browse & Filter — Explore listings across 8 curated categories (Mountains, Beaches, Farms, Castles, Caves, Arctic, Camping, Heritage) with a category chip filter system using GET query parameters
Interactive Maps — Each listing is geocoded on creation and displayed with a MapTiler-powered map marker on the listing detail page
User Authentication — Secure signup, login, and logout via Passport.js with session persistence using connect-mongo
Image Uploads — Hosts can upload listing photos, stored and served via Cloudinary CDN
Reviews — Authenticated users can post and delete reviews on listings
Authorization — Listing and review operations are protected; only owners can edit or delete their content
Flash Notifications — Real-time success and error feedback across all user actions
Responsive UI — Clean, mobile-friendly interface built with Bootstrap 5
Tech Stack
Backend
Technology
Role
Node.js
Runtime environment
Express.js
Web framework and routing
MongoDB
NoSQL database
Mongoose
ODM for schema modeling and validation
Passport.js
Authentication middleware (local strategy)
passport-local-mongoose
Simplifies Passport + Mongoose user model integration
express-session
Session management
connect-mongo
Persists sessions to MongoDB Atlas (survives server restarts)
MVC Pattern — Clear separation of models, views, and controllers
Session Persistence — connect-mongo ensures sessions survive server cold starts on Render's free tier
Geocoding on Write — Listing coordinates are resolved at creation time via MapTiler and stored as GeoJSON in MongoDB, keeping map rendering fast
Owner-only Authorization — Middleware guards check req.user._id against listing/review ownership before allowing edits or deletes
Centralized Error Handling — All async route handlers are wrapped with wrapAsync; errors flow to a single Express error-handling middleware
Demo Credentials
Role
Username
Password
Host
TestHost
test1234
Guest
TestGuest
test1234
Seeded Data
The database includes 12 sample listings across 8 categories, covering Indian destinations from Leh-Ladakh to Kerala backwaters, with test accounts for both host and guest roles.