Skip to content

destafajri/room-availability-backend-laravel

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License

Kost Room Availability Apps

Welcome to the Kost Room Availability Booking Platform, a Laravel backend application designed to simplify the process of finding kost(boarding houses).

Table of Contents

Key Features

  1. User Credits:

    • Regular tenant: 20 credits on registration.
    • Premium tenant: 40 initial credits.
    • Owners: No initial credits.
  2. Kost Management:

    • Owners can list multiple kosts.
  3. Advanced Search:

    • Users can search kosts by name, location, and price
  4. Credit Usage:

    • Tenant lose 5 credits for room availability inquiries.

Additional Features

  • Authentication:

    • APIs for owners and room availability are secured.
  • Credit Recharge:

    • Monthly automated credit recharge.
  • Mail Verification:

    • User registration requires email OTP verification.

Technologies Used

  • Laravel: Backend framework for robust and scalable web application development.
  • MySQL: Database management for storing user data, kost information, and credit transactions.
  • API Authentication: Securing Owner API & Room Availability API using laravel-sanctum.
  • Scheduled Commands: Utilizing Laravel's task scheduler for automated monthly credit recharge.
  • Queue: Utilizing Laravel's queue using redis to send otp into mail

Usage Instructions

  1. User Registration:

    • Sign up as a regular or premium tenant to get initial credits.
    • Open the mailhog to get otp verification.
  2. Kost Search:

    • Explore kost listings by searching with criteria such as name, location, and price.
  3. Room Availability Inquiry:

    • Inquire about room availability to find suitable kost options, with a deduction of 5 credits.
  4. Owner Operations:

    • Owners can add and manage their kost list.
  5. Scheduled Credit Recharge:

    • User credits are automatically recharged at the beginning of each month.

Prerequisites

Getting Started

  1. Clone this repository:
git clone https://github.com/destafajri/room-availability-backend-laravel
cd room-availability-backend-laravel
  1. Build and start the Docker containers:
docker compose up --build
  1. Install Laravel dependencies:
docker compose exec laravel composer install
  1. Run database migrations and seed:
docker compose exec laravel php artisan migrate --seed
  1. Run queue woker:
docker compose exec laravel php artisan queue:work &
  1. Run the scheduller task:
docker compose exec laravel php artisan schedule:run &
  1. To Access this project you can use this https://localhost:8000/ and for mailhog to receive the otp, you can visit this https://localhost:8025/.

APIs List

Name Method URL Token Required
Register Owner POST {{base_url}}/api/register/owner No
Register Tenant Prime POST {{base_url}}/api/register/tenant/prime No
Register Tenant Regular POST {{base_url}}/api/register/tenant/regular No
Verify otp POST {{base_url}}/api/otp/verify No
Login POST {{base_url}}/api/login No
Logout POST {{base_url}}/api/logout Yes
Create Kost By Owner POST {{base_url}}/api/owner/kost Yes
Update Kost By Owner PUT {{base_url}}/api/owner/kost/:id Yes
Delete Kost By Owner DELETE {{base_url}}/api/owner/kost/:id Yes
List Kost By Owner GET {{base_url}}/api/owner/kost?per_page=1 Yes
List Kost GET {{base_url}}/api/kost?per_page=10 No
Detail Kost GET {{base_url}}/api/kost/:id No
Ask Room POST {{base_url}}/api/kost/:id/ask-room Yes

Postman Collection

Run In Postman

Database Schema

Database

Contributors

GitHub contributors

About

Develop Backend Service using Laravel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages