THIBITISHA BRIDGE - Windows (no install required)
====================================================

This folder is self-contained. Node.js, ADB, and Cloudflare Tunnel are
all bundled inside it - you do not need to install anything.

HOW TO RUN
----------
1. Copy this whole folder anywhere on the PC (Desktop, USB drive, etc).
2. Plug in the Android phone (or pair it over Wireless Debugging - see
   BRIDGE_SETUP.md in the main project for phone-side setup steps).
3. Double-click "Start Bridge.bat".
4. Wait for the green "TUNNEL URL" box to appear in the window - it
   looks like:
       https://random-words-here.trycloudflare.com
5. Open the dashboard:
       https://thibitisha-verify.onrender.com/dashboard.html
6. Paste that tunnel URL into the "Bridge URL" field and Save.
   The bridge status indicator should turn green.
7. Upload your CSV and click RUN VERIFICATION.

Keep the "Start Bridge.bat" window open the whole time you're running
verifications. Closing it stops the bridge and the tunnel.

NOTE: the tunnel URL changes every time you restart the bridge - paste
the new one into the dashboard each time you start a fresh session.

WHAT'S IN THIS FOLDER
----------------------
  Start Bridge.bat   <- double-click this to start everything
  node\node.exe       Bundled Node.js runtime (no system install needed)
  app\bridge.js       The bridge server
  app\batch.js        Per-device verification worker (spawned by bridge.js)
  app\adb.exe + .dll  Bundled ADB (talks to the Android phone)
  app\cloudflared.exe Bundled Cloudflare Tunnel client

TROUBLESHOOTING
----------------
"No ADB devices connected" on the dashboard
  - Run a Command Prompt in the app\ folder and try: adb.exe devices
  - If it says "unauthorized", check the phone screen for a popup and
    tap Allow.

No TUNNEL URL appears
  - Check your internet connection - the bundled cloudflared.exe needs
    outbound internet access to open the tunnel.

Antivirus / SmartScreen warning on first run
  - This is expected for any unsigned .exe downloaded from outside the
    Microsoft Store. Choose "More info" -> "Run anyway" if you trust
    the source you got this folder from.

Bridge shows "Cannot GET /health" or similar when you open the tunnel
URL directly in a browser
  - Some other app on the PC is using the same local port. Open a
    Command Prompt and run: netstat -ano | findstr :47235
    Find the PID, then: tasklist /FI "PID eq <that number>"
    That tells you which other app is conflicting so you can close it,
    or change PORT in Start Bridge.bat to a different number.
