How itsn80/bbg-tcg-sorter works
BBG TCG Sorter is a Raspberry Pi card-sorting appliance operated through a password-gated Flask UI. Its principal workflow feeds a card, captures and recognizes it, looks up card metadata, applies bin rules, and routes it with servos. The README documents AWS Rekognition/Ollama-compatible recognition, Scryfall lookup, ten bins, and live status/settings; sampled excerpts additionally show feed orchestration and LED control. Some workflow links rely on README documentation because the relevant orchestration code was not excerpted.
Main entry points: Basic-Website.py Flask App · Read-Card.py Capture And Identify · Feed-Card.py Feed Cycle · templates Web UI
Components 19
Web Control
- Flask App
Basic-Website.py - Web UI
templates - Login And Settings
Basic-Website.py - Sort Orchestrator
Basic-Website.py - Live Status
Basic-Website.py
Card Recognition
- Capture And Identify
scripts/Read-Card.py
Feed And Routing
- Feed Cycle
scripts/Feed-Card.py - Bin Rule Matching
Basic-Website.py
Hardware Control
- Servo Controller
scripts/servo_controller.py - Motors And Sensors
scripts/Feed-Card.py - LED Controller
led_controller.py
Configuration And State
- App Configuration
storage/config-default.json - Bin Rules Data
storage/bin-info-default.json
Other components
- Operator
- Pi Camera
- AWS Rekognition
- Ollama-Compatible Vision
- Scryfall Lookup
- SMTP Service
Connections 20
- Operator → Web UI: uses
README.md - Web UI → Flask App: submits requests
- Flask App → Login And Settings: authenticates
Basic-Website.py - Flask App → Sort Orchestrator: starts sorting
Basic-Website.py - Sort Orchestrator → Feed Cycle: runs feed script
Basic-Website.py - Sort Orchestrator → Capture And Identify: requests identification
README.md - Capture And Identify → Pi Camera: captures images
scripts/Read-Card.py - Capture And Identify → AWS Rekognition: recognizes text
scripts/Read-Card.py - Capture And Identify → Ollama-Compatible Vision: recognizes image
scripts/Read-Card.py - Capture And Identify → Scryfall Lookup: looks up card
scripts/Read-Card.py - Sort Orchestrator → Bin Rule Matching: matches card
README.md - Sort Orchestrator → Servo Controller: routes card
README.md - Feed Cycle → Motors And Sensors: drives and senses
scripts/Feed-Card.py - Feed Cycle → Servo Controller: invokes servo script
- Flask App → LED Controller: controls LEDs
Basic-Website.py - Flask App → App Configuration: reads and writes
README.md - Flask App → Bin Rules Data: reads and writes
README.md - Bin Rule Matching → Bin Rules Data: loads rules
README.md - Flask App → Live Status: serves status
Basic-Website.py - Flask App → SMTP Service: sends summaries
README.md