fix: resolve all typechecking errors across codebase
This commit is contained in:
parent
73beedee5f
commit
3f3123c5af
7 changed files with 45 additions and 61 deletions
58
AGENTS.md
58
AGENTS.md
|
|
@ -1,46 +1,26 @@
|
|||
# Tschausepp - Jass Card Tracker
|
||||
|
||||
## Project Overview
|
||||
Mobile-first React web app for tracking Schaffhauser (Jass) card game rounds using camera and feature matching to detect and assign cards to players.
|
||||
Mobile-first React app for tracking Schaffhauser (Jass) card game rounds via camera.
|
||||
|
||||
## Tech Stack
|
||||
- React 18 (lightweight runtime)
|
||||
- TensorFlow.js (lite mode, CDN-hosted, ~5MB)
|
||||
- HTML5 Camera API (Mobile-friendly)
|
||||
- localStorage (JSON format, max 100 games)
|
||||
- React 18, TypeScript, Vite
|
||||
- TensorFlow.js (lite mode, CDN-hosted)
|
||||
- HTML5 Camera API (environment-facing preference)
|
||||
- localStorage (JSON, max 100 games)
|
||||
|
||||
## Key Implementation Details
|
||||
## Developer Commands
|
||||
- `npm run typecheck`: Run TypeScript check
|
||||
- `npm run build`: Build production version
|
||||
- `npm run preview`: Preview production build
|
||||
- **Dev Server**: Always running on `localhost:5173`. Do not start manually.
|
||||
|
||||
### Architecture
|
||||
- Component-based structure with 5 main screens:
|
||||
1. Setup Screen - Player management and game configuration
|
||||
2. Camera Screen - Live preview with card detection overlay
|
||||
3. Detection Component - Card boundary detection using image processing
|
||||
4. Assignment Component - Radial sector layout with auto-assignment
|
||||
5. Results Screen - Score calculation and game results
|
||||
6. History Screen - Game storage and export functionality
|
||||
## Architecture & Logic
|
||||
- **Screens**: Setup → Camera (with Detection/Assignment) → Results → History.
|
||||
- **Detection**: Custom image processing + color analysis for suits (Schellen, Schilten, Eicheln, Rosen).
|
||||
- **Assignment**: Uses radial sectors to assign detected cards to the nearest player.
|
||||
- **Storage**: Max 100 games in localStorage; follows `games → rounds → cards` structure.
|
||||
|
||||
### Development Commands
|
||||
- `npm run build` - Build production version
|
||||
- `npm run preview` - Preview production build
|
||||
- `npm run typecheck` - Run TypeScript type checking
|
||||
|
||||
### Development Server
|
||||
- A development server is always guaranteed to be running on localhost:5173
|
||||
- **Do not start the development server manually under any circumstances**
|
||||
|
||||
### Camera & Detection
|
||||
- Uses HTML5 Camera API with environment-facing camera preference
|
||||
- Card detection implemented with custom image processing techniques
|
||||
- Suit identification (Schellen, Schilten, Eicheln, Rosen) via color analysis
|
||||
- Auto-assignment based on radial sector + nearest player calculation
|
||||
|
||||
### Data Storage
|
||||
- Games stored in localStorage with maximum of 100 games
|
||||
- Data structure follows: games → rounds → cards with player assignments
|
||||
- JSON format for export functionality
|
||||
|
||||
### Mobile-First Design
|
||||
- Responsive UI optimized for mobile devices
|
||||
- Touch-friendly controls and interfaces
|
||||
- Camera access optimized for mobile environment
|
||||
## Reference Docs
|
||||
- `ML_SETUP_GUIDE.md`: ML pipeline architecture, training, and TF.js deployment.
|
||||
- `DETECTION_IMPROVEMENT_PLAN.md`: Roadmap for improving detection stability and accuracy.
|
||||
- `swiss_jass_suits.md`: Domain reference for Jass suit colors and iconography.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue