# CompareKit Upload Checklist

## ✅ Step-by-Step Guide to Fix Your Current Issue

### IMMEDIATE FIX: Delete .htaccess

**In cPanel File Manager:**

1. ☑ Navigate to `public_html/CompareKit/`
2. ☑ Enable "Show Hidden Files" (Settings button, top right)
3. ☑ Find `.htaccess` file
4. ☑ Delete it
5. ☑ Refresh your browser
6. ☑ You should now see `index.html` instead of "Forbidden" error

---

## 🚀 Complete Setup (After Fixing Forbidden Error)

### Part 1: Verify Files Are Uploaded

In `public_html/CompareKit/`, you should have:

- ☑ `src/` folder
- ☑ `public/` folder
- ☑ `package.json`
- ☑ `package-lock.json`
- ☑ `index.html` (in root, not just in public/)
- ☑ `.env` file
- ☑ `setup.js`

### Part 2: Set Up Node.js in cPanel

1. ☑ Open cPanel
2. ☑ Search for "Setup Node.js App" or "Node.js Selector"
3. ☑ Click "Create Application"
4. ☑ Fill in:
   - Application root: `public_html/CompareKit`
   - Application URL: `/CompareKit`
   - Startup file: `src/server.js`
   - Node.js version: `18.x` or latest
5. ☑ Click "Create"

### Part 3: Install Dependencies

1. ☑ In Node.js app interface, find "Run NPM Install" button
2. ☑ Click it
3. ☑ Wait 2-3 minutes (shows progress)
4. ☑ Verify "Status: Installed" or similar

### Part 4: Start Application

1. ☑ Click "Start" or "Restart" button
2. ☑ Wait 10 seconds
3. ☑ Status should show "Running"

### Part 5: Test It Works

1. ☑ Visit: `https://kodepilot.com/CompareKit/`
2. ☑ You should see CompareKit interface (not setup page)
3. ☑ Try generating a test image:
   - Product A: `Semrush`
   - Product B: `Ahrefs`
4. ☑ Click "Generate Image"
5. ☑ Image should generate in 1-2 seconds

---

## 🔍 Troubleshooting

### If You Still See Directory Listing

**Problem:** No `index.html` in root folder

**Fix:**
1. Make sure `index.html` exists in `/CompareKit/` (root)
2. Not just in `/CompareKit/public/`

### If You See Setup Page (Not Directory Listing)

**Problem:** Node.js app isn't running yet

**Fix:**
1. Follow Part 2-4 above to set up Node.js
2. Make sure app status shows "Running" in cPanel

### If You Get "Module Not Found" Error

**Problem:** Dependencies not installed

**Fix:**
1. In Node.js app interface, click "Run NPM Install"
2. Wait for completion
3. Restart app

### If cPanel Doesn't Have Node.js

**Problem:** Hosting doesn't support Node.js

**Fix - Option 1:** Contact support and ask them to enable it

**Fix - Option 2:** Deploy elsewhere:
- Vercel.com (free, easy)
- Railway.app (free)
- Render.com (free)

---

## 📊 Success Indicators

You'll know it's working when:

- ✅ Visiting `https://kodepilot.com/CompareKit/` shows the purple CompareKit interface
- ✅ You can type two product names and click "Generate Image"
- ✅ Images generate in 1-2 seconds
- ✅ `https://kodepilot.com/CompareKit/health` returns JSON with `"status": "ok"`

---

## 🆘 Quick Commands Reference

### Test Health Check
```bash
curl https://kodepilot.com/CompareKit/health
```

Should return:
```json
{"status":"ok","service":"CompareKit","version":"1.0.0"}
```

### Generate Test Image
```bash
curl -X POST https://kodepilot.com/CompareKit/api/generate/comparison \
  -H "Content-Type: application/json" \
  -d '{"productA":"Semrush","productB":"Ahrefs"}' \
  --output test.png
```

Should create `test.png` file.

---

## 📞 Need Help?

**Read these docs:**
- `UPLOAD-INSTRUCTIONS.md` - Detailed upload guide
- `CPANEL-DEPLOYMENT.md` - Full cPanel setup
- `GETTING-STARTED.md` - Using the app

**Still stuck?**
1. Check Node.js app error logs in cPanel
2. Contact your hosting provider
3. Consider deploying to Vercel (easier)

---

## Current Status

After deleting `.htaccess`:
- [ ] Can access site without "Forbidden" error
- [ ] See setup page (index.html)
- [ ] Node.js app configured in cPanel
- [ ] Dependencies installed
- [ ] App is running
- [ ] Can generate images

Check off each item as you complete it!
