Touch-friendly browser for a large gallery-dl download folder. Python (FastAPI) + SQLite, no frontend build step.
- Indexes every
<file>.jsonsidecar next to its media file (title, artist, tags, rating, date, description, favorites…) - Full-text search, tag/artist/rating filters, sorting (newest, most favorited, random, …), local ★ starring
- Justified thumbnail grid with infinite scroll; thumbnails (480px webp) and large-image previews (2048px) are cached
- Viewer: swipe left/right, swipe down to close, pinch + double-tap zoom, tap for info sheet; arrow keys on desktop
- New downloads are picked up automatically (every
REINDEX_MINUTES) or via the menu → "Scan for new images"
- Copy this folder to the server, edit the two paths in
docker-compose.yml(/images= your gallery-dlbase-directory, mounted read-only;/data= index + thumbnail cache). docker compose up -d --build, then openhttp://<tailscale-name>:8000on the iPad (Safari → Share → Add to Home Screen gives a full-screen app).
The first scan of ~100k files takes several minutes and thumbnails are generated in the background
(newest first); anything not yet cached is generated on demand. /data can be deleted at any time — it is rebuilt,
except for ★ stars, which live in index.sqlite3.
Prerequisites: Python 3.10+ and the VS Code Python extension (it provides the debugpy debugger).
-
Create a virtual environment and install dependencies. In a VS Code terminal (Ctrl+`) at the project root:
python -m venv .venv .venv\Scripts\Activate.ps1 pip install -r requirements.txtThen press Ctrl+Shift+P → Python: Select Interpreter → pick
.venv. (If PowerShell blocks the activate script:Set-ExecutionPolicy -Scope CurrentUser RemoteSigned.) -
Point it at your images. Open .vscode/launch.json and set
IMAGES_DIRto your gallery-dlbase-directory, i.e. the folder that containsfuraffinity/. The index and thumbnail cache go to.data/in the project (delete it any time to start fresh). -
Start it. Press F5 (Run and Debug → Gallery (local test)). Breakpoints in
app/*.pywork, and--reloadrestarts the server when you edit Python files. Static files (app/static) are served from disk, so just refresh the browser after editing them. -
Open http://localhost:8000. The first scan runs in the background and the grid fills as items are indexed (watch progress under ☰ menu).
http://localhost:8000/docsshows the API.
Run the server on all interfaces by changing args in launch.json to
["app.main:app", "--host", "0.0.0.0", "--port", "8000"] (allow it through Windows Firewall when prompted), then browse to
http://<your-pc-tailscale-name>:8000 from the iPad. Touch gestures can't be fully checked in a desktop browser;
Chrome DevTools device emulation (F12 → Ctrl+Shift+M) is a reasonable approximation for swipe and pinch (Shift+drag).
$env:IMAGES_DIR = "C:\path\to\gallery-dl"; $env:DATA_DIR = ".data"
uvicorn app.main:app --port 8000 --reload
- Only media files that have a
.jsonsidecar are indexed. Non-image files (pdf, swf, txt…) show as a file tile with an "Open file" button. - Artist =
artist_urlfrom the sidecar (falls back toartist, then the folder name), so other gallery-dl sites work too; the "Source page" link is currently only built for FurAffinity (SOURCE_URLSinapp/main.py). - No authentication, by design: keep it reachable only over Tailscale.