{"id":28794433,"url":"https://github.com/renderghost/pokemon-scanner","last_synced_at":"2025-08-09T23:35:27.830Z","repository":{"id":294162966,"uuid":"983490194","full_name":"renderghost/pokemon-scanner","owner":"renderghost","description":"A Scanner for Identifying Pokemon","archived":false,"fork":false,"pushed_at":"2025-05-19T06:14:34.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T02:43:43.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renderghost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-14T13:08:17.000Z","updated_at":"2025-05-19T06:14:38.000Z","dependencies_parsed_at":"2025-05-19T07:28:16.957Z","dependency_job_id":"404f89b5-471e-470b-84b3-de699a373122","html_url":"https://github.com/renderghost/pokemon-scanner","commit_stats":null,"previous_names":["renderghost/pokemon-scanner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renderghost/pokemon-scanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderghost%2Fpokemon-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderghost%2Fpokemon-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderghost%2Fpokemon-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderghost%2Fpokemon-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renderghost","download_url":"https://codeload.github.com/renderghost/pokemon-scanner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderghost%2Fpokemon-scanner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269653993,"owners_count":24454317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-18T02:38:09.550Z","updated_at":"2025-08-09T23:35:27.821Z","avatar_url":"https://github.com/renderghost.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pokemon Scanner\n\n## 1. User Experience (UX)\n- Full-screen camera view that fills the entire app window\n- Status overlay in the top-left corner showing current state:\n  - \"No Card Detected\"\n  - \"Card Detected\"\n  - \"Identifying Pokemon...\"\n  - \"Identified as {PokemonName}\"\n  - \"Could not identify Pokemon\"\n- Real-time bounding box drawn around detected cards\n- Start/Stop scanning controls at the bottom of the screen\n- Debug information overlay in development mode\n\n## 2. Features\n- Real-time camera access and video streaming\n- Computer vision-based card detection\n- Optical Character Recognition (OCR) for text extraction\n- Pokemon name identification using PokeAPI\n- Responsive design that works on both desktop and mobile\n- Debug mode for development\n- Error handling and user feedback\n- Performance optimizations (throttling, worker management)\n- Memory management for long-running operations\n\n## 3. Requirements\n- Modern web browser (Chrome recommended)\n- Device with camera access\n- Internet connection for API access\n- Proper HTTPS setup for camera permissions\n- Sufficient lighting for card detection\n- Physical Pokemon cards for scanning\n\n## 4. Technologies Used\n- Next.js for application framework\n- React for UI components\n- TensorFlow.js for card detection\n- Tesseract.js for OCR\n- PokeAPI for Pokemon data\n- Web APIs:\n  - MediaDevices API for camera access\n  - Canvas API for image processing\n  - RequestAnimationFrame for smooth rendering\n\n## 5. Special Notes\n- Always use @latest tag when installing npm packages\n- Never specify exact versions in package.json\n- Handle Tesseract.js worker lifecycle properly\n- Clean up TensorFlow resources to prevent memory leaks\n- Throttle intensive operations (detection, OCR, API calls)\n- Support graceful degradation when features aren't available\n- Debug mode toggles extra logging and visualization\n- Error boundaries catch and handle component failures\n- TypeScript types ensure type safety throughout the app\n- JSDoc comments document component purposes and usage\n\n# Pokémon Scanner\n\nA real-time web application that uses your device's camera and computer vision to identify Pokémon cards. Simply show a Pokémon card to your camera, and the app will detect the card, read the text, and identify the Pokémon.\n\n![Pokémon Scanner Demo](https://via.placeholder.com/800x400?text=Pokemon+Scanner+Demo)\n\n## Features\n\n- **Real-time Card Detection**: Uses TensorFlow.js to detect when a card is present in the camera view\n- **Bounding Box Visualization**: Draws a highlight box around detected cards\n- **Optical Character Recognition (OCR)**: Uses Tesseract.js to extract text from cards\n- **Pokémon Identification**: Matches extracted text against the PokéAPI database\n- **Responsive Design**: Works on desktop and mobile browsers\n- **Status Feedback**: Provides real-time status updates during the scanning process\n- **Type-Safe Implementation**: Built with TypeScript for robust error prevention\n\n## Requirements\n\n- Modern web browser (Chrome recommended)\n- Device with camera\n- Stable internet connection\n- Pokémon cards to scan\n\n## Installation\n\n### Prerequisites\n\n- Node.js 18.x or higher\n- npm 9.x or higher\n\n### Setup\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/pokemon-scanner.git\ncd pokemon-scanner\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Create a `.env.local` file in the root directory (optional):\n\n```\n# Environment variables (if needed)\nNEXT_PUBLIC_DEBUG=false\n```\n\n## Usage\n\n### Development Mode\n\nRun the development server:\n\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser.\n\n### Production Build\n\nBuild the application for production:\n\n```bash\nnpm run build\n```\n\nStart the production server:\n\n```bash\nnpm run start\n```\n\n### Using the App\n\n1. Grant camera permissions when prompted\n2. Hold a Pokémon card in front of your camera\n3. Ensure good lighting and minimal background clutter\n4. Hold the card steady until it's detected (outlined with a gold box)\n5. Wait for the app to process the text and identify the Pokémon\n6. View the result in the status box in the top-left corner\n\n## Technical Architecture\n\n### Core Technologies\n\n- **Next.js**: React framework for server-rendered applications\n- **TypeScript**: Type-safe JavaScript superset\n- **Tailwind CSS**: Utility-first CSS framework with custom \"bones\" design system\n- **TensorFlow.js**: Machine learning library for card detection\n- **Tesseract.js**: OCR engine for text extraction\n- **PokéAPI**: RESTful API for Pokémon data\n\n### Component Structure\n\n- **CameraFeed**: Manages camera access and video display\n- **BoundingBoxCanvas**: Renders detection boxes over video\n- **StatusOverlay**: Displays current state and results\n- **useScanner**: Custom hook that orchestrates detection, OCR, and identification\n\n### Processing Pipeline\n\n1. **Card Detection**: Uses TensorFlow COCO-SSD model to identify card-like objects\n2. **Text Extraction**: Crops the detected card region and performs OCR\n3. **Pokémon Identification**: Uses fuzzy matching to compare extracted text against Pokémon names\n4. **Result Display**: Updates UI with identification results\n\n## Deployment\n\n### Deploying to Vercel\n\nThe easiest way to deploy the application is with Vercel:\n\n1. Push your code to a GitHub repository\n2. Import the project in the Vercel dashboard\n3. Configure environment variables if needed\n4. Deploy\n\n### Manual Deployment\n\nFor other hosting platforms:\n\n1. Build the application:\n\n```bash\nnpm run build\n```\n\n2. Deploy the `.next` folder and supporting files according to your hosting provider's instructions.\n\n3. Ensure your hosting environment supports:\n   - Node.js runtime (if using SSR features)\n   - HTTPS (required for camera access)\n\n## Troubleshooting\n\n### Camera Issues\n\n- **Camera Not Working**: Ensure your browser has permission to access the camera\n- **Permission Denied**: Check browser settings and grant camera access\n- **Black Screen**: Refresh the page or try a different browser\n\n### Detection Issues\n\n- **Card Not Detected**: Ensure good lighting and hold the card steady\n- **False Detections**: Remove other card-like objects from the camera view\n- **Slow Performance**: Close other browser tabs and applications\n\n### Identification Issues\n\n- **Wrong Pokémon Identified**: Hold the card closer and ensure the name is clearly visible\n- **No Pokémon Identified**: Make sure the card is a genuine Pokémon card with visible text\n- **API Errors**: Check your internet connection\n\n## Development Commands\n\n- `npm run dev` - Start development server\n- `npm run build` - Build for production\n- `npm run start` - Start production server\n- `npm run lint` - Run ESLint\n- `npm run format` - Format code with Prettier\n\n## Credits and Acknowledgments\n\n- [PokéAPI](https://pokeapi.co/) for Pokémon data\n- [TensorFlow.js](https://www.tensorflow.org/js) for object detection\n- [Tesseract.js](https://tesseract.projectnaptha.com/) for OCR\n- [Next.js](https://nextjs.org/) for the React framework\n- [Tailwind CSS](https://tailwindcss.com/) for styling\n- Pokémon is a trademark of Nintendo, Creatures Inc., and GAME FREAK inc.\n\n## License\n\nMIT License - See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenderghost%2Fpokemon-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenderghost%2Fpokemon-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenderghost%2Fpokemon-scanner/lists"}