CardCounter - Festifoll 2026
WARNING: THIS PROJECT IS ABANDONED AND MOST FEATURES ARE BROKEN
The project is officially abandoned by its original author. Ownership and maintenance
may be transferred to anyone interested. Contact me via issue or direct transfer.
Known issues:
- The camera/webcam scanning mode (Interactive) does NOT work reliably. Camera
initialization, frame capture, and barcode decoding all have stability problems
across different hardware. The
nokhwa integration is experimental.
- ITF (Interleaved 2 of 5) decoding is particularly unreliable.
- The webcam stream consumes significant CPU due to continuous polling with no
proper backpressure.
- Graceful shutdown is not implemented; closing the window may leave resources dangling.
- No persistent configuration (camera index, decoding settings, etc.).
- No CSV export or statistics dashboard -- the app only stores raw codes in the DB.
- Error recovery on database corruption is nonexistent.
- Sound feedback is limited to the terminal bell (no audio library integration).
The keyboard input mode (Manual) and the core SQLite storage are the only parts
that function as intended.
Fast code scanning and counting tool for the Festi'Foll 2026 edition.
Reads barcodes via keyboard emulation or webcam, stores results in a local SQLite
database, and provides a fullscreen GPU-accelerated interface.
Features
Keyboard Input (Manual Mode) -- Working
- Ultra-Fast Keyboard Input: Optimized for barcode readers emulating a keyboard.
Accepts any ASCII digit input.
- Auto Validation: Automatically processes codes in batches of 6 characters
(e.g.
032860). Digits are buffered until a full 6-character code is formed,
then immediately checked against the database.
- Duplicate Detection: If a code is already in the database, the UI shows
"DEJA CONNU" (Already Known) on a red background and emits a double beep error.
- New Code Registration: If a code is new, it is inserted into the database,
the UI shows "NOUVEAU - OK" (New - OK) on a green background, and a single
beep confirms success.
Webcam Scanner (Interactive Mode) -- BROKEN / Experimental
- Integration of
nokhwa for camera access and rxing (ZXing port) for barcode
decoding.
- Streams video at ~15 FPS (depending on hardware).
- HUD with a darkened overlay and a centered target zone to help frame barcodes.
- Supports Code 128, EAN-13, and Interleaved 2 of 5 (ITF).
- ITF decoding is unreliable on many cameras and lighting conditions.
- Toggle between Manual and Interactive using the top-bar buttons.
Database
- Local SQLite storage (
codes.db) with an indexed codes table.
- Columns:
id (auto-increment), code (unique text), created_at (timestamp).
- Reset button in the bottom-right corner with a confirmation overlay to prevent
accidental deletion.
User Interface
- Built with GPUI 0.2.2 (native GPU-accelerated UI framework for Rust).
- Fullscreen window with auto-focus on startup -- no clicking needed to start
scanning.
- Large status display showing the last scanned code and its result.
- Live camera preview in Interactive mode.
- Red confirmation overlay when resetting the database.
Installation / Usage
Windows (Release)
- Download the latest
.exe from the Releases tab.
- Run
card-counter.exe.
Development (Source build)
Prerequisites: Rust installed.
The database file codes.db will be created automatically in the working directory.
Shortcuts & UX
- The program auto-focuses on startup -- just start typing or scanning.
- Code entry: Type or scan digits directly. Non-digit input is ignored.
- Reset DB: Click the "RESET" button at the bottom right, then confirm
on the red overlay by clicking "OUI" (Yes).
Technical Stack
| Component |
Library / Technology |
| UI Framework |
GPUI 0.2.2 |
| Database |
SQLite via rusqlite 0.39.0 (bundled) |
| Camera |
nokhwa 0.10.10 (input-native backend) |
| Barcode Decode |
rxing 0.6.0 (MultiUseMultiFormatReader) |
| Async Runtime |
smol 2.0.2 + tokio 1.52.3 |
| Dialogs |
rfd 0.17.2 |
Project Status
Abandoned. The project was built as a rapid prototype for a specific event
(Festi'Foll 2026) and is not maintained. The webcam scanning path was never
fully stabilized, and there are no plans to fix remaining issues. Feel free to
fork or request ownership transfer.