How khinyadanarmoe/jtrax-mobile-app works
This is a mobile chess-academy app for students and parents. Students sign in, view learning activity, and play computer, friend, or room games; parents review children’s progress and manage academy-related information, including tournament registration. The app also supports puzzles, Lichess-linked ratings, tournaments, and notifications. The graph emphasizes these product workflows and shared session/API layers. Some routes and integrations are represented from the file tree and SOURCE INDEX; edges are limited to relationships shown there or in excerpts.
Main entry points: api.ts Backend client · ParentData.tsx Family data · session.tsx Session provider · index.tsx Student home
Components 29
Identity and access
- Sign-in
src/app/index.tsx - Session provider
src/lib/session.tsx - Secure token store
src/lib/token-store.ts - Backend client
src/lib/api.ts - Push notifications
src/lib/push.ts
Student learning
- Student home
src/app/student/index.tsx - Puzzle practice
src/lib/puzzles.ts - Lichess connection
src/lib/lichess.ts - Student challenges
src/app/student/challenge.tsx
Chess play
- Play selection
src/app/student/play/index.tsx - Computer game screen
src/app/student/play/ai.tsx - Friend game
src/app/student/play/friend.tsx - Room game
src/app/student/play/room/[roomId].tsx - Opponent selection
src/components/game/useAiOpponent.ts - Chess engines
src/lib/engines/maia-engine.ts - Engine runtimes
src/components/game/OnnxWebView.tsx - Chess board
src/components/game/ChessBoard.tsx - Chess rules
src/lib/chess-core.ts - Room session
src/components/game/useRoom.ts - Game API
src/lib/games.ts
Parent portal
- Parent dashboard
src/app/parent/index.tsx - Family data
src/components/parent/ParentData.tsx - Parent data transforms
src/lib/parent-v2-data.ts - Child progress
src/app/parent/child/[childId]/index.tsx - Attendance
src/app/parent/attendance.tsx - Tournament services
src/lib/tournaments.ts - Tournament detail
src/app/tournament/[id].tsx
Other components
- Student or parent
- JTrax backend
Connections 28
- Student or parent → Sign-in: signs in
src/app/index.tsx - Sign-in → Session provider: uses session
src/app/index.tsx - Session provider → Backend client: authenticates through
src/lib/session.tsx - Session provider → Secure token store: restores and stores
src/lib/session.tsx - Session provider → Push notifications: registers devices
src/lib/session.tsx - Backend client → JTrax backend: sends API requests
src/lib/api.ts - Student home → Puzzle practice: loads puzzle data
src/app/student/index.tsx - Student home → Lichess connection: loads rating
src/app/student/index.tsx - Student home → Backend client: loads activity
src/app/student/index.tsx - Play selection → Computer game screen: offers computer play
- Play selection → Friend game: offers friend play
- Play selection → Room game: offers room play
- Computer game screen → Opponent selection: requests opponent move
src/app/student/play/ai.tsx - Opponent selection → Chess engines: routes move request
src/components/game/useAiOpponent.ts - Opponent selection → Engine runtimes: uses mounted runtimes
src/components/game/useAiOpponent.ts - Computer game screen → Chess board: renders game board
src/app/student/play/ai.tsx - Chess board → Chess rules: uses chess rules
src/components/game/ChessBoard.tsx - Room game → Room session: manages room session
- Room session → Game API: uses game operations
src/components/game/useRoom.ts - Room session → Backend client: calls backend
src/components/game/useRoom.ts - Parent dashboard → Family data: displays family data
src/app/parent/index.tsx - Family data → Backend client: loads and updates
src/components/parent/ParentData.tsx - Family data → Parent data transforms: derives progress
src/components/parent/ParentData.tsx - Child progress → Family data: shows child details
src/app/parent/child/[childId]/index.tsx - Attendance → Family data: shows attendance
- Parent dashboard → Tournament services: shows tournament information
src/app/parent/index.tsx - Tournament detail → Tournament services: loads tournament
src/app/tournament/[id].tsx - Tournament services → Backend client: uses backend