Installation Guide

1. Download and Extract

  1. Download the Zelp resource from your purchase

  2. Extract the files to your server's resources folder

  3. Rename the folder to lb-zelp

  4. Create Database Tables

    CREATE TABLE IF NOT EXISTS `zelp_accounts` (
        `id` INT AUTO_INCREMENT PRIMARY KEY,
        `identifier` VARCHAR(255) UNIQUE NOT NULL,
        `username` VARCHAR(50) UNIQUE NOT NULL,
        `password_hash` VARCHAR(255) NOT NULL,
        `display_name` VARCHAR(50),
        `avatar_url` VARCHAR(255),
        `bio` TEXT,
        `is_business_account` BOOLEAN DEFAULT FALSE,
        `location` VARCHAR(100) NULL,
        `is_logged_in` TINYINT(1) DEFAULT 1,
        `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        
        -- Indexes for performance
        INDEX `idx_identifier` (`identifier`),
        INDEX `idx_username` (`username`),
        INDEX `idx_business_account` (`is_business_account`)
    );
    
    CREATE TABLE IF NOT EXISTS `zelp_reviews` (
        `id` INT AUTO_INCREMENT PRIMARY KEY,
        `user_id` INT NOT NULL,
        `business_name` VARCHAR(100) NOT NULL,
        `rating` DECIMAL(2,1) NOT NULL CHECK (`rating` >= 0 AND `rating` <= 5),
        `review_text` TEXT NOT NULL,
        `images` JSON,
        `reactions` JSON DEFAULT '{}',
        `user_reactions` JSON DEFAULT '{}',
        `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
        
        -- Foreign key constraint
        FOREIGN KEY (`user_id`) REFERENCES `zelp_accounts`(`id`) ON DELETE CASCADE,
        
        -- Indexes for performance
        INDEX `idx_user_id` (`user_id`),
        INDEX `idx_business_name` (`business_name`),
        INDEX `idx_created_at` (`created_at`),
        INDEX `idx_rating` (`rating`)
    );

3. Configuration Setup

  1. Edit config.lua

    Config = {
        Debug = false,                    -- Set to true for debugging
        AppName = "Zelp",                 -- App name in phone
        AppDescription = "Review and rate local businesses",
        DefaultApp = false,               -- Install by default
        AppSize = 59812,                  -- App size in KB
        AppPrice = 0                      -- App price (0 = free)
    }
  2. Configure Discord Webhooks

    -- Edit server/webhook.lua
    local webhookUrl = "YOUR_DISCORD_WEBHOOK_URL"
  3. Set Up Localization

    -- Edit locales/en.lua for English translations
    -- Add additional language files as needed

4. Server Configuration

  1. Add to server.cfg

    # Ensure dependencies start first
    ensure oxmysql
    ensure lb-phone
    
    # Start Zelp
    ensure lb-zelp
  2. Resource Order

    • oxmysql must start first

    • lb-phone must start before lb-zelp

    • lb-zelp should start last

Last updated