# AdGuard Block Battle Rankings

A Flask dashboard that pulls client block stats from AdGuard Home and displays
each client as a ranked anime-tier character card.

## Tier System

| Tier | Label         | Block Range | Color  |
|------|---------------|-------------|--------|
| 1    | Civilian      | 0-50        | Green  |
| 2    | Rookie        | 51-200      | Yellow |
| 3    | Protagonist   | 201-500     | Orange |
| 4    | Hardened Fighter | 501-1000 | Red    |
| 5    | Final Boss    | 1000+       | Purple |

## Setup

1. Install dependencies:
   pip install -r requirements.txt

2. Set environment variables (or edit app.py directly):
   export ADGUARD_HOST=http://vpn.umbrellapants.xyz:3000
   export ADGUARD_USER=your_username
   export ADGUARD_PASS=your_password

3. Run:
   python app.py

4. Open http://localhost:5000

## Swapping in Character Art

Each tier uses an SVG placeholder. To replace with real images:
- Add your images to static/characters/ named tier1.png through tier5.png
- In index.html, replace the charSVG() call in the card template with:
  <img src="/static/characters/tier${client.tier}.png" alt="Tier ${client.tier}" style="width:75%;height:75%;object-fit:contain"/>

## Deployment with mod_wsgi

Create a wsgi.py at the project root:

  from app import app as application

Then point your Apache VirtualHost at wsgi.py.

## Auto-refresh

The dashboard polls AdGuard every 60 seconds automatically.
Adjust the interval at the bottom of index.html (setInterval line).
