KekaiHost Docs

Introduction

KekaiHost is a complete web hosting panel with subdomain hosting, wallet system, affiliate program, and mPanel file manager. Perfect for starting your own web hosting business.

Key Features:

  • User Auth + Google OAuth
  • Subdomain Hosting
  • File Manager (mPanel)
  • Wallet + Razorpay + PayPal
  • Affiliate Program
  • Admin Dashboard
  • Password Reset via Email
  • Chunked File Upload

Requirements

Server Requirements

  • PHP 8.0 or higher
  • MySQL 5.7+ / MariaDB 10.3+
  • Apache with mod_rewrite
  • PDO MySQL Extension
  • OpenSSL Extension
  • Mbstring Extension
  • JSON Extension
  • cURL Extension (recommended)
  • FileInfo Extension (recommended)

For Development

  • Node.js 16+ (for Tailwind CSS)
  • NPM or Yarn

Recommended

  • HTTPS/SSL Certificate
  • Wildcard DNS for subdomains
  • SMTP server for emails

Installation Guide

1Upload Files to Server

Upload all files to your web server's public directory (htdocs, www, public_html)

# Using Git
cd /var/www/html/
git clone https://github.com/your-repo/kekaihost.git

# Or upload via FTP/SFTP
Upload all files to your hosting root folder

2Set Directory Permissions

Make storage directory writable for file uploads and sessions

chmod -R 755 storage/
chmod -R 755 public/assets/uploads/

3Run the Installation Wizard

Open the installer in your browser

https://yourdomain.com/install/

The wizard will check requirements, set up database, and create admin account.

4Installation Wizard Steps

Step 1: Requirements Check

Verifies PHP version, extensions, and folder permissions

Step 2: Database Setup

Enter MySQL host, database name, username, and password. Database is auto-created if it doesn't exist.

Step 3: Admin Account

Create your administrator username, email, and password (min 8 characters)

Step 4: Site Configuration

Set site name, main domain (for subdomains), and support email

Step 5: Integrations (Optional)

Configure Google OAuth, Razorpay, PayPal, SMTP email, and cPanel API

5Delete Install Folder

⚠️ IMPORTANT: Delete the install folder after installation for security!

rm -rf install/

6Setup Wildcard DNS (For Subdomains)

Point *.yourdomain.com to your server IP for subdomain hosting

# DNS A Record
*.yourdomain.com → YOUR_SERVER_IP

# Example
*.kekaihost.com → 123.45.67.89

7Build CSS (Optional - Development)

If you want to customize styles, build Tailwind CSS

npm install
npm run build # Production build
npm run dev # Watch mode for development

ZIP Package — What's Inside

When you download KekaiHost from Codester you will receive one main ZIP that contains 2 ZIP files + a documentations/ folder:

documentations/

This documentation you are reading right now. No need to upload it to your server.

kekaihost-v2.0.0.zip
New Buyers

Full fresh installation package. Contains all files, installer wizard, database schema, and assets.

kekaihost-update-v2.0.0.zip
Existing Buyers — Update Only

Contains only changed/new files since the last version. Does NOT include the installer or database schema.

Important — How to Extract

Extract directly to your root folder

Both ZIPs are structured so that all files and folders sit at the root level of the archive. Extract them directly into your server root (e.g. public_html/ or htdocs/) — do not create a subfolder first.

Wrong — extracts into a nested folder

public_html/
└── kekaihost-v2.0.0/ # ❌ extra folder
├── index.php
├── .htaccess
└── ...

Correct — all files at root

public_html/
├── index.php # ✅ correct
├── .htaccess
├── src/
├── storage/
└── ...

New Buyers Fresh Installation — kekaihost-v2.0.0.zip

  1. Extract kekaihost-v2.0.0.zip directly into your server's public_html/ root
  2. All files (index.php, .htaccess, src/, storage/, etc.) should be at the root — not inside a subfolder
  3. Open https://yourdomain.com/install/ in your browser
  4. Follow the 5-step installation wizard
  5. Delete the install/ folder after installation

Existing Buyers Updating from a Previous Version — kekaihost-update-v2.0.0.zip

Back up your server files and database before updating.

  1. Take a full backup of your existing public_html/ and database
  2. Extract kekaihost-update-v2.0.0.zip into your server root — overwrite existing files when prompted
  3. Your .env file is not included in the update ZIP — your existing config is safe
  4. Your storage/ folder (user files) is not overwritten
  5. Check CHANGELOG.md for any manual DB migration steps required
  6. Clear browser cache after updating

Safe files — never overwritten by update ZIP: .env, storage/users/, assets/uploads/

Configuration

.env File (Auto-generated by Installer)

# Application
APP_NAME="KekaiHost"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com/

# Database
DB_HOST=localhost
DB_NAME=kekaihost
DB_USER=root
DB_PASS=your_password

# Domain
SITE_DOMAIN=yourdomain.com
BASE_URL=https://yourdomain.com/

# Google OAuth (Optional)
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=https://yourdomain.com/auth/google/callback

# Razorpay (Optional)
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=

# PayPal (Optional)
PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=
PAYPAL_MODE=sandbox # sandbox or live

# SMTP Email (Optional)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your@gmail.com
SMTP_PASS=app_password
SMTP_FROM=noreply@yourdomain.com
SMTP_FROM_NAME=KekaiHost

The installer automatically creates this file. You can edit it manually later if needed.

Folder Structure

kekaihost/
├── .env # Configuration (auto-generated)
├── .htaccess # URL rewriting & security
├── .installed # Install lock file
├── public/ # Web accessible root
│ ├── index.php # Main router
│ └── assets/ # CSS, JS, images
│ ├── css/
│ ├── js/
│ └── uploads/
├── src/ # Application code
│ ├── bootstrap.php # Core initialization
│ ├── controllers/ # API handlers
│ │ ├── api.php
│ │ ├── api_cpanel.php
│ │ ├── api_paypal.php
│ │ └── auth.php
│ ├── models/ # Database models
│ │ ├── User.php
│ │ ├── Plan.php
│ │ └── Wallet.php
│ ├── views/ # Page templates
│ │ ├── admin/ # Admin pages
│ │ ├── cpanel/ # mPanel pages
│ │ └── *.php # User pages
│ ├── utils/ # Helper functions
│ └── cron/ # Scheduled tasks
├── storage/ # User data (writable)
│ ├── users/ # User hosting files
│ ├── sessions/ # PHP sessions
│ ├── logs/ # Error logs
│ ├── cache/ # Cached data
│ ├── backups/ # Site backups
│ └── emails/ # Email backups (dev)
├── install/ # Installer (DELETE after install!)
│ ├── index.php
│ └── assets/sql/schema.sql
└── documentations/ # This documentation

Database Schema

All tables are auto-created during installation from install/assets/sql/schema.sql

TableDescription
usersUser accounts with profile, plan, storage info
plansHosting plans (storage limits, pricing)
hosting_plansAdditional hosting packages
user_hostingsUser subdomain hosting accounts
filesUploaded files tracking
domainsUser registered domains
main_domainsAdmin-managed main domains for subdomains
tldsAvailable TLD extensions
walletsUser wallet balances
wallet_transactionsWallet credit/debit history
affiliatesAffiliate program data
referralsReferral signups tracking
razorpay_ordersRazorpay payment orders
paypal_ordersPayPal payment orders
transactionsPlan purchase transactions
site_settingsDynamic site configuration
password_resetsPassword reset tokens
support_ticketsCustomer support tickets
activity_logsUser activity logging

Features

User System

Registration, Google OAuth, Profile, Avatar, Password Reset

Domain System

Subdomain hosting, Custom domains, TLDs, DNS management

Wallet System

