Skip to content

forch0/OK-Luxury

Repository files navigation

OK Luxury

A premium luxury rental booking platform built with Laravel, offering curated experiences for apartments, yachts, boats, and vehicles. Designed with an elegant black-and-gold aesthetic, the application delivers a seamless guest checkout experience backed by secure payment processing via SeerBit.

Table of Contents

Overview

OK Luxury is a full-stack web application that allows users to browse, book, and pay for luxury accommodations and experiences. The platform supports three primary bookable categories:

  • Apartments — Short-stay luxury apartments across premium locations.
  • Boats & Yachts — Day charters, sunset cruises, fishing trips, and corporate events.
  • Cars — Premium vehicle rentals for business and leisure.

The application is built around a guest-first philosophy: users can browse listings, add items to a cart, and complete checkout without mandatory account creation. Authenticated users gain access to booking history and profile management.

Features

Public Experience

  • Browse & Search — Filter listings by state (Lagos focus out of the box).
  • Detailed Views — Full property descriptions, amenities, gallery, and pricing.
  • Cart System — Add multiple items to cart before checkout.
  • Guest Checkout — Complete bookings without registration.
  • Secure Payments — Integrated with SeerBit for NGN transactions.
  • Responsive Design — Tailwind CSS with dark mode support.

Authentication

  • User registration & login (Laravel Breeze).
  • Profile management.
  • Password reset flow.

Admin Dashboard

  • Apartment Management — Create, edit, soft-delete, bulk-delete.
  • Boat Management — Same CRUD capabilities.
  • Car Management — Same CRUD capabilities.
  • Booking Management — View, update, and manage all bookings.
  • User Management — Admin-level user oversight.

Data Management

  • Soft Deletes — All product types support soft deletion for safety.
  • UUID Routing — Public-facing URLs use UUIDs instead of auto-increment IDs.
  • Blob Image Storage — Images can be stored as binary blobs for portability.
  • State-based Organization — Listings grouped by Nigerian states.

Technology Stack

Layer Technology
Framework Laravel 13.8
Language PHP 8.3+
Database SQLite (default), MySQL/PostgreSQL ready
Frontend Blade, Tailwind CSS 3.4, Alpine.js
Build Tool Vite 8
Auth Laravel Breeze
Payment SeerBit PHP SDK
Testing PHPUnit 12

Prerequisites

  • PHP 8.3 or higher
  • Composer
  • Node.js & npm
  • SQLite extension enabled (or a MySQL/PostgreSQL server)

Installation

  1. Clone the repository
git clone <repository-url>
cd "OK Luxury"
  1. Install PHP dependencies
composer install
  1. Install Node.js dependencies
npm install
  1. Environment setup
cp .env.example .env
php artisan key:generate
  1. Build frontend assets
npm run build

For active development, use npm run dev alongside php artisan serve.

  1. Run database migrations
php artisan migrate
  1. Seed demo data (optional but recommended)
php artisan db:seed --class=DatabaseSeeder

To populate Lagos-specific sample data:

php artisan db:seed --class=LagosStateSeeder
php artisan db:seed --class=LagosApartmentsSeeder
php artisan db:seed --class=LagosBoatsSeeder
php artisan db:seed --class=LagosCarsSeeder
  1. Start the development server
composer run dev

This command runs the Laravel server, log watcher, and Vite dev server concurrently.

Configuration

Application Settings

Edit .env to configure your environment:

APP_NAME="OK Luxury"
APP_URL=http://localhost:8000
DB_CONNECTION=sqlite
# Or switch to MySQL/PostgreSQL as needed

SeerBit Payment Credentials

Add your SeerBit keys to .env:

SEERBIT_PUBLIC_KEY=your_public_key_here
SEERBIT_SECRET_KEY=your_secret_key_here
SEERBIT_TOKEN=your_encrypted_token_here  # Optional; auto-generated if omitted

The SeerBitService class at app/Services/SeerBitService.php handles token encryption and payment initialization automatically.

Admin Email

ADMIN_EMAIL="admin@forchlight.com"

Database & Seeders

The application uses a modular migration structure with the following key tables:

Table Purpose
users Authenticated users with roles
states Nigerian states for geographic grouping
apartments OK Luxury apartment listings
boats Boat and yacht listings
cars Vehicle rental listings
bookings Polymorphic bookings (apartments, boats, cars)
galleries General gallery items

