Skip to content

nishantthkid/BooK-Stay

Repository files navigation

Book&Stay - Find Your Perfect Getaway

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 ✨

What Makes Book&Stay Special?

For Travelers 🌍

🔍 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

For Property Owners 🏠

🏡 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

Under the Hood 🚀

🔐 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

Built With Modern Tech

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 ☕

Getting Started (The Fun Part!)

What You'll Need

  • Node.js (version 14 or newer)
  • npm or yarn (your choice!)
  • MongoDB (local setup or cloud)
  • Git (for cloning the magic)

Let's Build This Thing 🛠️

1. Grab the Code

git clone https://github.com/yourusername/bookandstay.git
cd bookandstay

2. 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 dev

3. Frontend Setup

cd ../frontend
npm install

# Launch the magic
npm start

4. See It Live

Environment Setup 🔧

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_password

How It's All Organized 📁

book-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! 👋

API Endpoints (The Good Stuff) 🔌

User Authentication

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

Property Management

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

Booking System

GET    /api/bookings         # Your booking history
POST   /api/bookings         # Make a reservation
PUT    /api/bookings/:id     # Modify booking
DELETE /api/bookings/:id     # Cancel booking

Reviews & Ratings

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

Testing Everything Works ✅

# Test the backend
cd backend && npm test

# Test the frontend  
cd frontend && npm test

Ready to Go Live? 🚀

Frontend Deployment

  1. Build for production: npm run build
  2. Deploy to Netlify, Vercel, or your favorite hosting service
  3. Point your custom domain (optional but classy)

Database Setup

  1. Create a MongoDB Atlas account (it's free!)
  2. Set up your cluster
  3. Update your MONGODB_URI in production

Want to Contribute? 🤝

We'd love your help making Book&Stay even better! Here's how:

  1. Fork this repository
  2. Create a feature branch: git checkout -b feature/awesome-idea
  3. Commit your changes: git commit -m 'Add some awesome feature'
  4. Push to your branch: git push origin feature/awesome-idea
  5. Open a Pull Request and tell us about your changes!

Code Guidelines

  • Keep it clean and readable
  • Write tests for new features
  • Follow the existing style
  • Update docs when needed
  • Be awesome! 😎

Need Help or Found a Bug? 🐛

  • Issues: Open an issue
  • Questions: Drop us a line or start a discussion
  • Feature Ideas: We love hearing from you!

The Team Behind Book&Stay 👨‍💻

Created with ❤️ by Nishant

Special Thanks 🙏

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •