# khilaraj123/rentapp architecture

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

- Interactive diagram: https://gitdiagram.com/khilaraj123/rentapp
- Repository: https://github.com/khilaraj123/rentapp

## Overview

RentApp is a peer-to-peer rental marketplace. Its principal domain journey is cataloging rentable items, checking availability and creating a booking, then progressing the booking through its rental lifecycle; identity supports users entering that marketplace. The sampled code supports the authentication and listing-service links, while booking stages and social capabilities are documented but their full application wiring is not shown. Financials are described in the README, but no payment source path appears in the supplied tree, so that capability is represented without inferred runtime connections.

Main entry points: [`RentApp.Infrastructure/User/AuthService.cs`](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Infrastructure/User/AuthService.cs) (Authentication service), [`RentApp.Application/Services/Listings/ListingService.cs`](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Application/Services/Listings/ListingService.cs) (Listing use cases), [`RentApp.Persistence/DbContext/UnitOfWork.cs`](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Persistence/DbContext/UnitOfWork.cs) (Unit of work), [`RentApp.Domain/DomainServices/Implementations/BookingDomainService.cs`](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Domain/DomainServices/Implementations/BookingDomainService.cs) (Booking rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Web entry"]
  node_web["MVC application<br/>[Program.cs]"]
  node_auth_controller["Authentication routes<br/>[AuthController.cs]"]
end

subgraph group_identity["Identity"]
  node_auth_service["Authentication service<br/>[AuthService.cs]"]
  node_identity_store[("ASP.NET Identity")]
  node_jwt_service["JWT service<br/>[JwtService.cs]"]
  node_refresh_service["Refresh-token service"]
end

subgraph group_marketplace["Rental marketplace"]
  node_listing_service["Listing use cases<br/>[ListingService.cs]"]
  node_booking_service["Booking rules"]
  node_financials["Payments and refunds"]
end

subgraph group_domain["Domain model"]
  node_user_entities["User and tokens<br/>[Users]"]
  node_catalog_model["Listings and categories<br/>[Listings]"]
  node_booking_model["Booking lifecycle<br/>[Bookings]"]
  node_social_model["Reviews and wishlists<br/>[Reviews]"]
end

subgraph group_persistence["Persistence"]
  node_listing_repo["Listing repository"]
  node_booking_repo["Booking repository"]
  node_app_context[("EF Core context")]
  node_unit_of_work["Unit of work<br/>[UnitOfWork.cs]"]
end

node_visitor(("Renter or owner"))

node_visitor -->|"uses"| node_web
node_web -->|"routes"| node_auth_controller
node_auth_controller -->|"calls"| node_auth_service
node_auth_service -->|"authenticates users"| node_identity_store
node_auth_service -->|"generates tokens"| node_jwt_service
node_auth_service -->|"manages sessions"| node_refresh_service
node_auth_service -->|"saves registration"| node_unit_of_work
node_auth_service -->|"raises registration event"| node_user_entities
node_listing_service -->|"queries and updates"| node_listing_repo
node_listing_service -->|"saves changes"| node_unit_of_work
node_listing_service -->|"updates listings"| node_catalog_model
node_booking_service -->|"checks bookings"| node_booking_repo
node_booking_service -->|"creates booking"| node_booking_model
node_unit_of_work -->|"commits"| node_app_context
node_listing_repo -->|"accesses data"| node_app_context

click node_web "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Presentation/Program.cs"
click node_auth_controller "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Presentation/Controllers/AuthController.cs"
click node_auth_service "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Infrastructure/User/AuthService.cs"
click node_jwt_service "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Infrastructure/User/JwtService.cs"
click node_refresh_service "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Infrastructure/User/RefreshTokenService.cs"
click node_user_entities "https://github.com/khilaraj123/rentapp/tree/master/RentApp.Domain/Entities/Users"
click node_listing_service "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Application/Services/Listings/ListingService.cs"
click node_listing_repo "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Persistence/Repositories/ListingRepository.cs"
click node_catalog_model "https://github.com/khilaraj123/rentapp/tree/master/RentApp.Domain/Entities/Listings"
click node_booking_service "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Domain/DomainServices/Implementations/BookingDomainService.cs"
click node_booking_repo "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Domain/Repositories/IBookingRepository.cs"
click node_booking_model "https://github.com/khilaraj123/rentapp/tree/master/RentApp.Domain/Entities/Bookings"
click node_social_model "https://github.com/khilaraj123/rentapp/tree/master/RentApp.Domain/Entities/Reviews"
click node_app_context "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Persistence/DbContext/ApplicationDbContext.cs"
click node_unit_of_work "https://github.com/khilaraj123/rentapp/blob/master/RentApp.Persistence/DbContext/UnitOfWork.cs"

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_web,node_auth_controller toneBlue
class node_auth_service,node_identity_store,node_jwt_service,node_refresh_service toneAmber
class node_listing_service,node_booking_service,node_financials toneMint
class node_user_entities,node_catalog_model,node_booking_model,node_social_model toneRose
class node_listing_repo,node_booking_repo,node_app_context,node_unit_of_work,node_visitor toneIndigo
```

## Components

### Web entry

- [MVC application](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Presentation/Program.cs): `RentApp.Presentation/Program.cs`
- [Authentication routes](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Presentation/Controllers/AuthController.cs): `RentApp.Presentation/Controllers/AuthController.cs`

### Identity

- [Authentication service](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Infrastructure/User/AuthService.cs): `RentApp.Infrastructure/User/AuthService.cs`
- **ASP.NET Identity**
- [JWT service](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Infrastructure/User/JwtService.cs): `RentApp.Infrastructure/User/JwtService.cs`
- [Refresh-token service](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Infrastructure/User/RefreshTokenService.cs): `RentApp.Infrastructure/User/RefreshTokenService.cs`

### Rental marketplace

- [Listing use cases](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Application/Services/Listings/ListingService.cs): `RentApp.Application/Services/Listings/ListingService.cs`
- [Booking rules](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Domain/DomainServices/Implementations/BookingDomainService.cs): `RentApp.Domain/DomainServices/Implementations/BookingDomainService.cs`
- **Payments and refunds**

### Domain model

- [User and tokens](https://github.com/khilaraj123/rentapp/tree/master/RentApp.Domain/Entities/Users): `RentApp.Domain/Entities/Users`
- [Listings and categories](https://github.com/khilaraj123/rentapp/tree/master/RentApp.Domain/Entities/Listings): `RentApp.Domain/Entities/Listings`
- [Booking lifecycle](https://github.com/khilaraj123/rentapp/tree/master/RentApp.Domain/Entities/Bookings): `RentApp.Domain/Entities/Bookings`
- [Reviews and wishlists](https://github.com/khilaraj123/rentapp/tree/master/RentApp.Domain/Entities/Reviews): `RentApp.Domain/Entities/Reviews`

### Persistence

- [Listing repository](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Persistence/Repositories/ListingRepository.cs): `RentApp.Persistence/Repositories/ListingRepository.cs`
- [Booking repository](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Domain/Repositories/IBookingRepository.cs): `RentApp.Domain/Repositories/IBookingRepository.cs`
- [EF Core context](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Persistence/DbContext/ApplicationDbContext.cs): `RentApp.Persistence/DbContext/ApplicationDbContext.cs`
- [Unit of work](https://github.com/khilaraj123/rentapp/blob/master/RentApp.Persistence/DbContext/UnitOfWork.cs): `RentApp.Persistence/DbContext/UnitOfWork.cs`

### Other components

- **Renter or owner**

## Connections

- Renter or owner → MVC application: uses
- MVC application → Authentication routes: routes
- Authentication routes → Authentication service: calls
- Authentication service → ASP.NET Identity: authenticates users
- Authentication service → JWT service: generates tokens
- Authentication service → Refresh-token service: manages sessions
- Authentication service → Unit of work: saves registration
- Authentication service → User and tokens: raises registration event
- Listing use cases → Listing repository: queries and updates
- Listing use cases → Unit of work: saves changes
- Listing use cases → Listings and categories: updates listings
- Booking rules → Booking repository: checks bookings
- Booking rules → Booking lifecycle: creates booking
- Unit of work → EF Core context: commits
- Listing repository → EF Core context: accesses data
