Skip to content

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿก StayScape

Discover places worth staying.

StayScape is a full-stack travel and accommodation platform where users can discover beautiful stays, search and filter properties, save favorites, view detailed listings, write reviews, and create their own stays.

The project is built with Node.js, Express.js, MongoDB, EJS, and Cloudinary, with a strong focus on clean UI, authentication, image management, security, and practical full-stack functionality.


๐ŸŒ Project

GitHub:
https://github.com/kunal-sonawane/StayScape

Live Demo:
Coming soon


โœจ Features

๐Ÿ  Explore Stays

  • Browse available stays
  • Beautiful responsive listing cards
  • View detailed property information
  • Explore different stay categories
  • Location and country information
  • Price per night
  • Responsive design for desktop, tablet, and mobile

๐Ÿ”Ž Search & Filtering

Search stays by:

  • Title
  • Location
  • Country

Filter by:

  • Category
  • Minimum price
  • Maximum price

Sort by:

  • Price: Low to High
  • Price: High to Low

Includes pagination for a better browsing experience.

โค๏ธ Favorites

Authenticated users can:

  • Save favorite stays
  • Remove saved stays
  • View their saved properties
  • Manage favorites from their account

๐Ÿ‘ค Authentication

StayScape includes:

  • User registration
  • Login
  • Logout
  • Session-based authentication
  • Protected routes
  • User-specific listings
  • User-specific favorites
  • Secure password handling

๐Ÿก Create & Manage Stays

Authenticated users can create their own listings with:

  • Property title
  • Description
  • Location
  • Country
  • Price
  • Category
  • Multiple property images

Listing owners can also manage their own listings.

โ˜๏ธ Cloudinary Image Management

StayScape uses Cloudinary for property image storage.

Features include:

  • Multiple image uploads
  • Cloud-based image storage
  • Image optimization
  • Image delivery through Cloudinary
  • Image management when listings are updated or removed

โญ Reviews

Users can:

  • Add reviews to listings
  • View reviews
  • Manage their own reviews
  • Provide ratings for stays

๐Ÿ—บ๏ธ Location & Maps

StayScape includes location functionality using:

  • Leaflet
  • OpenStreetMap
  • Location coordinates
  • Interactive property locations

๐Ÿ›ก๏ธ Security

The application includes:

  • Protected routes
  • Authentication middleware
  • CSRF protection
  • Input sanitization
  • Secure session handling
  • Security headers
  • Rate limiting
  • Environment variables for secrets
  • Centralized error handling
  • Safe production error responses

๐Ÿ› ๏ธ Tech Stack

Frontend

  • HTML5
  • CSS3
  • JavaScript
  • EJS

Backend

  • Node.js
  • Express.js

Database

  • MongoDB
  • Mongoose

Image Management

  • Cloudinary

Maps

  • Leaflet
  • OpenStreetMap

Security

  • Express sessions
  • Password hashing
  • CSRF protection
  • Input sanitization
  • Rate limiting
  • Security headers

Development

  • Git
  • GitHub
  • VS Code
  • npm

Deployment

  • Docker
  • Render configuration

๐Ÿ—๏ธ Project Structure

StayScape/
โ”‚
โ”œโ”€โ”€ app.js
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ Procfile
โ”œโ”€โ”€ render.yaml
โ”œโ”€โ”€ SECURITY.md
โ”œโ”€โ”€ README.md
โ”‚
โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ listing.js
โ”‚   โ”œโ”€โ”€ user.js
โ”‚   โ””โ”€โ”€ review.js
โ”‚
โ”œโ”€โ”€ middleware/
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ views/
โ”‚   โ”œโ”€โ”€ listings/
โ”‚   โ”œโ”€โ”€ partials/
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”œโ”€โ”€ js/
โ”‚   โ””โ”€โ”€ images/
โ”‚
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ docs/
โ”œโ”€โ”€ init/
โ”‚
โ””โ”€โ”€ Screenshots of project/

๐Ÿ”„ Application Architecture

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚      User        โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
                             โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  StayScape UI    โ”‚
                    โ”‚   EJS + CSS + JS โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
                             โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   Express.js     โ”‚
                    โ”‚     Server       โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚               โ”‚                โ”‚
             โ–ผ               โ–ผ                โ–ผ
       Authentication    Listings        Favorites
             โ”‚               โ”‚                โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
                             โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚     MongoDB      โ”‚
                    โ”‚    + Mongoose    โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Property Images
       โ”‚
       โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  Cloudinary โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ธ Screenshots

The project screenshots are available in:

Screenshots of project/

The screenshots showcase:

  • ๐Ÿ  StayScape homepage
  • ๐Ÿก Explore stays
  • ๐Ÿ”Ž Search and filtering
  • ๐Ÿ“„ Listing details
  • โž• Create a stay
  • โ˜๏ธ Cloudinary image uploads
  • โค๏ธ Favorites
  • ๐Ÿ” Login and registration
  • ๐Ÿ‘จโ€๐Ÿ’ป Developer section
  • ๐Ÿ“ฑ Responsive interface

โš™๏ธ Getting Started

Prerequisites

Make sure you have installed:

  • Node.js
  • npm
  • MongoDB / MongoDB Atlas
  • Cloudinary account

1. Clone the repository

git clone https://github.com/kunal-sonawane/StayScape.git

2. Open the project

cd StayScape

3. Install dependencies

npm install

4. Configure environment variables

Create a .env file in the project root.

Example:

MONGO_URL=your_mongodb_connection_string
PORT=8080
SESSION_SECRET=your_session_secret

CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

โš ๏ธ Never commit your .env file or expose your MongoDB and Cloudinary credentials.

5. Seed sample data

npm run seed

6. Start the application

npm start

Open:

http://localhost:8080

โ˜๏ธ Cloudinary Image Flow

StayScape uses Cloudinary to store property images.

User selects images
        โ”‚
        โ–ผ
StayScape Server
        โ”‚
        โ–ผ
Cloudinary
        โ”‚
        โ–ผ
Image URL
        โ”‚
        โ–ผ
MongoDB
        โ”‚
        โ–ผ
StayScape Listing

This keeps image storage separate from the application server and provides reliable cloud-based image delivery.


๐Ÿ” Environment Variables

Sensitive configuration is stored outside the source code.

The application uses environment variables for:

  • MongoDB connection
  • Session secret
  • Cloudinary Cloud Name
  • Cloudinary API Key
  • Cloudinary API Secret
  • Application configuration

The .env file is excluded from Git using .gitignore.


๐Ÿงช Testing

Automated tests are included in the project.

Run:

npm test

๐Ÿš€ Deployment

StayScape includes deployment configuration for cloud hosting.

Deployment-related files include:

Dockerfile
Procfile
render.yaml

The application can be deployed to a Node.js-compatible hosting platform such as Render.


๐Ÿ“š What I Learned

Building StayScape helped strengthen my practical understanding of:

  • Node.js backend development
  • Express.js
  • MongoDB and Mongoose
  • EJS templating
  • Authentication and authorization
  • Session management
  • CRUD operations
  • Cloudinary integration
  • Image upload and management
  • Search and filtering
  • Pagination
  • Favorites
  • Reviews
  • Maps and location functionality
  • Security middleware
  • Error handling
  • Git and GitHub
  • Deployment configuration

๐Ÿ”ฎ Future Improvements

Potential future improvements include:

  • ๐Ÿจ Booking and reservation system
  • ๐Ÿ’ณ Payment integration
  • ๐Ÿ“ง Email notifications
  • ๐Ÿ“Š Host analytics dashboard
  • ๐Ÿค– Personalized stay recommendations
  • ๐Ÿ‘จโ€๐Ÿ’ผ Admin dashboard
  • ๐Ÿ”” Real-time notifications
  • ๐ŸŒ Advanced location-based discovery

๐Ÿ‘จโ€๐Ÿ’ป Developer

Kunal Sonawane

Full Stack Developer

Building modern web applications with:

Node.js ยท Express.js ยท MongoDB ยท JavaScript ยท React.js

Connect

GitHub:
https://github.com/kunal-sonawane

LinkedIn:
https://linkedin.com/in/kunalsonawane


๐Ÿ“„ License

This project is created for learning, portfolio, and demonstration purposes.


Built with โค๏ธ by Kunal Sonawane

About

A full-stack travel and accommodation platform built with Node.js, Express.js, MongoDB, EJS, and Cloudinary. Discover stays, search and filter listings, upload property images, save favorites, write reviews, and manage your own listings.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages