React | Node.js | Express | MongoDB | JWT | Passport.js
Book&Stay is your go-to vacation rental platform that connects travelers with amazing places to stay. Whether you're planning a weekend escape or a month-long adventure, we've got you covered with thousands of unique properties and a booking experience that just works.
Built with care, powered by modern tech, and designed to make your travel dreams come true ✨
🔍 Smart Discovery - Find the perfect spot with our intelligent search filters
💳 Hassle-Free Booking - Secure payments and instant confirmations
👤 Personal Dashboard - Keep track of all your trips in one place
⭐ Honest Reviews - Real feedback from real travelers
📱 Works Everywhere - Beautiful experience on any device
🏡 Easy Listing - Get your property online in minutes
📊 Host Central - Monitor bookings, earnings, and guest messages
📅 Smart Calendar - Manage availability and pricing with ease
📈 Performance Insights - Understand what makes your listing successful
🔐 Bank-Level Security - Your data and payments are always protected
⚡ Lightning Fast - Optimized performance that doesn't keep you waiting
🔄 Real-Time Updates - Live booking status and instant notifications
☁️ Cloud-Powered - Reliable hosting that scales with demand
| What | How |
|---|---|
| Frontend Magic | React.js, Modern CSS3, HTML5, ES6+ JavaScript |
| Backend Power | Node.js, Express.js, RESTful API Architecture |
| Data Storage | MongoDB with Mongoose for seamless data handling |
| Security First | JWT tokens, Passport.js authentication |
| Cloud Services | MongoDB Atlas, Cloudinary for image management |
| Developer Tools | npm, Git, VS Code, and lots of coffee ☕ |
- Node.js (version 14 or newer)
- npm or yarn (your choice!)
- MongoDB (local setup or cloud)
- Git (for cloning the magic)
1. Grab the Code
git clone https://github.com/yourusername/bookandstay.git
cd bookandstay2. Backend Setup
cd backend
npm install
# Set up your environment
cp .env.example .env
# Edit .env with your secret sauce (see below)
# Fire up the server
npm run dev3. Frontend Setup
cd ../frontend
npm install
# Launch the magic
npm start4. See It Live
- Frontend: http://localhost:3000 (where the magic happens)
- Backend API: http://localhost:5000 (the engine room)
Create a .env file in your backend folder with these secrets:
# Your Database Connection
MONGODB_URI=mongodb+srv://yourcluster.mongodb.net/bookstay
# JWT Magic Words
JWT_SECRET=your_super_secret_key_that_nobody_knows
JWT_EXPIRE=7d
# Server Configuration
PORT=5000
NODE_ENV=development
# Image Uploads (Cloudinary)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Email Notifications (Optional but Cool)
EMAIL_USER=hello@bookstay.com
EMAIL_PASS=your_app_passwordbook-and-stay/
├── frontend/ # React frontend goodness
│ ├── public/ # Static files
│ ├── src/
│ │ ├── components/ # Reusable UI pieces
│ │ ├── pages/ # Main page components
│ │ ├── services/ # API communication
│ │ ├── hooks/ # Custom React hooks
│ │ ├── context/ # State management
│ │ └── styles/ # Beautiful CSS
│ └── package.json
├── backend/ # Node.js API server
│ ├── controllers/ # Business logic handlers
│ ├── models/ # Database schemas
│ ├── routes/ # API endpoints
│ ├── middleware/ # Custom middleware
│ ├── utils/ # Helper functions
│ ├── config/ # App configuration
│ └── server.js # Entry point
├── docs/ # Documentation
└── README.md # You are here! 👋
POST /api/auth/register # Join the community
POST /api/auth/login # Welcome back!
GET /api/auth/me # Get your profile
PUT /api/auth/profile # Update your info
GET /api/properties # Browse all properties
GET /api/properties/:id # Get property details
POST /api/properties # List your property
PUT /api/properties/:id # Update your listing
DELETE /api/properties/:id # Remove property
GET /api/bookings # Your booking history
POST /api/bookings # Make a reservation
PUT /api/bookings/:id # Modify booking
DELETE /api/bookings/:id # Cancel booking
GET /api/reviews/property/:id # Read reviews
POST /api/reviews # Share your experience
PUT /api/reviews/:id # Edit your review
DELETE /api/reviews/:id # Remove review
# Test the backend
cd backend && npm test
# Test the frontend
cd frontend && npm test- Build for production:
npm run build - Deploy to Netlify, Vercel, or your favorite hosting service
- Point your custom domain (optional but classy)
- Create a MongoDB Atlas account (it's free!)
- Set up your cluster
- Update your
MONGODB_URIin production
We'd love your help making Book&Stay even better! Here's how:
- Fork this repository
- Create a feature branch:
git checkout -b feature/awesome-idea - Commit your changes:
git commit -m 'Add some awesome feature' - Push to your branch:
git push origin feature/awesome-idea - Open a Pull Request and tell us about your changes!
- Keep it clean and readable
- Write tests for new features
- Follow the existing style
- Update docs when needed
- Be awesome! 😎
- Issues: Open an issue
- Questions: Drop us a line or start a discussion
- Feature Ideas: We love hearing from you!
Created with ❤️ by Nishant
- 🐙 GitHub: @nishantthkid
- 💼 LinkedIn: Connect with me
- 📧 Email: nishanthakurs7519@gmail.com
- Inspired by the travel community and the joy of discovering new places
- Built with amazing open-source tools and libraries
- Thanks to everyone who believes in making travel accessible to all
- Coffee shops around the world for providing the fuel ☕
Ready to start your Book&Stay journey? Clone this repo and let's build something amazing together! 🚀
"The world is a book, and those who do not travel read only one page." - Augustine