# 📤 QUICK UPLOAD CHECKLIST - PRINT & USE

**Gunakan untuk tracking progress upload ke webhost**

---

## 🎯 FASE 1: PRE-UPLOAD (5 menit)

```
☐ Buka FTP/SFTP client (WinSCP, Filezilla, dll)
☐ Connect ke: tracker.lppmunud.id
☐ Navigate ke: /home/lppmunu1/public_html/tracker.lppmunud.id/
☐ Pastikan folder sudah ada atau create new
☐ Verify credentials login berhasil
```

---

## 📂 PHASE 2: UPLOAD FILES (30 menit)

### **BATCH 1: CONFIG FILES** (Upload FIRST!)
```
Source              →  Destination
☐ config\.env.webhost     →  config/.env.webhost            ⭐ PALING PENTING!
☐ config\EnvironmentHelper.php  →  config/EnvironmentHelper.php
☐ config\Config.php       →  config/Config.php
☐ config\Database.php     →  config/Database.php

Time: ~2 minutes
```

---

### **BATCH 2: API CONTROLLERS** (7 files)
```
Source              →  Destination
☐ api\controllers\ScreenshotController.php      →  api/controllers/ScreenshotController.php      [NEW]
☐ api\controllers\ApplicationsController.php    →  api/controllers/ApplicationsController.php    [NEW]
☐ api\controllers\MediaSocialController.php     →  api/controllers/MediaSocialController.php
☐ api\controllers\CommandController.php         →  api/controllers/CommandController.php
☐ api\controllers\ActivityController.php        →  api/controllers/ActivityController.php
☐ api\controllers\AgentController.php           →  api/controllers/AgentController.php
☐ api\controllers\ApplicationMonitorController.php  →  api/controllers/ApplicationMonitorController.php

Time: ~5 minutes
```

---

### **BATCH 3: MAIN API ROUTER**
```
Source              →  Destination
☐ api\index.php     →  api/index.php    [UPDATED - most important!]

Time: ~1 minute
```

---

### **BATCH 4: DASHBOARD VIEWS** (7 files)
```
Source              →  Destination
☐ dashboard\views\screenshot.php       →  dashboard/views/screenshot.php      [NEW]
☐ dashboard\views\media-social.php     →  dashboard/views/media-social.php    [NEW]
☐ dashboard\views\applications.php     →  dashboard/views/applications.php
☐ dashboard\views\bandwidth.php        →  dashboard/views/bandwidth.php
☐ dashboard\views\dashboard.php        →  dashboard/views/dashboard.php
☐ dashboard\views\agents.php           →  dashboard/views/agents.php
☐ dashboard\views\activities.php       →  dashboard/views/activities.php

Time: ~5 minutes
```

---

### **BATCH 5: DASHBOARD MAIN FILES**
```
Source              →  Destination
☐ dashboard\index.php      →  dashboard/index.php
☐ dashboard\login.php      →  dashboard/login.php
☐ dashboard\logout.php     →  dashboard/logout.php

Time: ~2 minutes
```

---

### **BATCH 6: DASHBOARD SUPPORTING FOLDERS**
```
Source              →  Destination
☐ dashboard\assets\        →  dashboard/assets/        [FOLDER - with all contents]
☐ dashboard\config\        →  dashboard/config/        [FOLDER - with all contents]
☐ dashboard\controllers\   →  dashboard/controllers/   [FOLDER - with all contents]

Time: ~5 minutes
```

---

### **BATCH 7: ROOT FILES**
```
Source              →  Destination
☐ .htaccess         →  .htaccess
☐ index.php         →  index.php

Time: ~1 minute
```

---

## 🔐 PHASE 3: SET PERMISSIONS (5 menit)

```
Setelah semua upload, set permissions via cPanel Terminal:

☐ chmod 755 api/
☐ chmod 755 api/controllers/
☐ chmod 755 dashboard/
☐ chmod 755 dashboard/views/
☐ chmod 644 api/index.php
☐ chmod 644 dashboard/index.php
☐ chmod 644 config/.env.webhost

Commands:
cd /home/lppmunu1/public_html/tracker.lppmunud.id/
find . -type d -exec chmod 755 {} \;
find . -type f -name "*.php" -exec chmod 644 {} \;
```

