Back to Projects
Rental Studio
CompletedReactViteTailwind CSS+8 more

Rental Studio

A modern, full-stack rental accommodation & property booking platform built with the MERN stack, featuring dynamic calendar pricing, custom JWT authentication, and dual photo uploads.

Timeline

1 Month

Role

Full Stack Developer

Team

Solo

Status
Completed

Technology Stack

React
Vite
Tailwind CSS
Node.js
Express.js
MongoDB
Mongoose
JWT
Multer
Date-fns
Axios

Key Challenges

  • Custom JWT session management with HTTP-only cookies and bcrypt security
  • Dual image upload pipeline handling local file disk storage via Multer and remote URL downloads
  • Multi-tier pricing calculations across hourly, daily, and monthly stay durations using date-fns
  • Complex reservation conflict handling and responsive mobile-first UI design

Key Learnings

  • Full-stack MERN REST API architecture and MVC separation
  • MongoDB schema relationships for Users, Places, and Bookings
  • Vite & React Router DOM (v6) client-side routing and context state
  • Custom authentication flows with protected routes and cookie credentials
  • Date math and automated price estimation algorithms with date-fns

๐Ÿก Rental Studio: Modern Property Rental & Booking Platform

Overview

Rental Studio is an end-to-end, full-stack web application inspired by modern hospitality platforms like Airbnb. Tailored specifically for the rental accommodation and studio property market, it bridges property hosts and travelers by providing a streamlined ecosystem to showcase places, manage comprehensive amenities, upload high-resolution galleries, and reserve stays with instant pricing calculations.


๐ŸŽฏ Key Features

๐Ÿ” Authentication & User Sessions

  • Custom JWT Security: Token-based authentication with secure HTTP-only cookies preventing XSS attacks.
  • Encrypted Passwords: Salted password hashing with Bcrypt.js.
  • Protected User Profiles: Role-aware routes ensuring private booking histories and property management panels.

๐Ÿก Property Discovery & Exploration

  • Visual Home Feed: Browse available studio stays with high-quality photo previews, location tags, and transparent price tags.
  • Detailed Place Pages: Explore comprehensive property descriptions, host details, max guest counts, check-in/out times, and perk lists.

โž• Host & List Places

  • Full Listing CRUD: Property owners can publish new rental listings, edit existing details, update photo galleries, and remove listings.
  • Custom Information: Configure specific studio rules, check-in windows, and accommodation guidelines.

๐Ÿ“ธ Dual Photo Upload System

  • Local File Uploads: Upload multiple high-resolution photos directly from disk handled via Multer.
  • Remote Image Scraper: Paste external image URLs for automatic server-side downloading and local storage caching.

๐Ÿ’ต Flexible Multi-Tier Pricing

  • Custom Rates: Configure dynamic price points tailored for hourly, daily, or monthly rental periods.
  • Automated Price Calculator: Instant calculation of total stay costs based on selected dates and duration.

๐Ÿ›‹๏ธ Comprehensive Amenities & Perks

  • Highlight essential studio perks including:
    • ๐Ÿ“ถ High-Speed WiFi
    • ๐Ÿš— Free Parking on Premises
    • ๐Ÿ“บ TV & Entertainment
    • ๐Ÿ›‹๏ธ Fully Furnished
    • ๐Ÿพ Pets Allowed
    • ๐Ÿšช Private Entrance
    • โšก 24x7 Electricity Backup
    • ๐Ÿ“ Nearby Amenities (Library, Hospital, Park, Public Transit)
    • ๐Ÿ›ก๏ธ 24x7 Security & CCTV

๐Ÿ“… Dynamic Date & Price Calculator

  • Integrated date picker powered by date-fns computing total days/nights and multiplying by rate tiers.
  • Real-time input validation preventing invalid check-in/check-out selections.

๐Ÿ›Ž๏ธ Booking & Reservation Management

  • Complete reservation workflow recording guest contact details, total price, and date ranges.
  • Dedicated My Bookings view allowing travelers to track upcoming and past stays.

๐Ÿ“ฑ Responsive Mobile-First Design

  • Clean, accessible user interface built from scratch with Tailwind CSS.

โš™๏ธ Tech Stack & Architecture