Key migrations include:

  • UUID columns for apartments, boats, cars, and bookings.
  • Soft delete support on product tables.
  • Guest checkout fields on bookings (first_name, last_name, email, phone).
  • Payment fields (payment_reference, payment_status).
  • Gallery and image blob support.

Project Structure

OK Luxury/
├── app/
│   ├── Http/Controllers/
│   │   ├── Admin/           # Admin dashboard controllers
│   │   ├── ApartmentController.php
│   │   ├── BoatController.php
│   │   ├── CarController.php
│   │   ├── BookingController.php
│   │   ├── CartController.php
│   │   ├── CheckoutController.php
│   │   ├── PaymentController.php
│   │   └── StateController.php
│   ├── Models/
│   │   ├── Apartment.php
│   │   ├── Boat.php
│   │   ├── Car.php
│   │   ├── Booking.php
│   │   ├── Gallery.php
│   │   ├── State.php
│   │   └── User.php
│   ├── Services/
│   │   └── SeerBitService.php
│   └── Providers/
│       └── AppServiceProvider.php
├── database/
│   ├── migrations/            # 20+ migration files
│   └── seeders/
│       ├── DatabaseSeeder.php
│       ├── LagosApartmentsSeeder.php
│       ├── LagosBoatsSeeder.php
│       ├── LagosCarsSeeder.php
│       └── LagosStateSeeder.php
├── resources/
│   ├── views/
│   │   ├── admin/            # Admin panel views
│   │   ├── apartments/       # Public apartment views
│   │   ├── boats/            # Public boat views
│   │   ├── cars/             # Public car views
│   │   ├── cart/             # Shopping cart
│   │   ├── checkout/         # Checkout flow
│   │   ├── gallery/          # Gallery pages
│   │   ├── layouts/          # App, guest, public, admin layouts
│   │   └── welcome.blade.php # Landing page
│   ├── css/app.css
│   └── js/app.js
├── routes/
│   └── web.php
├── tailwind.config.js
├── vite.config.js
└── composer.json

Architecture Overview

Polymorphic Bookings

The Booking model uses Laravel's polymorphic relations to associate a booking with either an Apartment, Boat, or Car:

$booking->bookable // Returns the related apartment, boat, or car
$apartment->bookings // Returns all bookings for this apartment

UUID Routing

All public-facing product routes use UUIDs instead of sequential IDs for security and obscurity:

public function getRouteKeyName()
{
    return 'uuid';
}

Image Handling

Models support both traditional file-path storage (image) and binary blob storage (image_blob) with automatic MIME type detection. A helper method generates base64 data URLs for inline rendering:

$apartment->getImageDataUrl();

Status & Availability Scopes

Each product model defines scopes for filtering:

  • active(), inactive(), maintenance(), archived() — Admin status filters.
  • available() — Combined availability + active status for public display.

Cart & Checkout Flow

  1. User adds items to cart (CartController uses session storage).
  2. User proceeds to checkout (CheckoutController).
  3. Booking records are created with pending status.
  4. PaymentController initializes SeerBit payment.
  5. Upon callback, payment is verified and booking status updated.

Usage

As a Guest

  1. Visit the homepage to browse featured listings.
  2. Navigate to Apartments, Boats, or Cars to explore.
  3. Click any listing to view details.
  4. Click Book Now or Add to Cart.
  5. Review your cart, then proceed to checkout.
  6. Fill in your contact details and complete payment via SeerBit.

As an Authenticated User

  • Access your Profile to update details.
  • View your Booking History under authenticated routes.

As an Admin

  • Log in and visit /admin.
  • Manage listings, bookings, and users from the dashboard.
  • Use bulk delete actions for efficient data management.

Payment Integration

OK Luxury integrates with SeerBit, a Nigerian payment gateway. The flow is:

  1. InitializePOST /payment/initialize creates a transaction and returns a redirect link.
  2. Redirect — User completes payment on SeerBit's hosted checkout.
  3. Callback — SeerBit redirects back to /payment/callback.
  4. VerifyPOST /payment/verify confirms the transaction status server-side.

All payment logic is encapsulated in app/Services/SeerBitService.php.

Admin Dashboard

The admin panel is accessible at /admin after authentication. It provides full CRUD for:

  • Apartments
  • Boats
  • Cars
  • Bookings
  • Users

Role-based access is supported via the role column on the users table (admin vs user).

License

This project is open-sourced software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages