Skip to content

AnaSteopoae/Travel-Site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HaiHui.ro - Romanian Accommodation Booking Platform

A comprehensive web platform for accommodation bookings across Romanian cities, connecting property owners with travelers through a modern, user-friendly interface.

🎯 Overview

HaiHui.ro is a full-stack accommodation booking platform that enables:

  • Property Owners: List and manage their accommodations (apartments, houses, villas, hotel rooms, bungalows)
  • Travelers: Search, book, and review accommodations across Romania
  • Administrators: Manage users, verify property owners, and oversee platform operations

πŸ—οΈ Architecture

Technology Stack

  • Frontend: React.js with JavaScript
  • Backend: Node.js with Express.js
  • Database: MongoDB with Mongoose ODM
  • Authentication: JWT with HTTP-only cookies
  • File Storage: Cloudinary for image uploads
  • Password Security: bcrypt for hashing

Core Components

  • User Management: Multi-role authentication (clients, property owners, admins)
  • Property Management: Full CRUD operations for accommodations
  • Booking System: Real-time availability checking and reservation management
  • Review System: User feedback and rating functionality
  • Image Handling: Professional property photo management

πŸš€ Features

πŸ‘₯ User Management

  • Client Registration/Login: Standard user accounts for booking accommodations
  • Property Owner Accounts: Business registration with fiscal code verification
  • Admin Panel: Administrative oversight with user management capabilities
  • Profile Management: Update personal information, change passwords
  • Favorites System: Save preferred properties for later

🏠 Property Management

  • Multi-type Properties: Support for apartments, houses, villas, hotel rooms, bungalows
  • Detailed Listings: Location, amenities, pricing, images, availability
  • Image Gallery: Multiple photos with Cloudinary integration
  • Seasonal Pricing: Flexible pricing models including weekend and seasonal rates
  • Availability Calendar: Block/unblock dates, manage bookings
  • Property Status: Activate/deactivate listings

πŸ—•οΈ Booking System

  • Real-time Availability: Check property availability for specific dates
  • Guest Management: Support for adults and children counts
  • Booking Status: Confirmed, pending, cancelled, completed statuses
  • Payment Integration: Multiple payment methods support
  • Special Requests: Custom notes and arrival times
  • Booking History: Complete reservation tracking

⭐ Review & Rating System

  • Post-stay Reviews: Only guests who completed their stay can review
  • 5-star Rating System: Numerical ratings with written comments
  • Average Calculations: Automatic rating aggregation
  • Review Display: Public review visibility on property pages

πŸ” Security & Verification

  • Property Owner Verification: Three-tier verification system (pending, verified, rejected)
  • JWT Authentication: Secure token-based authentication
  • Role-based Access: Different permissions for clients, owners, and admins
  • Data Validation: Input validation and sanitization
  • Password Security: Salted and hashed password storage

πŸ”§ Installation & Deployment

Application Setup (translated from Romanian)

Web application for property rental services. ⚠️ The database includes listings only for the following cities: Bucharest, Braila, Alba Iulia, and Brasov.

Installation Steps

  1. Clone the repository:
git clone
cd travel-site
  1. Install dependencies:
# Backend setup
cd backend
npm install

# Frontend setup
cd ../frontend
npm install
  1. Configure environment variables:
  • In the backend directory, create a .env file based on the provided .env.example.
  1. Restore the database:
# Ensure MongoDB is installed and running
mongorestore --db travelsite_db db-backup/travelsite_db

Running the Application

  1. Start the backend:
cd backend
node app.js
  1. Start the frontend:
cd frontend
npm run dev

🎨 Usage

For Property Owners

  1. Register: Create a business account by providing company details and a valid Romanian fiscal code.
  2. Verification: Wait for admin reviewβ€”your account will move from pending to either verified or rejected.
  3. List Properties: Add accommodations with detailed descriptions, photos, seasonal pricing, and availability calendar.
  4. Manage Bookings: Track incoming bookings and update their statuses (confirmed, canceled, completed).
  5. Availability Control: Block or unblock specific dates to manage property availability.

For Travelers

  1. Search: Look for accommodations by city (e.g., Bucharest, Braila, Alba Iulia, Brasov), travel dates, and number of guests.
  2. Browse: Explore property pages with full details, amenities, pricing, and photo galleries.
  3. Book: Submit a booking with guest information, special requests, and payment details.
  4. Manage: Check your booking history and modify or cancel upcoming reservations.
  5. Review: Leave a review and rating only after completing your stay at a property.

For Administrators

  1. User Management: Oversee all registered users, including clients and property owners.
  2. Owner Verification: Approve or reject business accounts based on submitted documentation.
  3. Platform Oversight: Monitor and moderate all bookings, listings, and reviews.
  4. Content Moderation: Ensure listings and reviews meet platform standards before they go live.

πŸ“Š API Endpoints

Authentication

  • POST /api/users/register - User registration
  • POST /api/users/login - User login
  • POST /api/users/admin/login - Admin login
  • POST /api/users/logout - User logout

Property Management

  • GET /api/proprietati/search - Search properties
  • GET /api/proprietati/:id - Get property details
  • POST /api/proprietati/register - Create new property
  • PUT /api/proprietati/:id - Update property
  • POST /api/proprietati/:id/check-availability - Check availability

Booking System

  • POST /api/bookings/create - Create new booking
  • GET /api/bookings/:id - Get booking details
  • PUT /api/bookings/:id - Update booking
  • PUT /api/bookings/:id/cancel - Cancel booking

Reviews

  • POST /api/proprietati/:id/reviews - Add review
  • GET /api/proprietati/:id/can-review - Check review eligibility

πŸ” Security Features

  • Authentication: JWT tokens with HTTP-only cookies
  • Authorization: Role-based access control
  • Data Validation: Input sanitization and validation
  • Password Security: bcrypt hashing with salt
  • File Upload Security: Cloudinary integration with validation
  • Business Verification: Fiscal code validation for property owners

πŸ› οΈ Development

Database Models

  • User: Client accounts with personal information and booking history
  • Proprietar: Property owner accounts with business verification
  • Property: Accommodation listings with details, pricing, and availability
  • Booking: Reservation records with guest information and payment status
  • Payment: Payment transaction records

Key Features Implementation

  • Multi-role Authentication: Separate login flows for users, owners, and admins
  • Property Verification: Three-tier verification system for business accounts
  • Dynamic Availability: Real-time booking conflict detection
  • Image Management: Professional photo uploading with Cloudinary
  • Review System: Post-stay review eligibility verification

🌍 Romanian Market Focus

  • Location-based Search: City-focused property discovery
  • Local Currency: RON pricing display
  • Romanian Validation: Phone number and fiscal code validation
  • Local Business Requirements: Fiscal code verification for property owners

πŸ† Acknowledgments

  • Built for the Romanian tourism market
  • Designed with property owners and travelers in mind
  • Implements best practices for booking platform security
  • Uses modern web development technologies

HaiHui.ro - Connecting Romanian properties with travelers through technology.

About

HaiHui.ro is a Romanian accommodation booking platform connecting property owners and travelers. It features real-time booking, property management, reviews, and owner verification. Built with React, Node.js, Express, and MongoDB for a secure and seamless user experience.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages