soroban-abacus-flashcards/apps/web
Thomas Hallock 5f4f1fde33 feat(practice): add document scanning with multi-quad tracking
Adds real-time document detection to the camera capture on session
summary pages. Uses OpenCV.js for edge detection and perspective
correction.

Key features:
- Multi-quad tracking: detects ALL quadrilaterals, not just largest
- Scores quads by stability over time (filters transient detections)
- Visual feedback: yellow (detecting) → green (stable) → bright green (locked)
- Auto-crops and deskews captured documents
- Falls back to raw photo if no document detected

Technical details:
- OpenCV.js (~8MB) lazy-loaded only when camera opens
- Tracks quads across frames by matching corner positions
- Filters by area (15-95% of frame) and document aspect ratios
- Locks on after 5 frames with 50%+ stability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-31 11:57:50 -06:00
..
.claude refactor(summary): restructure session report with two-column desktop layout 2025-12-31 10:52:29 -06:00
.storybook
__tests__ feat(observer): add live active session item to history list 2025-12-29 10:05:57 -06:00
content/blog fix(practice): improve mobile layout + floating abacus positioning 2025-12-18 19:49:59 -06:00
data feat(bkt): implement adaptive skill targeting with validated convergence 2025-12-15 17:16:18 -06:00
docs fix(practice): improve mobile layout + floating abacus positioning 2025-12-18 19:49:59 -06:00
drizzle feat(practice): add photo attachments for practice sessions 2025-12-30 20:33:18 -06:00
e2e feat(classroom): implement entry prompts system 2025-12-29 16:41:47 -06:00
public feat(practice): add document scanning with multi-quad tracking 2025-12-31 11:57:50 -06:00
scripts feat(dashboard): add skill progress chart with trend analysis and timing awareness 2025-12-21 14:37:15 -06:00
src feat(practice): add document scanning with multi-quad tracking 2025-12-31 11:57:50 -06:00
test-results feat(observer): add live results panel and session progress indicator 2025-12-28 16:49:00 -06:00
.dockerignore.test
.gitignore
CARD_SORTING_PORT_PLAN.md
COMPLEMENT_RACE_PORT_PLAN.md
DEVELOPMENT_STANDARDS.md
LINTING.md
README.md fix(practice): improve mobile layout + floating abacus positioning 2025-12-18 19:49:59 -06:00
biome.jsonc
drizzle.config.ts
eslint.config.js
next-env.d.ts
next.config.js feat(practice): add document scanning with multi-quad tracking 2025-12-31 11:57:50 -06:00
package.json feat(practice): add document scanning with multi-quad tracking 2025-12-31 11:57:50 -06:00
panda.config.ts feat(practice): add student notes with animated modal + BKT improvements 2025-12-18 06:39:04 -06:00
playwright.config.ts feat: API authorization audit + teacher enrollment UI + share codes 2025-12-27 19:27:09 -06:00
pnpm-lock.yaml
server.js
svg-processing-test.js
test-arcade-api.sh
test-flashcards-final.pdf
test-flashcards.pdf
test-simplified.pdf
test_fullscreen_persistence.html
test_panda_simple.html
tsconfig.json
tsconfig.server.json
vitest.config.ts

README.md

Soroban Web Application

Interactive web application for learning soroban (Japanese abacus) calculation with tutorials, practice sessions, and multiplayer arcade games.

Features

  • Tutorials - Step-by-step lessons for learning soroban techniques
  • Practice Sessions - Adaptive practice with progressive help system
  • Arcade Games - Multiplayer educational games for reinforcement
  • Worksheet Generator - Create printable math worksheets

Getting Started

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Run type checks
npm run type-check

# Run all quality checks
npm run pre-commit

Documentation

Components

Component Description
Decomposition Display Interactive mathematical decomposition visualization
Worksheet Generator Math worksheet creation with Typst PDF generation

Games

Game Description
Arcade System Modular multiplayer game architecture
Know Your World Geography quiz game

Developer Documentation

Located in .claude/ directory:

  • CLAUDE.md - Project conventions and guidelines
  • CODE_QUALITY_REGIME.md - Quality check procedures
  • GAME_SETTINGS_PERSISTENCE.md - Game config architecture
  • Z_INDEX_MANAGEMENT.md - Z-index layering system
  • DEPLOYMENT.md - Deployment and CI/CD

Project Structure

apps/web/
├── src/
│   ├── app/                 # Next.js App Router pages
│   ├── components/          # Shared React components
│   │   ├── decomposition/   # Math decomposition display
│   │   ├── practice/        # Practice session components
│   │   └── tutorial/        # Tutorial player components
│   ├── contexts/            # React context providers
│   ├── arcade-games/        # Multiplayer game implementations
│   ├── hooks/               # Custom React hooks
│   ├── lib/                 # Utilities and libraries
│   └── db/                  # Database schema and queries
├── .claude/                 # Developer documentation
├── public/                  # Static assets
└── styled-system/           # Generated Panda CSS

Technology Stack

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Panda CSS
  • Database: SQLite with Drizzle ORM
  • Abacus Visualization: @soroban/abacus-react

Parent: Main README - Complete project overview Abacus Component: packages/abacus-react - Abacus visualization library