SUPER ADMIN TECHNICAL MANUAL (`example.com/doc-admin.html`)

Platform Administration, Architecture & Permissions Reference

Complete guide to installation, cPanel permissions, custom subscription plans, frontend CMS & SEO publishing, AI vault, and troubleshooting.

1. Automatic Installation (`install.php`) & Solving MySQL Error 1045

When you open https://example.com/install.php, the installer automatically configures:

  • Public Promotional Website: https://example.com/ (served by root index.php)
  • Software Application & Dashboard: https://example.com/app/ (served by app/index.php)
  • MySQL Database & Initial Super Admin Account: Saved in config/installed_config.php and protected by config/installed.lock.
Fixing MySQL Error [1045] (Access denied for user 'skillsurfacetm@gmail.com'@'localhost'):
This error happens when your browser password manager autofills your email address (skillsurfacetm@gmail.com) into the MySQL Database Username field. On cPanel (`yourdomain.com`), your MySQL Database Name is yourcpaneluser_invopk2698 and your MySQL Database Username is yourcpaneluser_invopk2697 (never an email address). In v15.0, install.php includes smart anti-autofill protection that automatically detects and replaces any autofilled `@` email address in db_user with yourcpaneluser_invopk2697.

2. Complete Folder & File Permissions Matrix (cPanel / Linux)

Verify the following POSIX permissions in cPanel File Manager so the installer, cache manager, and JSON/MySQL sync operate without errors:

Path / File / DirectoryTypeRecommended PermissionPurpose
/public_html/ (Domain Root)Directory0755Main web root serving public site (/)
/app/Directory0755SaaS application & dashboard directory (/app/)
/config/Directory0755 (Writable)Stores installed_config.php, plans.json, cms_content.json, and installed.lock
/storage/ & /storage/cache/Directory0755 (Writable)Stores persistent state backup and runtime cache
/logs/Directory0755 (Writable)Stores install_error.log and runtime_error.log
index.php, app/index.php, install.php, api.php, login.php, logout.phpPHP Scripts0644Executable by PHP-FPM / LiteSpeed without world-write exposure
doc.html, doc-admin.html, .htaccess, app/.htaccessStatic / Apache0644Documentation pages and Apache rewrite rules
config/installed_config.phpConfig File0644 or 0600Generated database & admin credentials file

3. Managing Custom Package Plans (Super Admin Dashboard)

To create, edit, save, activate/deactivate, or delete subscription plans:

  1. Open https://example.com/app/ and click Subscription Plans in the left sidebar menu.
  2. Click + Create New Package Plan to define a new tier (Plan Name, Unique Code, Badge, Monthly/Annual prices in PKR & USD, Max Invoices/Month, Max Staff Users, Max Products, and feature bullet points).
  3. Click Edit Plan on any existing plan (including Starter Free, Business Pro, or Enterprise Cloud) to modify its pricing, quotas, or features, then click Update & Save Plan.
  4. Click Hide / Publish to deactivate or activate a plan, or click the trash icon to Delete it.
  5. Every change is saved to MySQL (subscription_plans) and config/plans.json, updating the public website pricing table (example.com/#pricing) and signup dropdown (login.php?tab=register) immediately.

4. Creating, Editing & Publishing Frontend Pages & Blog Posts

Manage the public promotional website directly from the Super Admin dashboard:

  1. In https://example.com/app/, click CMS & SEO Manager in the left sidebar.
  2. Click + New Page / Blog Post to open the editor.
  3. Choose Content Type (Page, Blog Post, or Download), enter the Title, URL Slug, Summary, Full HTML Content, SEO Title, Meta Description, Meta Keywords, Canonical URL, and Robots Indexing.
  4. Click Save & Publish to Public Website. Your page or blog post is immediately saved to config/cms_content.json and MySQL cms_pages, appears on https://example.com/#blog, and can be opened directly via the View ↗ button.

5. How to Change Documentation Menu URLs, Footer Links, or Home URL

If you want to customize the top menu hyperlinks or the 3-column footer URLs in doc.html, doc-admin.html, or index.php:

  1. Open doc.html, doc-admin.html, or index.php in cPanel File Manager → Edit (or any code editor).
  2. Top Navigation Menu: Locate the comment <!-- OFFICIAL AICODEFOREST / SKILLSURFACE TOP NAVIGATION MENU --> near line 35. Each menu item is a standard anchor tag:
    <li class="nav-item"><a class="nav-link" href="https://aicodeforest.com" target="_blank">HOME</a></li>
    Simply replace https://aicodeforest.com with your custom domain URL.
  3. 3-Column Footer: Scroll to <!-- OFFICIAL 3-COLUMN THEME FOOTER --> near the bottom of the file. Update any link inside Column 1 (ABOUT US), Column 2 (TOP ARTICLES), or Column 3 (Hire for Development / WhatsApp number) and click Save Changes.

6. Multi-Tenant Isolation & Role-Based Access Control (RBAC)

  • Tenant Isolation: Each business account is assigned a unique tenant_code (`TEN-001`, `TEN-002`, etc.). All queries and state sync payloads are scoped by tenant.
  • Super Admin Portal Impersonation: In Subscription Plans or Users & SaaS Tenants, Super Admins can click Login to Tenant Portal to inspect any customer business workspace.
  • Roles: Super Admin (Global), Business Owner / Store Admin (Full Tenant CRUD), Manager (Operations), Accountant (Ledgers & Tax Reports), and Cashier (POS Terminal only).

7. Free Green AI APIs, Server Key Vault & Rate Limits

Open Free Green AI Engine in the left sidebar to configure server-side AI providers:

  • Verified Free-Tier Providers: Google Gemini 2.5 Flash (Free Tier), Groq Cloud Llama-3.3-70B Versatile (Free Tier), and OpenRouter Free Models.
  • Limits & Cost Transparency: Free tiers enforce provider rate limits (e.g., 15 RPM / 1,500 RPD on Gemini Free Tier; 30 RPM on Groq Free Tier). Exceeding free-tier quotas on a billed account may incur provider charges or temporary HTTP 429 throttling.
  • Security: API keys are stored in the server-side MySQL ai_keys_vault table and are never exposed in public HTML or mobile client bundles.

8. Configuring Android APK, iOS IPA & WooCommerce Sync

  • Android & iOS Apps: Extract Final_Master_Apps_APK_IPA_Easy_Configure.zip. Open the mobile app and scan the QR pairing code shown in /app/ → Users & SaaS Tenants to bind the app to https://yourdomain.com/api.php. For iOS production distribution, open the included Xcode/Flutter project on macOS and sign with your Apple Developer Certificate and Provisioning Profile.
  • WordPress WooCommerce Bridge: Open WooCommerce Sync in the sidebar, enter your WordPress store URL, Consumer Key (`ck_...`), and Consumer Secret (`cs_...`), or install the included `woocommerce-plugin/skill-invo-woocommerce-bridge.php` plugin in WordPress.

9. Complete Platform Changelog (v1.0 – v15.0)

  • v15.0 (Current): Fixed `/app/` HTTP 500 PHP header bug; added anti-autofill protection and auto-correction in `install.php` for MySQL Error 1045 (`yourcpaneluser_invopk2697`); connected Super Admin CMS & SEO Manager live to public website (`index.php`) for creating/editing/publishing pages and blog posts; replaced visible "Khata" labels with "Account Ledger / Customer Ledger"; added Super Admin gate on `doc-admin.html` and exact AICodeForest/SkillSurface menu and 3-column footer.
  • v14.0: Fixed `schema.sql` comment parser in `install.php` so `tenants` table creates cleanly; added `clear_cache.php` and Topbar `Clear Cache / Reset 0` button; separated public website (`/`) and SaaS application (`/app/`); added full Super Admin Custom Package Plans CRUD (`Add`, `Edit`, `Save`, `Publish/Hide`, `Delete`).
  • v11.0 – v13.0: Added 5-method authentication (`login.php`), universal domain installer (`install.php`), `/logs/` diagnostic logger, and multi-tenant isolation.
  • v1.0 – v10.0: Core 18-module POS, 10+ Designer A4 invoice templates, multi-country tax engine (PK/UK/US), and Free Green AI advisor.