Frontend

  • React 18: Dynamic component-driven user interface.
  • Vite: Next-generation fast frontend bundler and HMR.
  • React Router DOM (v6): Declarative client-side routing.
  • Tailwind CSS: Modern utility-first responsive styling.
  • Axios: HTTP client with credentials and session cookie support.
  • Date-fns: Lightweight date manipulation and stay duration math.
  • React Hot Toast: Elegant interactive notification toasts.

Backend & Database

  • Node.js & Express.js: Modular RESTful API architecture.
  • MongoDB & Mongoose: Flexible NoSQL document schemas for Users, Places, and Bookings.
  • JWT (JSON Web Tokens): Stateless token authentication via HTTP-only cookies.
  • Bcrypt.js: Cryptographic password hashing.
  • Multer: Multi-part form-data handler for disk-based image uploads.
  • Image-Downloader: Utility for server-side remote image fetching via URL.

๐Ÿ—๏ธ Project Architecture

rental-studio/
โ”œโ”€โ”€ Client/                     # Frontend Application (React + Vite + Tailwind)
โ”‚   โ”œโ”€โ”€ public/                 # Static assets
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ Components/         # Layouts, Navigation, Auth, & Property Details
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AccountSubComponents/   # Bookings, Sell Property, Place Form, Perks
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Placedetailscomponents/ # Place Details, Booked Place, Booking Operations
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Header.jsx      # Top navigation with user dropdown
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ IndexPage.jsx   # Home feed displaying all rental places
โ”‚   โ”‚   โ”œโ”€โ”€ context/            # User Authentication Context Provider
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx             # Route definitions & global configs
โ”‚   โ”‚   โ””โ”€โ”€ main.jsx            # Application entry point
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ vite.config.js
โ”‚
โ””โ”€โ”€ Server/                     # Backend Application (Node.js + Express + MongoDB)
    โ”œโ”€โ”€ modals/                 # Mongoose Schemas (User, Place, Booking)
    โ”œโ”€โ”€ uploads/                # Static storage for uploaded property images
    โ”œโ”€โ”€ index.js                # Express server & API route endpoints
    โ””โ”€โ”€ package.json

๐Ÿงช Demo Account (For Testing)

You can explore all features of the application directly using the demo credentials below:

  • Email: tester@test.com
  • Password: Tester

[!TIP] Use this account to test property listing, image uploads, amenities configuration, and booking reservations without signing up.


๐Ÿ“ก API Endpoints Overview

| Method | Endpoint | Description | Auth Required | | :----- | :---------------- | :------------------------------------------ | :-----------: | | POST | /signup | Register a new user | โŒ | | POST | /login | Authenticate user & issue JWT cookie | โŒ | | POST | /logout | Invalidate user session cookie | โŒ | | GET | /profile | Fetch logged-in user profile | โœ… | | GET | /places | Retrieve all listed properties | โŒ | | GET | /places/:id | Get details of a single property | โŒ | | POST | /places | Create a new property listing | โœ… | | PUT | /places | Update an existing property | โœ… | | GET | /user-places | Get properties listed by the logged-in host | โœ… | | POST | /upload-by-link | Download & store image from URL | โœ… | | POST | /upload | Upload multiple images from local disk | โœ… | | POST | /booking | Create a new reservation | โœ… | | GET | /booking | List all bookings for the logged-in user | โœ… |


๐Ÿคธ Quick Start & Local Setup

Follow these steps to set up the project locally on your machine:

1. Clone the Repository

git clone https://github.com/Souvik-223/rental-studio.git
cd rental-studio

2. Backend Setup

Navigate to the Server directory:

cd Server
npm install

Create a .env file inside the Server directory:

PORT=5000
MONGO_URI=your_mongodb_connection_string

Start the backend server:

npm start

The server will start running on http://localhost:5000.

3. Frontend Setup

Open a new terminal window and navigate to the Client directory:

cd Client
npm install

Create a .env file inside the Client directory:

VITE_URL=http://localhost:5000
VITE_DataURL=http://localhost:5000/uploads/

Start the Vite development server:

npm run dev

Open http://localhost:5173 in your browser to explore Rental Studio!

โ€œYou have a right to perform your prescribed duty, but you are not entitled to the fruits of actions.โ€

โ€” Bhagavad Gita