# sujalsubedixx/rentease architecture

> Architecture diagram of the GitHub repository sujalsubedixx/rentease, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sujalsubedixx/rentease
- Repository: https://github.com/sujalsubedixx/rentease

## Overview

RentEase is a full-stack product-rental marketplace. Renters discover listings, manage accounts, book rentals and make payments; owners manage listings and bookings, while administrators oversee platform activity. The graph preserves documented KYC, complaints, ratings, wishlist and recommendation capabilities. Some subsystem links are dashed because their route or page implementations were not sampled; solid edges are limited to visible calls, mounts and documented relationships.

Main entry points: [`backend/src/routes`](https://github.com/sujalsubedixx/rentease/tree/main/backend/src/routes) (API route modules), [`backend/src/controllers/admin.controller.ts`](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/admin.controller.ts) (Platform administration), [`backend/src/controllers/user.controller.ts`](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/user.controller.ts) (Accounts and profiles), [`backend/src/controllers/items.controller.ts`](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/items.controller.ts) (Listings and discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Marketplace experience"]
  node_app["Web application<br/>[App.tsx]"]
  node_auth_ui["Authentication state<br/>[AuthContext.tsx]"]
  node_auth_service["Auth API client<br/>[auth.services.ts]"]
  node_renter_pages["Rental discovery and account"]
  node_owner_pages["Owner workspace"]
  node_admin_pages["Admin workspace"]
  node_complaint_client["Complaint client"]
  node_review_ui["Review submission<br/>[ReviewModal.tsx]"]
end

subgraph group_operations["Rental operations"]
  node_user_controller["Accounts and profiles<br/>[user.controller.ts]"]
  node_items_controller["Listings and discovery"]
  node_recommendation["Recommendations<br/>[recommendation.ts]"]
  node_rental_controller["Rental bookings"]
  node_payment_controller["Payment processing"]
  node_kyc_controller["KYC verification"]
  node_kyc_validation["KYC validation<br/>[kycValidation.ts]"]
  node_complaint_controller["Rental complaints"]
  node_rating_controller["Ratings and reviews"]
  node_admin_controller["Platform administration"]
end

subgraph group_backend["Backend services"]
  node_backend_entry["HTTP server<br/>[index.ts]"]
  node_api_routes["API route modules"]
  node_auth_middleware["JWT authorization<br/>[auth.middleware.ts]"]
  node_db_config["Database connection<br/>[dbconnection.ts]"]
end

subgraph group_data["Domain data"]
  node_user_model[("User records<br/>[Users.model.ts]")]
  node_item_model[("Listing records<br/>[items.model.ts]")]
  node_rental_model[("Rental records<br/>[Rentals.model.ts]")]
  node_payment_model[("Payment records<br/>[Payments.model.ts]")]
  node_kyc_model[("KYC records")]
  node_complaint_model[("Complaint records")]
  node_rating_model[("Rating records")]
  node_category_model[("Categories<br/>[category.model.ts]")]
end

node_renter(("Renter"))
node_owner(("Owner"))
node_admin(("Administrator"))
node_mongo[("MongoDB")]

node_renter -.->|"uses"| node_app
node_owner -.->|"uses"| node_app
node_admin -.->|"uses"| node_app
node_app -->|"provides auth"| node_auth_ui
node_auth_ui -->|"calls"| node_auth_service
node_auth_service -->|"requests user API"| node_api_routes
node_backend_entry -->|"mounts"| node_api_routes
node_backend_entry -->|"connects through"| node_db_config
node_db_config -.->|"connects"| node_mongo
node_api_routes -->|"protects complaint routes"| node_auth_middleware
node_api_routes -->|"dispatches complaints"| node_complaint_controller
node_api_routes -->|"accepts evidence upload"| node_complaint_controller
node_items_controller -->|"requests recommendations"| node_recommendation
node_items_controller -->|"queries listings"| node_item_model
node_items_controller -.->|"queries categories"| node_category_model
node_items_controller -.->|"serves API requests"| node_backend_entry
node_user_controller -->|"reads and updates"| node_user_model
node_user_controller -->|"finds owner listings"| node_item_model
node_user_controller -->|"reads rentals"| node_rental_model
node_user_controller -.->|"serves user API"| node_backend_entry
node_kyc_controller -->|"manages verification"| node_kyc_model
node_kyc_controller -->|"reads user"| node_user_model
node_kyc_controller -->|"validates submission"| node_kyc_validation
node_payment_controller -->|"reads rental"| node_rental_model
node_payment_controller -->|"records payment"| node_payment_model
node_complaint_controller -.->|"stores complaints"| node_complaint_model
node_rating_controller -.->|"manages ratings"| node_rating_model
node_admin_controller -->|"summarizes users"| node_user_model
node_admin_controller -->|"summarizes listings"| node_item_model
node_admin_controller -->|"summarizes bookings"| node_rental_model
node_admin_controller -->|"summarizes payments"| node_payment_model
node_admin_controller -->|"reads categories"| node_category_model
node_renter_pages -.->|"uses marketplace APIs"| node_api_routes
node_owner_pages -.->|"manages rentals"| node_api_routes
node_admin_pages -.->|"manages platform"| node_api_routes
node_complaint_client -->|"sends complaints"| node_api_routes
node_review_ui -->|"submits rating"| node_api_routes

click node_app "https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/App.tsx"
click node_auth_ui "https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/contexts/AuthContext.tsx"
click node_auth_service "https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/services/auth.services.ts"
click node_renter_pages "https://github.com/sujalsubedixx/rentease/tree/main/frontend/src/pages/user"
click node_owner_pages "https://github.com/sujalsubedixx/rentease/tree/main/frontend/src/pages/owner"
click node_admin_pages "https://github.com/sujalsubedixx/rentease/tree/main/frontend/src/pages/admin"
click node_complaint_client "https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/services/complaint.service.ts"
click node_review_ui "https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/components/user/ReviewModal.tsx"
click node_backend_entry "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/index.ts"
click node_api_routes "https://github.com/sujalsubedixx/rentease/tree/main/backend/src/routes"
click node_auth_middleware "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/middleware/auth.middleware.ts"
click node_user_controller "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/user.controller.ts"
click node_items_controller "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/items.controller.ts"
click node_recommendation "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/utils/recommendation.ts"
click node_rental_controller "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/rental.controller.ts"
click node_payment_controller "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/payment.controller.ts"
click node_kyc_controller "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/kycverification.controller.ts"
click node_kyc_validation "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/utils/kycValidation.ts"
click node_complaint_controller "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/itemComplaint.controller.ts"
click node_rating_controller "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/rating.controller.ts"
click node_admin_controller "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/admin.controller.ts"
click node_db_config "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/config/dbconnection.ts"
click node_user_model "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/Users.model.ts"
click node_item_model "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/items.model.ts"
click node_rental_model "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/Rentals.model.ts"
click node_payment_model "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/Payments.model.ts"
click node_kyc_model "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/KycVerification.model.ts"
click node_complaint_model "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/itemComplaint.model.ts"
click node_rating_model "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/itemRating.model.ts"
click node_category_model "https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/category.model.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_auth_ui,node_auth_service,node_renter_pages,node_owner_pages,node_admin_pages,node_complaint_client,node_review_ui toneBlue
class node_user_controller,node_items_controller,node_recommendation,node_rental_controller,node_payment_controller,node_kyc_controller,node_kyc_validation,node_complaint_controller,node_rating_controller,node_admin_controller,node_mongo toneAmber
class node_backend_entry,node_api_routes,node_auth_middleware,node_db_config toneMint
class node_user_model,node_item_model,node_rental_model,node_payment_model,node_kyc_model,node_complaint_model,node_rating_model,node_category_model toneRose
class node_renter,node_owner,node_admin toneIndigo
```

## Components

### Marketplace experience

- [Web application](https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Authentication state](https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/contexts/AuthContext.tsx): `frontend/src/contexts/AuthContext.tsx`
- [Auth API client](https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/services/auth.services.ts): `frontend/src/services/auth.services.ts`
- [Rental discovery and account](https://github.com/sujalsubedixx/rentease/tree/main/frontend/src/pages/user): `frontend/src/pages/user`
- [Owner workspace](https://github.com/sujalsubedixx/rentease/tree/main/frontend/src/pages/owner): `frontend/src/pages/owner`
- [Admin workspace](https://github.com/sujalsubedixx/rentease/tree/main/frontend/src/pages/admin): `frontend/src/pages/admin`
- [Complaint client](https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/services/complaint.service.ts): `frontend/src/services/complaint.service.ts`
- [Review submission](https://github.com/sujalsubedixx/rentease/blob/main/frontend/src/components/user/ReviewModal.tsx): `frontend/src/components/user/ReviewModal.tsx`

### Rental operations

- [Accounts and profiles](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/user.controller.ts): `backend/src/controllers/user.controller.ts`
- [Listings and discovery](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/items.controller.ts): `backend/src/controllers/items.controller.ts`
- [Recommendations](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/utils/recommendation.ts): `backend/src/utils/recommendation.ts`
- [Rental bookings](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/rental.controller.ts): `backend/src/controllers/rental.controller.ts`
- [Payment processing](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/payment.controller.ts): `backend/src/controllers/payment.controller.ts`
- [KYC verification](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/kycverification.controller.ts): `backend/src/controllers/kycverification.controller.ts`
- [KYC validation](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/utils/kycValidation.ts): `backend/src/utils/kycValidation.ts`
- [Rental complaints](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/itemComplaint.controller.ts): `backend/src/controllers/itemComplaint.controller.ts`
- [Ratings and reviews](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/rating.controller.ts): `backend/src/controllers/rating.controller.ts`
- [Platform administration](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/controllers/admin.controller.ts): `backend/src/controllers/admin.controller.ts`

### Backend services

- [HTTP server](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/index.ts): `backend/src/index.ts`
- [API route modules](https://github.com/sujalsubedixx/rentease/tree/main/backend/src/routes): `backend/src/routes`
- [JWT authorization](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/middleware/auth.middleware.ts): `backend/src/middleware/auth.middleware.ts`
- [Database connection](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/config/dbconnection.ts): `backend/src/config/dbconnection.ts`

### Domain data

- [User records](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/Users.model.ts): `backend/src/models/Users.model.ts`
- [Listing records](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/items.model.ts): `backend/src/models/items.model.ts`
- [Rental records](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/Rentals.model.ts): `backend/src/models/Rentals.model.ts`
- [Payment records](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/Payments.model.ts): `backend/src/models/Payments.model.ts`
- [KYC records](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/KycVerification.model.ts): `backend/src/models/KycVerification.model.ts`
- [Complaint records](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/itemComplaint.model.ts): `backend/src/models/itemComplaint.model.ts`
- [Rating records](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/itemRating.model.ts): `backend/src/models/itemRating.model.ts`
- [Categories](https://github.com/sujalsubedixx/rentease/blob/main/backend/src/models/category.model.ts): `backend/src/models/category.model.ts`

### Other components

- **Renter**
- **Owner**
- **Administrator**
- **MongoDB**

## Connections

- Renter → Web application: uses (evidence: `README.md`)
- Owner → Web application: uses (evidence: `README.md`)
- Administrator → Web application: uses (evidence: `README.md`)
- Web application → Authentication state: provides auth (evidence: `frontend/src/App.tsx`)
- Authentication state → Auth API client: calls (evidence: `frontend/src/contexts/AuthContext.tsx`)
- Auth API client → API route modules: requests user API (evidence: `frontend/src/services/auth.services.ts`)
- HTTP server → API route modules: mounts (evidence: `backend/src/index.ts`)
- HTTP server → Database connection: connects through (evidence: `backend/src/index.ts`)
- Database connection → MongoDB: connects
- API route modules → JWT authorization: protects complaint routes (evidence: `backend/src/routes/itemComplaint.routes.ts`)
- API route modules → Rental complaints: dispatches complaints (evidence: `backend/src/routes/itemComplaint.routes.ts`)
- API route modules → Rental complaints: accepts evidence upload (evidence: `backend/src/routes/itemComplaint.routes.ts`)
- Listings and discovery → Recommendations: requests recommendations (evidence: `backend/src/controllers/items.controller.ts`)
- Listings and discovery → Listing records: queries listings (evidence: `backend/src/controllers/items.controller.ts`)
- Listings and discovery → Categories: queries categories
- Listings and discovery → HTTP server: serves API requests
- Accounts and profiles → User records: reads and updates (evidence: `backend/src/controllers/user.controller.ts`)
- Accounts and profiles → Listing records: finds owner listings (evidence: `backend/src/controllers/user.controller.ts`)
- Accounts and profiles → Rental records: reads rentals (evidence: `backend/src/controllers/user.controller.ts`)
- Accounts and profiles → HTTP server: serves user API
- KYC verification → KYC records: manages verification (evidence: `backend/src/controllers/kycverification.controller.ts`)
- KYC verification → User records: reads user (evidence: `backend/src/controllers/kycverification.controller.ts`)
- KYC verification → KYC validation: validates submission (evidence: `backend/src/controllers/kycverification.controller.ts`)
- Payment processing → Rental records: reads rental (evidence: `backend/src/controllers/payment.controller.ts`)
- Payment processing → Payment records: records payment (evidence: `backend/src/controllers/payment.controller.ts`)
- Rental complaints → Complaint records: stores complaints
- Ratings and reviews → Rating records: manages ratings
- Platform administration → User records: summarizes users (evidence: `backend/src/controllers/admin.controller.ts`)
- Platform administration → Listing records: summarizes listings (evidence: `backend/src/controllers/admin.controller.ts`)
- Platform administration → Rental records: summarizes bookings (evidence: `backend/src/controllers/admin.controller.ts`)
- Platform administration → Payment records: summarizes payments (evidence: `backend/src/controllers/admin.controller.ts`)
- Platform administration → Categories: reads categories (evidence: `backend/src/controllers/admin.controller.ts`)
- Rental discovery and account → API route modules: uses marketplace APIs (evidence: `README.md`)
- Owner workspace → API route modules: manages rentals (evidence: `README.md`)
- Admin workspace → API route modules: manages platform (evidence: `README.md`)
- Complaint client → API route modules: sends complaints (evidence: `frontend/src/services/complaint.service.ts`)
- Review submission → API route modules: submits rating (evidence: `frontend/src/components/user/ReviewModal.tsx`)
