A full-stack web application for discovering and booking unique accommodations around the world. StaySphere provides a platform where users can list their properties and travelers can find their perfect stay.
- Browse Listings: Explore a wide variety of accommodations with detailed descriptions and images
- Search & Filter: Find properties based on location, price, and amenities
- User Reviews: Read and write reviews to help make informed decisions
- Secure Booking: Easy and secure reservation system
- List Properties: Create detailed listings with multiple images and descriptions
- Manage Listings: Edit, update, or remove your properties
- Host Dashboard: Track your listings and manage bookings
- User Authentication: Secure signup and login system
- Image Upload: Cloud-based image storage and optimization
- Interactive Maps: View property locations on integrated maps
- Responsive Design: Seamless experience across desktop, tablet, and mobile devices
- Review System: Rating and review functionality for properties
- Node.js - Runtime environment
- Express.js - Web application framework
- MongoDB - NoSQL database for data storage
- Mongoose - MongoDB object modeling
- EJS - Templating engine for dynamic HTML
- CSS - Custom styling
- JavaScript - Client-side interactivity
- Cloudinary - Cloud-based image management and storage
- Passport.js - Authentication middleware
- Express Session - Session management
- Joi - Schema validation
StaySphere/
├── controllers/ # Route controllers (business logic)
├── models/ # Mongoose models (database schemas)
├── routes/ # Express route definitions
├── views/ # EJS templates
├── public/ # Static assets (CSS, JS, images)
├── utils/ # Utility functions and helpers
├── init/ # Database initialization scripts
├── middleware.js # Custom middleware functions
├── schema.js # Joi validation schemas
├── cloudConfig.js # Cloudinary configuration
├── app.js # Main application file
└── package.json # Project dependencies
- Node.js (v14 or higher)
- MongoDB (local installation or MongoDB Atlas account)
- Cloudinary account for image uploads
-
Clone the repository
git clone https://github.com/Nikitaa104/StaySphere.git cd StaySphere -
Install dependencies
npm install
-
Environment Variables Create a
.envfile in the root directory and add:MONGODB_URL=your_mongodb_connection_string CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret SESSION_SECRET=your_session_secret
-
Seed the Database (Optional)
node seed.js
-
Start the Application
node app.js
-
Access the Application Open your browser and navigate to
http://localhost:3000
- Create new property listings with images
- Update existing listings
- Delete listings
- View all listings with pagination
- User registration with validation
- Secure login/logout
- Password encryption
- Session management
- Add reviews to listings
- Rate properties (1-5 stars)
- Edit and delete own reviews
- Display average ratings
- Multiple image upload per listing
- Image optimization and transformation via Cloudinary
- Secure image storage and delivery
- Input validation and sanitization
- XSS protection
- CSRF protection
- Secure session management
- Password hashing
- Authentication and authorization middleware
{
"express": "Web framework",
"mongoose": "MongoDB ODM",
"ejs": "Template engine",
"passport": "Authentication middleware",
"cloudinary": "Image management",
"multer": "File upload handling",
"joi": "Data validation",
"express-session": "Session management",
"connect-flash": "Flash messages",
"method-override": "HTTP method support"
}Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
Nikita
- GitHub: @Nikitaa104
- LinkedIn: https://www.linkedin.com/in/nikita-pandey-2297bb31b/
- Inspired by platforms like Airbnb and other vacation rental websites
- Built as a learning project to demonstrate full-stack web development skills
- Thanks to the open-source community for the amazing tools and libraries
For support, please open an issue in the GitHub repository or contact the maintainer.
⭐ If you find this project useful, please consider giving it a star on GitHub!