StayNest is a full-stack property renting platform that allows users to discover, create, and manage accommodation listings.
Built as a backend-focused project, it simulates production-level rental platforms with secure authentication, media handling, geolocation, and scalable architecture.
https://staynest-elr9.onrender.com
- Create, edit, and delete property listings
- View all listings and individual listing details
- RESTful routing architecture
- User signup, login, and logout using Passport.js
- Session-based authentication
- Secure password handling
- Only listing owners can edit or delete their listings
- Protected routes using middleware
- User-based access control
- Add and delete reviews for listings
- Star-based rating system using Starability
- Reviews associated with users and listings
- Upload and store listing images using Cloudinary
- Efficient media handling for production-style applications
- Display listing locations using interactive maps
- Integrated Leaflet with MapTiler for geolocation visualization
- Reusable EJS boilerplate layout
- Dynamic navbar based on authentication state
- Flash messages for user feedback
- Clean and responsive UI design
- Success and error alerts for user actions
- Improved UX with real-time feedback
- Joi schema validation for robust data validation
- Centralized error handling using custom ExpressError class
- Async error handling using wrapAsync utility
- Middleware-based authorization and route protection
- Clean MVC architecture for scalability
- Node.js
- Express.js
- MongoDB
- Mongoose
- Passport.js (Authentication)
- Joi (Validation)
- EJS templating
- CSS
- Vanilla JavaScript
- Leaflet (Maps)
- Starability (Ratings UI)
- Git & GitHub
- Nodemon
- MapTiler (Map API)
- Cloudinary (Image storage & management)
- Project follows MVC architecture with modular routing and utility-based error handling.
StayNest/
│
├── controllers/
│ ├── listing.js
│ ├── review.js
│ └── user.js
│
├── models/
│ ├── listing.js
│ ├── review.js
│ └── user.js
│
├── routes/
│ ├── listing.js
│ ├── review.js
│ └── user.js
│
├── views/
│ ├── listings/
│ ├── users/
│ ├── includes/
│ ├── layouts/
│ └── error.ejs
│
├── public/
│ ├── assets/
│ ├── css/
│ └── js/
│
├── utils/
│ ├── wrapAsync.js
│ └── ExpressError.js
│
├── init/
│ ├── data.js
│ └── index.js
│
├── middleware.js
├── cloudConfig.js
├── schema.js
├── app.js
├── package.json
└── .gitignore
git clone https://github.com/rakesh2OO5/StayNest.git
cd StayNest
npm install
nodemon app.js
Application runs at:
http://localhost:5000
- RESTful API design
- MVC architecture
- Middleware-based design patterns
- Authentication & authorization (Passport.js)
- Database relationships (one-to-many)
- Backend validation using Joi
- Centralized error handling strategies
- Building production-style Node.js applications
Rakesh D