
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
CompletedTechnology Stack
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-studio2. Backend Setup
Navigate to the Server directory:
cd Server
npm installCreate a .env file inside the Server directory:
PORT=5000
MONGO_URI=your_mongodb_connection_string
Start the backend server:
npm startThe 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 installCreate 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 devOpen http://localhost:5173 in your browser to explore Rental Studio!
