linkscout-backend / QUICK_TEST.md
zpsajst's picture
Initial commit with environment variables for API keys
2398be6

LinkScout - Quick Test Guide

πŸš€ Quick Start (2 Steps)

Step 1: Start Backend

cd D:\LinkScout
python combined_server.py

Wait for:

βœ… RoBERTa loaded
βœ… Emotion model loaded
Server: http://localhost:5000

Step 2: Start Website

cd D:\LinkScout\web_interface\LinkScout
npm run dev

Wait for:

βœ“ Ready in 2.5s
Local: http://localhost:3000

βœ… Test 1: URL Analysis

Steps:

  1. Open: http://localhost:3000/search
  2. Paste: https://www.bbc.com/news/articles/c93dy2kk7vzo
  3. Press Enter

Expected Result:

βœ… URL is scraped
βœ… 30+ paragraphs extracted
βœ… Full AI analysis displayed
βœ… Risk score shown (not 0%)
βœ… Categories detected
βœ… "What's Correct" section filled
βœ… "What's Wrong" section filled
βœ… Sources shown

If you see "0% risk" or "Article":

  • ❌ URL scraping failed
  • Check backend console for errors
  • Try a different URL

βœ… Test 2: Mobile Responsiveness

Steps:

  1. Press F12 (DevTools)
  2. Press Ctrl+Shift+M (Mobile view)
  3. Select: iPhone 14 Pro
  4. Click the input box

Expected Result:

βœ… Input doesn't overlap keyboard
βœ… Content scrolls smoothly
βœ… Buttons are easy to tap
βœ… Text is readable
βœ… Swipe handle shows at top

If input overlaps keyboard:

  • ❌ Hard refresh: Ctrl+Shift+R
  • Clear browser cache

βœ… Test 3: Extension Download

From Homepage:

Steps:

  1. Go to: http://localhost:3000
  2. Click: "Get Extension"

Expected Result:

βœ… Button shows "Downloading..."
βœ… File downloads: linkscout-extension.zip
βœ… Page redirects to /extensions
βœ… Success message appears

From Extensions Page:

Steps:

  1. Go to: http://localhost:3000/extensions
  2. Click: "Download Extension" (big button)

Expected Result:

βœ… Button shows loading spinner
βœ… File downloads: linkscout-extension.zip
βœ… Alert: "Extension downloaded! Extract..."

If download fails:

  • ❌ Backend not running β†’ Start python combined_server.py
  • Check browser console (F12) for errors

βœ… Test 4: Install Extension

Steps:

  1. Extract linkscout-extension.zip
  2. Open Chrome/Edge
  3. Go to: chrome://extensions or edge://extensions
  4. Enable "Developer mode" (top-right toggle)
  5. Click "Load unpacked"
  6. Select extracted folder

Expected Result:

βœ… Extension appears in list
βœ… No errors shown
βœ… Extension icon in toolbar
βœ… Click icon β†’ Popup opens
βœ… Can analyze URLs from popup

πŸ› Common Issues

Issue: "Download failed"

Solution:

# Start backend first!
python combined_server.py

Issue: "No content found at this URL"

Solution:

# Try these test URLs:
https://www.bbc.com/news
https://www.cnn.com
https://www.reddit.com/r/news

Issue: "Analysis failed"

Solution:

# Check backend is running on port 5000
# Check backend console for errors
# Try restarting backend

Issue: Mobile input still overlapping

Solution:

# Hard refresh browser
Ctrl + Shift + R (Windows)
Cmd + Shift + R (Mac)

# Or clear cache:
DevTools β†’ Application β†’ Clear storage

πŸ“Š Success Criteria

βœ… URL Analysis Works When:

  • URL scraping extracts 20+ paragraphs
  • Risk score is not 0% (unless truly credible)
  • Categories are detected (not just "Other")
  • "What's Correct" has actual content
  • "What's Wrong" has actual content

βœ… Mobile Works When:

  • Input never hidden by keyboard
  • Can type and scroll smoothly
  • All buttons easily tappable
  • Content visible at all times

βœ… Download Works When:

  • ZIP file downloads successfully
  • File size is ~50-100 KB
  • Can extract without errors
  • Extension loads in browser

🎯 Quick Verification

Run This Test (30 seconds):

1. Start backend: python combined_server.py
2. Start frontend: npm run dev
3. Open: http://localhost:3000/search
4. Paste: https://www.bbc.com/news
5. Verify: Risk score β‰  0%, categories shown
6. Click: Download Extension (any page)
7. Verify: ZIP downloads
8. Done! βœ…

πŸ“ž If Everything Works:

You should see:

  • βœ… URLs being properly analyzed
  • βœ… Mobile layout perfect
  • βœ… Extension downloading
  • βœ… No console errors

Congratulations! All 3 fixes are working! πŸŽ‰


πŸ“ What Got Fixed:

  1. URL Analysis β†’ Now scrapes actual content
  2. Mobile UI β†’ Perfect positioning, no overlap
  3. Extension Download β†’ Real ZIP download with install guide

All systems operational! πŸš€