Overview

RoomRent is a RESTful web service built with Laravel and PHP, designed as the backend for a cross-platform mobile application on Android and iOS. The API follows the Repository Design Pattern, decoupling the business logic from data access layers for clean, maintainable, and testable code. It enables users to list available rooms for rent and submit rental requests, connecting landlords and tenants through a scalable backend architecture.


Architecture

The project follows the Repository Design Pattern:

  • Controller โ€” handles HTTP requests and responses
  • Repository Interface โ€” defines the contract for data operations
  • Repository Implementation โ€” handles all database queries via Eloquent ORM
  • Service Layer โ€” contains business logic, sits between controller and repository

This separation of concerns makes the codebase easy to test, extend, and maintain.


Features
  • ๐Ÿ  List and browse available rooms for rent
  • ๐Ÿ“ฑ RESTful API endpoints for Android and iOS clients
  • ๐Ÿ” User authentication and authorization
  • ๐Ÿ“‹ Room request and booking management
  • ๐Ÿ” Search and filter rooms by location and price
  • ๐Ÿ‘ค Separate roles for landlords and tenants
  • ๐Ÿ—๏ธ Repository design pattern for clean architecture

Tech Stack
  • Language: PHP
  • Framework: Laravel
  • Database: MySQL
  • API: RESTful JSON API
  • Architecture: Repository Design Pattern
  • Auth: Laravel Sanctum / Passport

Usage
git clone https://github.com/manitapote/RoomRent-webservice
cd RoomRent-webservice
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
php artisan serve

Code