Welcome to the Kost Room Availability Booking Platform, a Laravel backend application designed to simplify the process of finding kost(boarding houses).
-
User Credits:
- Regular tenant: 20 credits on registration.
- Premium tenant: 40 initial credits.
- Owners: No initial credits.
-
Kost Management:
- Owners can list multiple kosts.
-
Advanced Search:
- Users can search kosts by name, location, and price
-
Credit Usage:
- Tenant lose 5 credits for room availability inquiries.
-
Authentication:
- APIs for owners and room availability are secured.
-
Credit Recharge:
- Monthly automated credit recharge.
-
Mail Verification:
- User registration requires email OTP verification.
- 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
-
User Registration:
- Sign up as a regular or premium tenant to get initial credits.
- Open the mailhog to get otp verification.
-
Kost Search:
- Explore kost listings by searching with criteria such as name, location, and price.
-
Room Availability Inquiry:
- Inquire about room availability to find suitable kost options, with a deduction of 5 credits.
-
Owner Operations:
- Owners can add and manage their kost list.
-
Scheduled Credit Recharge:
- User credits are automatically recharged at the beginning of each month.
- Clone this repository:
git clone https://github.com/destafajri/room-availability-backend-laravel
cd room-availability-backend-laravel
- Build and start the Docker containers:
docker compose up --build
- Install Laravel dependencies:
docker compose exec laravel composer install
- Run database migrations and seed:
docker compose exec laravel php artisan migrate --seed
- Run queue woker:
docker compose exec laravel php artisan queue:work &
- Run the scheduller task:
docker compose exec laravel php artisan schedule:run &
- 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/.
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 |