A hybrid system consisting of a Desktop Host Application (Electron/React) and a Mobile Companion App (Android/Kotlin). The mobile app scans Yu-Gi-Oh! cards (via OCR of the 8-digit passcode) and instantly sends them to the desktop app for management.
desktop/: The Electron + React application.android/: The Android Studio project source code.
The desktop app acts as the server. It displays scanned cards in a "Staging Area" and allows you to save them to a local SQLite database.
- Node.js (v16 or higher)
- npm
-
Navigate to the desktop directory:
cd desktop -
Install dependencies:
npm install
Note: If you encounter issues with
better-sqlite3, ensure you have build tools installed (Python, Visual Studio Build Tools on Windows, orbuild-essentialon Linux). -
Start the application (Development Mode):
npm run electron:dev
This will launch the React dev server and the Electron window.
To create a standalone executable (e.g., for Windows):
- Run the build command:
npm run dist
- The output files (Installer and
.exe) will be located in thedesktop/dist-electronfolder.
- Staging Area: Shows real-time feeds of cards scanned by the phone.
- Collection: View your saved cards.
- Socket Server: Runs on port
4000to listen for mobile connections. - Database: Stores cards locally in
userData/cards.db. - Portfolio: Track the value of your collection with realtime charts and history.
- Deck Builder: Build and manage decks (import .ydk supported).
- AI Assistant: Interact with your collection using natural language.
To use the AI Assistant features:
- Go to Google AI Studio and get a free Gemini API Key.
- In the Desktop App, click on the AI Assistant tab.
- Click the Settings (Gear) icon in the top right.
- Paste your API Key and click Save.
The mobile app uses the camera to detect card passcodes using Google ML Kit and sends them to the desktop via WebSockets.
- Android Studio Hedgehog or newer.
- An Android device (Physical device recommended for Camera testing).
- Open Android Studio.
- Select Open and choose the
androidfolder in this repository. - Allow Gradle to sync and download dependencies.
- Connect your Android device via USB.
- Click Run (Play button).
- Connect: On the start screen, enter the IP Address displayed in the Desktop App's sidebar (bottom left). Click "Connect".
- Scan: Point the camera at a Yu-Gi-Oh! card. Align the card within the frame.
- Send: The app automatically detects the 8-digit passcode. When detected, it sends the code to the desktop and shows a "Detected" message.
- Connection Failed: Ensure both devices are on the same Wi-Fi network. Check if your computer's firewall is blocking port
4000. - Camera Not Working: Check App Permissions in Android Settings.
- Card Not Found: The desktop app uses the YGOPRODeck API. Ensure the internet is active on the desktop.