THIBITISHA BRIDGE - Linux (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. Built for
64-bit x86 (the common desktop/laptop architecture).

HOW TO RUN
----------
1. Copy this whole folder anywhere on the machine (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. Open a terminal in this folder and run:
       ./start-bridge.sh
   (If your file manager supports double-clicking .desktop launchers,
   you can instead try double-clicking "ThibitishaBridge.desktop" -
   the first time, you may need to right-click it and choose "Allow
   Launching" or "Trust and Launch" depending on your file manager.)
4. Wait for the green "TUNNEL URL" box to appear in the terminal - 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 terminal 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.sh          <- run this to start everything
  ThibitishaBridge.desktop  Optional GUI double-click launcher
  node/node                 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 + lib64/          Bundled ADB (talks to the Android phone)
  app/cloudflared           Bundled Cloudflare Tunnel client

TROUBLESHOOTING
----------------
"Permission denied" when running ./start-bridge.sh
  - Run: chmod +x start-bridge.sh app/adb app/cloudflared node/node
    then try again.

"No ADB devices connected" on the dashboard
  - Open a terminal in the app/ folder and try: ./adb 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 needs
    outbound internet access to open the tunnel.

Bridge shows "Cannot GET /health" or similar when you open the tunnel
URL directly in a browser
  - Some other app on the machine is using the same local port. Open a
    terminal and run: ss -ltnp | grep 47235
    That tells you which other process is conflicting so you can close
    it, or change PORT in start-bridge.sh to a different number.