Add funds via Razorpay/PayPal, Transaction history, Balance tracking

Affiliate Program

Referral links, Commission tiers (Bronze/Silver/Gold), Payouts

Robust Upload

Chunked uploads, Retry on failure, Resume capability, Progress tracking

Email System

SMTP support, Password reset emails, Notification emails

Admin Panel

Access: yoursite.com/admin

  • User Management
  • Plans Management
  • Domain/TLD Management
  • Razorpay Settings
  • Site Settings
  • Statistics

mPanel (File Manager)

Built-in file manager similar to cPanel. Users can manage their hosting files through a modern web interface.

File Manager Features:

Upload Files (Chunked)
Create Folders
Create Files
Edit Files Online
Delete Files/Folders
Extract ZIP Files
Download Files
Copy/Move Files
Change Permissions

Supported File Types

  • HTML, CSS, JavaScript
  • PHP files
  • Images (PNG, JPG, GIF, SVG)
  • JSON, XML, TXT
  • ZIP archives

Storage Management

  • Real-time disk usage display
  • Plan storage limits enforced
  • File count limits per plan
  • Progress bar for uploads
  • Retry failed uploads automatically

API Reference

EndpointMethodDescription
/api/registerPOSTUser registration
/api/loginPOSTUser login
/api/forgot-passwordPOSTPassword reset email
/api/reset-passwordPOSTReset password with token
/api/uploadPOSTUpload file (chunked support)
/api/deletePOSTDelete file/folder
/api/plansGETGet all plans
/api/plans/buyPOSTBuy plan with wallet
/api/razorpay/createPOSTCreate Razorpay order
/api/razorpay/verifyPOSTVerify Razorpay payment
/api/paypal/createPOSTCreate PayPal order
/api/paypal/capturePOSTCapture PayPal payment
/api/google/authGETGoogle OAuth redirect
/api/google/callbackGETGoogle OAuth callback
/api/cpanel/*POSTFile manager operations

cPanel API Integration

Overview

KekaiHost integrates with cPanel UAPI to manage subdomains, files, MySQL databases, and email accounts. This is optional - the system works with wildcard DNS as an alternative.

Note: cPanel integration requires a valid cPanel account with API Token access. Set CPANEL_ENABLED=true in .env to enable.

Configuration (.env)

# cPanel API Settings
CPANEL_ENABLED=true
CPANEL_HOST=yourdomain.com
CPANEL_USER=cpanel_username
CPANEL_TOKEN=your_api_token

# MySQL via cPanel (optional)
CPANEL_MYSQL_HOST=localhost
CPANEL_MYSQL_USER=cpanel_user
CPANEL_MYSQL_PASS=mysql_password

Generate API Token: cPanel → Security → Manage API Tokens → Create

Available Functions (src/utils/cpanel.php)

FunctioncPanel ModuleDescription
cpanel_api_request()CoreMake raw API request to cPanel UAPI
is_cpanel_enabled()CoreCheck if cPanel integration is enabled
get_cpanel_config()CoreGet cPanel configuration from .env

Subdomain Management

FunctioncPanel APIDescription
cpanel_create_subdomain($subdomain, $docRoot)SubDomain::addsubdomainCreate new subdomain
cpanel_delete_subdomain($subdomain)SubDomain::delsubdomainDelete subdomain
cpanel_list_subdomains()SubDomain::listsubdomainsList all subdomains
cpanel_create_subdomain_with_folder($name, $domain)SubDomain::addsubdomainCreate subdomain with home folder
sync_user_subdomain($subdomain)SubDomain::addsubdomainSync user subdomain on registration
remove_user_subdomain($subdomain)SubDomain::delsubdomainRemove subdomain on user delete
// Example: Create subdomain
$result = cpanel_create_subdomain('mysite', 'public_html/sites/mysite');
// Returns: ['success' => true, 'subdomain' => 'mysite.domain.com']

File Manager

FunctioncPanel APIDescription
cpanel_create_folder_in_home($name)Fileman::mkdirCreate folder in home directory
cpanel_write_file($path, $content)Fileman::save_file_contentWrite/create file with content
cpanel_read_file_content($dir, $file)Fileman::get_file_contentRead file content
cpanel_fetch_raw_file($path, $maxBytes)Fileman::get_file_contentFetch raw file (handles Maildir)

MySQL Database Management

FunctioncPanel APIDescription
cpanel_create_database($name)Mysql::create_databaseCreate MySQL database
cpanel_delete_database($name)Mysql::delete_databaseDelete MySQL database
cpanel_list_databases()Mysql::list_databasesList all databases
cpanel_create_database_user($user, $pass)Mysql::create_userCreate database user
cpanel_delete_database_user($user)Mysql::delete_userDelete database user
cpanel_list_database_users()Mysql::list_usersList all database users
cpanel_set_privileges($user, $db, $privs)Mysql::set_privileges_on_databaseGrant privileges to user
cpanel_get_mysql_server()Mysql::get_server_informationGet MySQL server info
// Example: Create database with user
$db = cpanel_create_database('myapp_db');
$user = cpanel_create_database_user('myapp_user', 'SecurePass123!');
cpanel_set_privileges('myapp_user', 'myapp_db', 'ALL PRIVILEGES');

Other Functions

FunctioncPanel APIDescription
cpanel_get_disk_usage()Quota::get_quota_infoGet disk usage stats
cpanel_create_addon_domain($domain, $sub, $doc)AddonDomain::addaddondomainCreate addon domain
cpanel_log($type, $message)-Log cPanel operations to file

Raw API Request Format

All cPanel UAPI calls use this format:

// URL Format
https://{host}:2083/execute/{Module}/{function}?param1=value1¶m2=value2

// Authorization Header
Authorization: cpanel {username}:{api_token}

// Example: Create subdomain
$result = cpanel_api_request('SubDomain', 'addsubdomain', [
'domain' => 'mysite',
'rootdomain' => 'example.com',
'dir' => 'public_html/mysite'
]);

API Response Format

// Success Response
{
"status": 1,
"data": { ... },
"messages": null,
"errors": null
}

// Error Response
{
"status": 0,
"data": null,
"errors": ["Error message here"]
}

Full cPanel UAPI docs: api.docs.cpanel.net

Payment Integration

Razorpay Setup (India)

  1. Create account at razorpay.com
  2. Go to Settings → API Keys
  3. Generate Key ID & Key Secret
  4. Add to .env or Admin → Razorpay Settings
  5. Enable Razorpay from Admin Panel
RAZORPAY_KEY_ID=rzp_live_xxx
RAZORPAY_KEY_SECRET=xxx

PayPal Setup (International)

  1. Create app at developer.paypal.com
  2. Go to My Apps & Credentials
  3. Create new REST API app
  4. Copy Client ID & Secret
  5. Set mode: sandbox (test) or live
PAYPAL_CLIENT_ID=Axx...
PAYPAL_CLIENT_SECRET=xxx
PAYPAL_MODE=live

Customization

Tailwind CSS

Modify styles in src/assets/tailwind_input.css

npm install
npm run dev # Watch mode
npm run build # Production

Admin Customization

From Admin Panel you can customize:

  • Site name, logo, favicon
  • Home page content
  • Terms, Privacy, DMCA pages
  • Currency and exchange rates
  • Payment gateway settings

Troubleshooting

404 Not Found Error

mod_rewrite not enabled or .htaccess not working.

sudo a2enmod rewrite
sudo systemctl restart apache2

Also check AllowOverride All is set in Apache config.

Database Connection Failed

Check your .env file credentials are correct.

DB_HOST=localhost
DB_NAME=kekaihost
DB_USER=root
DB_PASS=your_password

File Upload Failed

Storage folder not writable or PHP upload limits too low.

chmod -R 755 storage/
chown -R www-data:www-data storage/

Also check php.ini: upload_max_filesize, post_max_size, max_execution_time

Emails Not Sending

SMTP credentials incorrect or port blocked by server.

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your@gmail.com
SMTP_PASS=app_password # Use App Password, not regular password

Session Issues / Keeps Logging Out

Session folder not writable or PHP session issues.

chmod 755 storage/sessions/
chown www-data:www-data storage/sessions/

Payment Gateway Errors

Check API keys are correct and mode matches (sandbox/live).

  • • Razorpay: Test keys start with rzp_test_
  • • PayPal: Set PAYPAL_MODE=sandbox for testing
  • • Make sure webhook URLs are accessible

Subdomain Not Working

Wildcard DNS and SSL not configured.

  • • Add wildcard DNS: *.yourdomain.com → Server IP
  • • Install wildcard SSL certificate
  • • Check Apache/Nginx vhost configuration

Blank Page / 500 Error

Check PHP error logs for details.

tail -f /var/log/apache2/error.log
# Or check storage/logs/

License & Support

Regular License

  • Use on only 1 domain
  • Use for personal or client project
  • End product cannot be sold
  • Lifetime updates included
  • 6 months support

Perfect for personal websites, portfolios, or single client projects.

Extended License

  • Use on unlimited domains
  • Use for personal or client project
  • End product CAN be sold
  • Lifetime updates included
  • 12 months priority support
  • SaaS / Subscription usage allowed

Ideal for commercial products, SaaS, or reselling to clients.

What's Included in Support?

Bug Fixes

Report any bugs and we'll fix them in the next update.

Email Support

Get help via email within 24-48 business hours.

Free Updates

Get all future updates and new features for free.

Stripe Payment Gateway

Overview

Stripe uses Checkout Sessions (hosted payment page). No Stripe SDK needed — direct cURL calls. Supports cards, Apple Pay, Google Pay, SEPA, and more.

Cards

Visa, Mastercard, Amex

Apple / Google Pay

One-tap checkout

50+ Currencies

Global payments

Admin Setup — /admin-stripe

SettingDescriptionExample
Publishable KeyFrontend key (starts pk_)pk_test_51...
Secret KeyBackend key (starts sk_)sk_test_51...
Webhook SecretWebhook signing secretwhsec_...
CurrencyCheckout currency codeusd, inr, eur
Min/Max DepositWallet deposit limits1 – 10000

Payment Flow

  1. User clicks Pay with Stripe on wallet/plans/hosting page
  2. Frontend POSTs to POST /api/stripe/create-session
  3. Server creates a Stripe Checkout Session via cURL
  4. User is redirected to Stripe-hosted payment page
  5. After payment, Stripe redirects to GET /api/stripe/success?session_id=...
  6. Server verifies the session, activates plan/hosting or credits wallet
  7. User is redirected to /wallet?stripe=success

Webhook fallback: POST /api/stripe/webhook handles checkout.session.completed event.

API Endpoints

MethodEndpointDescription
POST/api/stripe/create-sessionCreate Stripe Checkout Session
GET/api/stripe/successSuccess redirect handler
POST/api/stripe/webhookStripe webhook receiver

Webhook Setup

Add this URL in Stripe Dashboard → Webhooks:

https://yourdomain.com/api/stripe/webhook

Required event: checkout.session.completed

Test card: 4242 4242 4242 4242 · Any future date · Any CVV

DB Table — stripe_orders

ColumnTypeDescription
idINTAuto increment PK
user_idINTUser who paid
session_idVARCHARStripe Checkout Session ID
payment_intent_idVARCHARStripe PaymentIntent ID
amountDECIMALAmount in currency
currencyVARCHARe.g. usd, inr
typeVARCHARwallet / plan / hosting / domain
item_idINTPlan ID (if applicable)
statusENUMpending / completed / failed

Table is auto-created on first Stripe API call.

Offline Payment System

Overview

Users can pay via Bank Transfer, UPI, Cash, or Crypto and submit the transaction reference. Admin reviews and approves manually — plan/hosting activates only after admin approval.

User Flow

  1. Select Offline Payment at checkout
  2. View bank / UPI / payment details shown in modal
  3. Transfer amount manually
  4. Submit form: payment method + transaction/reference number + optional notes
  5. Request saved as pending
  6. Admin approves → plan/hosting instantly activated + email notification

Admin Management — /admin-offline-payments

  • Filter by Pending / Approved / Rejected / All
  • Pending count badge shown in sidebar
  • Approve — activates plan/hosting/wallet immediately
  • Reject — enter rejection reason, user notified by email

Admin Settings — /admin-settings

SettingDescription
Enable Offline PaymentToggle on/off for all pages
Payment InstructionsText shown to user above the form
Bank / Payment DetailsMulti-line bank account / UPI / crypto details shown to user

API Endpoints

MethodEndpointAuthDescription
POST/api/offline-payment/submitUserSubmit payment request
GET/api/offline-payment/listAdminList all requests
POST/api/offline-payment/approveAdminApprove & activate
POST/api/offline-payment/rejectAdminReject with reason

DB Table — offline_payments

ColumnTypeDescription
idINTAuto increment PK
user_idINTRequesting user
typeENUMplan / hosting / wallet
item_idINTPlan ID (if applicable)
amountDECIMALAmount in USD
payment_methodVARCHARbank_transfer / upi / cash / crypto
ref_numberVARCHARUTR / TXN / reference number
notesTEXTOptional user notes
statusENUMpending / approved / rejected
rejection_reasonTEXTReason if rejected
reviewed_byINTAdmin user ID
reviewed_atTIMESTAMPWhen reviewed

Table is auto-created when the page loads.

Multi-Currency System

How It Works

  • DB stores prices in USD — all plan prices are in USD
  • Users select display currency — via header dropdown (48 currencies)
  • Live exchange rates — fetched from exchangerate-api.com, cached 1 hour
  • Client-side conversion — prices update instantly without page reload
  • Admin always sees USD — cookie/session override ignored for admins

User Currency Selection

  • Desktop: Currency dropdown in header (coins icon)
  • Mobile: Currency panel inside sidebar menu
  • Selection saved in user_currency cookie (1 year)
  • Searchable dropdown — type currency name or code

PHP Helper Functions

FunctionReturnsDescription
get_currency_code()stringUser's selected currency code (e.g. INR)
get_currency_symbol()stringCurrency symbol (e.g. ₹)
convert_currency($usd)floatConvert USD amount to user's currency
get_exchange_rate($code)floatExchange rate from USD to given code
format_converted_price($usd)stringFormatted string with symbol + converted amount
get_all_currencies()arrayAll 48 supported currencies with symbol + name

Client-Side Conversion

Add data-usd-price attribute to any price element to enable auto-conversion:

<!-- Amount auto-converts when currency changes -->
<span data-usd-price="19.00">$19.00</span>

<!-- Symbol auto-updates -->
<span data-currency-symbol>$</span>

JS fetches rates from /api/currency and updates all matching elements on currency select.

Exchange Rate API

MethodEndpointDescription
GET/api/currencyReturns USD-based live exchange rates (cached 1 hour)
// Response
{ "success": true, "base": "USD", "rates": { "INR": 83.5, "EUR": 0.92, ... } }

Language & Translation

Overview

Uses Google Translate widget (free) to translate all page content. Supports 100+ languages. No API key required.

UI Placement

DeviceLocationFeatures
Desktop (≥640px)Header — language icon buttonSearchable inline dropdown, 100+ languages
Mobile (<640px)Profile sidebar (logged-in) or hamburger sidebar (guest)Collapsible accordion with search, no popup

How It Works

  1. User selects language from custom HTML dropdown (not native select)
  2. Selection saved to kekaihost_translate_lang in localStorage
  3. googtrans cookie set with value /en/[lang]
  4. Google Translate widget reads cookie and translates page
  5. Selection persists across pages via cookie + localStorage

Exclude Elements from Translation

<!-- Add class="notranslate" and translate="no" -->
<span class="notranslate" translate="no">KekaiHost</span>

Live Chat System

Overview

Built-in live chat — no third-party service needed. Polling-based (every 3 seconds). Supports both online (live) and offline (leave a message) modes.

User Widget

  • Floating button bottom-right — violet gradient, pulsing green dot when online
  • Logged-in users: chat starts automatically
  • Guest users: enter name + email first, then chat
  • Offline mode: leave a message form (name, email, message)
  • Unread badge on toggle button when panel is closed
  • Auto-polls every 3 seconds for new admin replies

Admin Panel — /admin-chat

  • Session list with All / Pending / Open / Closed tabs
  • Status badges — pending (amber), open (green), closed (grey)
  • Unread count per session + total badge in sidebar
  • Full conversation view + reply box
  • Close session button
  • Collapsible settings: Online/Offline toggle, welcome message, offline message
  • Fully mobile responsive

API Endpoints

MethodEndpointAuthDescription
POST/api/chat/startAnyStart or resume session
POST/api/chat/sendUserSend a message
GET/api/chat/pollUserPoll for new messages
POST/api/chat/closeUserClose session
GET/api/chat/admin-listAdminList all sessions
GET/api/chat/admin-messagesAdminGet session messages
POST/api/chat/admin-sendAdminSend admin reply
POST/api/chat/admin-closeAdminClose session
POST/api/chat/admin-settingsAdminSave chat settings
GET/api/chat/admin-get-settingsAdminGet chat settings

DB Tables

TableDescription
chat_sessionsid, user_id, guest_name, guest_email, status (open/closed/pending), last_message_at
chat_messagesid, session_id, sender_type (user/admin/system), sender_name, message, is_read
chat_settingsonline_status, welcome_message, offline_message

All tables auto-created on first chat API call.

Background Animation Effects

Overview

Animated canvas background visible on all pages. Uses HTML5 Canvas API. Renders behind all content (z-index: 0) and never blocks clicks (pointer-events: none).

150 Particles

Floating + twinkle

Network Lines

Connect nearby particles

7 Glowing Orbs

Pulsing radial gradients

4 Nebulae

Elliptical soft glow

120 Stars

Random twinkle

Shooting Stars

Random intervals

Implementation

Canvas is injected in src/views/header.php just before the nav element. It auto-resizes on window resize.

<!-- In header.php -->
<canvas id="bgCanvas"></canvas>

/* CSS */
#bgCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

Dark vs Light Theme

Effect intensity adapts to theme — dark theme has stronger orbs and more visible particles. Light theme uses subtle, low-opacity version. Controlled by PHP variable $isDark.

Admin Panel — Today's Updates

All Admin Pages

PageURLWhat's New
Stripe Settings/admin-stripeFull Stripe gateway configuration
Offline Payments/admin-offline-paymentsReview, approve, reject manual payments
Live Chat/admin-chatReal-time chat management with mobile-responsive UI
Site Settings/admin-settingsOffline payment settings (instructions, bank details)
Analytics/admin-analytics90-day chart horizontal scroll fix

Admin Currency — Always USD

Admin panel always displays prices in USD regardless of any cookie. This is enforced in get_currency_code() and get_currency_symbol() which check $_SESSION['is_admin'] first.

A 🪙 USD badge is shown in the admin header to confirm this.

Layout Fixes

  • All admin pages use max-w-full — no more right-side gaps
  • Main content background matches sidebar dark purple gradient
  • All INR/₹ references replaced with USD/$