How angus-sun/matcha-dance works
MatchA Dance is a dance-challenge app: users browse challenges, compare webcam poses with a reference, record and submit attempts, then review scores and leaderboards. Uploads create challenges; authentication and profiles support participation and social browsing. The graph includes the documented scoring, performance-points, profile, and leaderboard capabilities. Some connections come from the README or SOURCE INDEX rather than complete source excerpts, so uncertain wiring is omitted.
Main entry points: supabaseClient.js Supabase data and auth · App.jsx App routing · ChallengePage.jsx Challenge attempt · server.js HTTP and socket server
Components 25
Challenge experience
- App routing
frontend/src/App.jsx - Challenge browsing
frontend/src/pages/Home.jsx - Challenge uploads
frontend/src/pages/UploadPage.jsx - Video pose extraction
frontend/src/utils/videoToReference.js - Challenge attempt
frontend/src/pages/ChallengePage.jsx - Video recording
frontend/src/components/VideoFeed.jsx - Webcam pose detection
frontend/src/hooks/usePoseDetection.js - Timed pose detection
frontend/src/hooks/useVideoTimedPoseDetection.js - Pose comparison
frontend/src/utils/poseUtil.js
Identity and profiles
- Authentication
frontend/src/pages/Auth.jsx - User and profile state
frontend/src/hooks/useUser.jsx - Profile and history
frontend/src/pages/Profile.jsx - My uploads
frontend/src/pages/MyUploads.jsx - Completed mimics
frontend/src/pages/MyMimics.jsx
Scoring and competition
- Score API client
frontend/src/utils/scoringAPI.js - Score and PP rules
backend/utils/scoring.js - Challenge leaderboard
frontend/src/components/Leaderboard.jsx - Global leaderboard
frontend/src/components/GlobalLeaderboard.jsx - Leaderboard page
frontend/src/pages/LeaderboardPage.jsx
Backend and data
- HTTP and socket server
backend/server.js - Supabase data and auth
frontend/src/utils/supabaseClient.js - Backend Supabase client
backend/supabase.js
Other components
- Dancer
- Supabase service
- MediaPipe Pose
Connections 32
- Dancer → App routing: uses
frontend/src/App.jsx - App routing → Challenge browsing: routes to
frontend/src/App.jsx - App routing → Challenge uploads: routes to
frontend/src/App.jsx - App routing → Challenge attempt: routes to
frontend/src/App.jsx - App routing → Authentication: routes to
frontend/src/App.jsx - App routing → Profile and history: routes to
frontend/src/App.jsx - App routing → Leaderboard page: routes to
frontend/src/App.jsx - Challenge uploads → Video pose extraction: extracts poses
frontend/src/pages/UploadPage.jsx - Challenge attempt → Video recording: records attempt
- Challenge attempt → Webcam pose detection: starts detection
frontend/src/pages/ChallengePage.jsx - Challenge attempt → Score API client: calculates PP
frontend/src/pages/ChallengePage.jsx - Webcam pose detection → Pose comparison: compares poses
frontend/src/hooks/usePoseDetection.js - Timed pose detection → Pose comparison: compares poses
frontend/src/hooks/useVideoTimedPoseDetection.js - Webcam pose detection → MediaPipe Pose: runs inference
frontend/src/hooks/usePoseDetection.js - Timed pose detection → MediaPipe Pose: runs inference
frontend/src/hooks/useVideoTimedPoseDetection.js - Challenge attempt → HTTP and socket server: submits score
frontend/src/pages/ChallengePage.jsx - HTTP and socket server → Score and PP rules: calculates PP
backend/server.js - HTTP and socket server → Backend Supabase client: reads and writes
backend/server.js - Authentication → Supabase data and auth: authenticates
frontend/src/pages/Auth.jsx - User and profile state → Supabase data and auth: loads profile
frontend/src/hooks/useUser.jsx - User and profile state → Profile and history: provides state
frontend/src/App.jsx - Profile and history → Score API client: loads stats
frontend/src/pages/Profile.jsx - Profile and history → Supabase data and auth: reads and updates
frontend/src/pages/Profile.jsx - Challenge browsing → Supabase data and auth: loads challenges
frontend/src/pages/Home.jsx - Challenge uploads → Supabase data and auth: stores challenge
frontend/src/pages/UploadPage.jsx - Challenge leaderboard → Supabase data and auth: loads scores
frontend/src/components/Leaderboard.jsx - Global leaderboard → Supabase data and auth: loads rankings
frontend/src/components/GlobalLeaderboard.jsx - Leaderboard page → Global leaderboard: renders
frontend/src/pages/LeaderboardPage.jsx - Score API client → HTTP and socket server: requests stats
- HTTP and socket server → Supabase service: queries data
backend/server.js - My uploads → Supabase data and auth: loads uploads
frontend/src/pages/MyUploads.jsx - Completed mimics → Supabase data and auth: loads attempts
frontend/src/pages/MyMimics.jsx