Skip to content

Repository files navigation


RentNest Backend

A production-oriented REST API backend for a full-featured rental marketplace platform.

Designed with multi-role access control, transactional workflows, and secure payment processing.





Project Summary

Project RentNest Backend
Type REST API — Rental Marketplace Platform
Roles Tenant, Landlord, Admin
Live API https://rayhaanrakib-rentnest-backend.vercel.app
API Documentation View Full API Reference on Postman
Language TypeScript (Strict Mode)
Database PostgreSQL via Prisma ORM
Authentication JWT with bcrypt password hashing
Payments Stripe Checkout with Webhook Verification
Deployment Vercel

Overview

RentNest Backend is a marketplace API designed for property rental workflows. It supports property discovery, rental request management, payment processing, reviews, and administrative oversight across multiple user roles.

This project demonstrates the backend design of a real-world transactional platform, with secure authentication, role-based authorization, relational data modeling, and payment integration.


Product Scope

Tenant

  • Register and authenticate securely
  • Browse and search available properties with filters
  • Submit rental requests for preferred listings
  • Complete secure payments through Stripe Checkout
  • Track rental and payment history
  • Leave a verified review after completing a rental

Landlord

  • Create, update, and remove property listings
  • Manage property availability
  • Review and approve or reject incoming rental requests
  • Monitor listings and associated activity

Admin

  • View and manage all users and account statuses
  • Monitor property listings across the platform
  • Access platform-wide statistics and revenue data
  • Moderate core marketplace resources

Technology Stack

Layer Technology
Runtime Node.js 20+
Framework Express.js 5.x
Language TypeScript
Database PostgreSQL
ORM Prisma
Authentication JWT, bcrypt
Payments Stripe
Deployment Vercel
Supporting Libraries cors, dotenv, cookie-parser, http-status, tsup, tsx

Project Structure

RentNest-Backend-Project/
├── src/
│   ├── config/
│   ├── lib/
│   ├── middlewares/
│   ├── modules/
│   │   ├── auth/
│   │   ├── user/
│   │   ├── property/
│   │   ├── rental/
│   │   ├── payment/
│   │   ├── review/
│   │   ├── category/
│   │   └── admin/
│   ├── utils/
│   ├── app.ts
│   └── server.ts
├── prisma/
│   │   ├── migrations/
│   │   ├── schema/
└── package.json

Each module is fully self-contained with its own routes, controller, service layer, and validation — following a consistent pattern across the entire codebase.


Local Setup

Prerequisites

  • Node.js 20 or higher
  • npm or bun
  • PostgreSQL
  • Stripe account

Installation

1. Clone the repository

git clone https://github.com/rayhaanrakib/RentNest-Backend-Project.git
cd RentNest-Backend-Project

2. Install dependencies

npm install

3. Configure environment variables

Create a .env file in the root directory and add the values below.

4. Run database migrations

npx prisma migrate dev

5. Generate Prisma Client

npx prisma generate

6. Start development server

npm run dev

7. Build for production

npm run build

Environment Variables

# Server
PORT=5000
NODE_ENV=development
APP_URL=http://localhost:3000

# Database
DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/rentnest?schema=public"

# Authentication
JWT_ACCESS_SECRET=your_jwt_access_secret_key
JWT_REFRESH_SECRET=your_jwt_refresh_secret_key
BCRYPT_SALT_ROUNDS=rounds_number
JWT_ACCESS_EXPIRES_IN=1d
JWT_REFRESH_EXPIRES_IN=7d

# Stripe
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=whsec_your_stripe_webhook_secret
STRIPE_PRODUCT_PRICE_ID=pk_test_your_stripe_product_price_id

License

Licensed under the ISC License. See LICENSE for details.

About

RentNest is a backend API for a rental marketplace. Landlords can list properties, manage availability, and handle rental requests. Tenants can browse, apply, and review. Admins manage users and moderate content.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages