How ystem-lms/react works
Y STEM and Chess is an educational platform for students, families, and mentors, combining chess learning and play with STEM tutoring and mentoring. The principal flow is a learner using the React application to select lessons or puzzles, with lesson progress and account activity served by the middleware API and stored in MongoDB. Separate real-time services support mentor/student chess sessions and Stockfish analysis. The README documents the service roles; sampled code confirms the route shell, lesson API calls, Stockfish socket hookup, and middleware mounts, but not every feature’s internal wiring.
Main entry points: server.js Middleware API · AppRoutes.tsx App routes · App.tsx React app · Lesson-overlay.tsx Chess lessons
Components 23
Learning application
- React app
react-ystemandchess/src/App.tsx - App routes
react-ystemandchess/src/AppRoutes.tsx - Chess lessons
react-ystemandchess/src/features/lessons/piece-lessons/lesson-overlay/Lesson-overlay.tsx - Chess puzzles
react-ystemandchess/src/features/puzzles/Puzzles.tsx - Learner profiles
react-ystemandchess/src/features/student/student-profile/NewStudentProfile.tsx - Analytics views
react-ystemandchess/src/Pages/Analytics/AnalyticsLayout.tsx - Chat widget
react-ystemandchess/src/components/ChatWidget/ChatWidget.tsx - Lesson progress
react-ystemandchess/src/features/lessons/piece-lessons/lesson-overlay/hooks/useLessonManager.ts - Engine socket hook
react-ystemandchess/src/features/lessons/piece-lessons/lesson-overlay/hooks/useSocketChessEngine.ts
Platform API
- Middleware API
middlewareNode/src/server.js - Authentication
middlewareNode/src/routes/auth.js - Lessons and puzzles API
middlewareNode/src/routes/lessons.js - Engagement APIs
middlewareNode/src/routes/activities.js - Analytics API
middlewareNode/src/routes/analytics.js - Chat service
middlewareNode/src/utils/chatService.js - Meetings API
middlewareNode/src/controllers/meetings.js
Chess services
- Game server
chessServer/src/index.js - Game sessions
chessServer/src/managers/GameManager.js - Stockfish server
stockfishServer/src/index.js - Engine sessions
stockfishServer/src/managers/StockfishManager.js
Platform data
- MongoDB
middlewareNode/src/config/db.js
Other components
- Student or mentor
- Stockfish engine
Connections 21
- Student or mentor → React app: uses
- React app → App routes: renders
- App routes → Chess lessons: routes to
- App routes → Chess puzzles: routes to
- App routes → Learner profiles: routes to
- App routes → Analytics views: routes to
- React app → Chat widget: displays
- Chess lessons → Lesson progress: tracks via
- Lesson progress → Middleware API: requests lessons
- Middleware API → Lessons and puzzles API: dispatches
- Middleware API → Authentication: dispatches
- Middleware API → Engagement APIs: dispatches
- Middleware API → Analytics API: dispatches
- Middleware API → Meetings API: dispatches
- Middleware API → Chat service: dispatches
- Middleware API → MongoDB: connects
- Engine socket hook → Stockfish server: opens socket
- Stockfish server → Engine sessions: dispatches
- Engine sessions → Stockfish engine: spawns and queries
- Game server → Game sessions: registers handlers
- Student or mentor → Game server: plays live chess