---

## ✅ PHASE 4: VERIFICATION (10 menit)

### **Test 1: API Connectivity**
```bash
☐ curl http://tracker.lppmunud.id/api/agents

Expected: JSON response
Status: ✅ OK atau ❌ ERROR
```

---

### **Test 2: Dashboard Load**
```bash
☐ Browser: http://tracker.lppmunud.id/dashboard

Expected: Login page appears
Status: ✅ OK atau ❌ ERROR
```

---

### **Test 3: Screenshot Endpoint**
```bash
☐ curl -X GET http://tracker.lppmunud.id/api/screenshot

Expected: Response (not 404)
Status: ✅ OK atau ❌ ERROR
```

---

### **Test 4: Database Connection**
```bash
☐ Try login dengan username: admin, password: admin123
Expected: Dashboard loads
Status: ✅ OK atau ❌ ERROR
```

---

### **Test 5: Check Logs**
```bash
☐ View webhost error logs
Expected: No critical PHP errors
Status: ✅ OK atau ❌ ERROR
```

---

## 📊 PROGRESS TRACKER

```
Upload Progress:

BATCH 1 (Config)           [ ] 0%   [ ] 50%  [ ] 100% ✅
BATCH 2 (Controllers)      [ ] 0%   [ ] 50%  [ ] 100% ✅
BATCH 3 (API Router)       [ ] 0%   [ ] 50%  [ ] 100% ✅
BATCH 4 (Views)            [ ] 0%   [ ] 50%  [ ] 100% ✅
BATCH 5 (Dashboard Files)  [ ] 0%   [ ] 50%  [ ] 100% ✅
BATCH 6 (Folders)          [ ] 0%   [ ] 50%  [ ] 100% ✅
BATCH 7 (Root)             [ ] 0%   [ ] 50%  [ ] 100% ✅

Permissions:               [ ] Not Set  [ ] Setting  [ ] Done ✅
Verification:              [ ] Not Started  [ ] In Progress  [ ] Done ✅

OVERALL: __________ % Complete
```

---

## 📝 NOTES & TROUBLESHOOTING

### **If upload fails:**
```
❌ 550 Permission denied
→ Create directory first via cPanel, then upload

❌ Connection timeout
→ Check FTP credentials
→ Try different port (21, 2121, 990)

❌ File not found after upload
→ Check if directory path is correct
→ Verify file exists locally before uploading

❌ 404 errors when testing
→ Check if files uploaded to correct path
→ Verify file permissions set to 644
```

---

### **Critical Points Remember:**
```
⭐ .env.webhost MUST have correct database credentials!
⭐ api/index.php is the MAIN router - most critical!
⭐ Set directory permissions to 755, files to 644
⭐ Test after every batch upload to catch errors early
⭐ Don't upload .env.local (that's for localhost only)
```

---

## 🎯 SUCCESS CRITERIA

Upload is successful when:

```
✅ All 25+ files uploaded without errors
✅ Directory structure matches local layout
✅ File permissions are set correctly (755/644)
✅ API returns JSON response (not 404 or 500)
✅ Dashboard login page loads
✅ Database credential test passes
✅ No critical errors in webhost logs
```

---

## ⏱️ TIME ESTIMATE

```
Configuration:     2 minutes
Controllers:       5 minutes
API Router:        1 minute
Views:             5 minutes
Dashboard:         2 minutes
Folders:           5 minutes
Root Files:        1 minute
Permissions:       5 minutes
Verification:     10 minutes
─────────────────────────────
TOTAL:           ~36 minutes
```

---

## 📱 SAVE THIS INFO

```
FTP Details:
Host: ___________________
Port: ___________________
Username: ___________________
Password: ___________________
Path: /home/lppmunu1/public_html/tracker.lppmunud.id/

Database Details:
Host: ___________________
Username: ___________________
Password: ___________________
Database: ___________________
```

---

**Print this page for quick reference!**

Last Updated: March 28, 2026

