# OTOUP.COM - Namecheap cPanel Shared Hosting Deployment Guide

Welcome to **Otoup.com**! This package contains the complete, production-ready central hub for viral trend curation, dynamic micro-tools directory, universal ad placement engine, and cross-site telemetry.

---

## 📁 Package Directory Structure

Inside your project zip, you will find:

```text
otoup_full_project/
├── otoup_core/                 <-- Laravel Application Core (Place in /home/username/otoup_core/)
├── public_html/                <-- Public Web Files (Place inside cPanel public_html/)
│   ├── index.php
│   ├── .htaccess
│   ├── cdn/
│   │   └── otoup-bridge.js     <-- Universal Integration SDK
│   └── tools/
│       ├── seo/                <-- Live Sample SEO Analyzer Tool
│       └── qr-code-generator/  <-- Live Sample QR Code Generator Tool
├── otoup_database.sql          <-- Master MySQL Schema & Initial Data
├── standalone_tool_boilerplate.html <-- Starter Template for Any New Tool
└── DEPLOYMENT_GUIDE_NAMECHEAP.md
```

---

## 🚀 Step 1: Upload Files to Namecheap cPanel

1. Log in to your **Namecheap cPanel**.
2. Open **File Manager**.
3. In your home directory (`/home/username/`):
   * Create a folder named `otoup_core`.
   * Upload all files from the package's `otoup_core/` into `/home/username/otoup_core/`.
4. Go to `/home/username/public_html/`:
   * Upload all files from the package's `public_html/` directly into your server's `public_html/`.
   * Ensure hidden files like `.htaccess` are visible and uploaded.
5. Verify folder permissions:
   * `/home/username/otoup_core/storage/` $ightarrow$ `775`
   * `/home/username/otoup_core/bootstrap/cache/` $ightarrow$ `775`

---

## 🗄️ Step 2: Create Database & Import SQL

1. In cPanel, navigate to **MySQL® Database Wizard**.
2. Create a new database (e.g. `youruser_otoupdb`).
3. Create a new user (e.g. `youruser_otoupusr`) with a strong password.
4. Assign **ALL PRIVILEGES** to the user for this database.
5. In cPanel, open **phpMyAdmin**:
   * Select your newly created database.
   * Click the **Import** tab at the top.
   * Choose `otoup_database.sql` from your computer.
   * Click **Go / Import**. All tables, categories, initial ads, and admin user will be created.

---

## ⚙️ Step 3: Configure Environment (`.env`)

1. In File Manager, navigate to `/home/username/otoup_core/`.
2. Edit the `.env` file:
   ```env
   APP_NAME=Otoup
   APP_ENV=production
   APP_DEBUG=false
   APP_URL=https://otoup.com

   DB_CONNECTION=mysql
   DB_HOST=127.0.0.1
   DB_PORT=3306
   DB_DATABASE=youruser_otoupdb
   DB_USERNAME=youruser_otoupusr
   DB_PASSWORD=YourChosenDatabasePassword
   ```
3. Save the file.

---

## 🐘 Step 4: PHP Version & Extensions

1. In cPanel, find **Select PHP Version**.
2. Set PHP version to **8.2** or **8.3**.
3. Ensure these extensions are checked / enabled:
   * `pdo_mysql`, `mbstring`, `openssl`, `tokenizer`, `xml`, `ctype`, `json`, `bcmath`, `fileinfo`.

---

## 🔐 Step 5: Log in to Admin Panel

* **Admin Login URL:** `https://otoup.com/admin/login`
* **Default Email:** `admin@otoup.com`
* **Default Password:** `Admin@12345`

*(Please change your password immediately after logging in!)*

---

## 🛠️ Step 6: How to Add & Monetize New Tools

Whenever you build a new tool or upload an HTML/PHP project:
1. Upload your tool's folder to `public_html/tools/your-tool-name/` (or use `standalone_tool_boilerplate.html`).
2. Add the Otoup Bridge SDK before `</body>`:
   ```html
   <script src="https://otoup.com/cdn/otoup-bridge.js" data-app="your-tool-name" async></script>
   ```
3. Add ad slots wherever desired:
   ```html
   <div class="otoup-ad-slot" data-slot="slot-header"></div>
   <div class="otoup-ad-slot" data-slot="slot-in-content"></div>
   ```
4. In Otoup Admin, go to **App & Directory Manager** $ightarrow$ **Add New App**:
   * Title: `Your Tool Title`
   * Slug: `your-tool-name`
   * Target URL: `/tools/your-tool-name/index.html`
   * Check **Show on Homepage Grid**!
5. Now, go to **Ads & Placements** in your admin panel to assign banners, Google AdSense, or scripts specifically to this tool or globally!
