How itzpranshul/analysis-board works
Chess AI Analyzer is a React chess application backed by an Express service: users play through board moves, inspect move history, and request Stockfish analysis. The app also exposes account, community, discussion, chat, and chessboard-shopping pages. The graph follows explicit route mounting and controller calls where sampled; some frontend page-to-service wiring is inferred only where the README documents the integration, and unsampled page internals are not expanded.
Main entry points: App.jsx React application · server.js HTTP and socket server · stockfishController.js Analysis controller · stockfishRoutes.js Analysis routes
Components 28
Web application
- React application
chess_engine/src/App.jsx - Chess board
chess_engine/src/pages/ChessBoardPage.jsx - Board controls
chess_engine/src/assets/ChessBoardComponent.jsx - Move history
chess_engine/src/assets/MoveHistory.jsx - Analysis displays
chess_engine/src/assets/BestMoveDisplay.jsx - Evaluation display
chess_engine/src/assets/EvaluationDisplay.jsx - Home page
chess_engine/src/pages/HomeComponent.jsx - Chessboard shop
chess_engine/src/pages/BuyChessboardComponent.jsx
Chess analysis
- Analysis controller
chess-backend/controllers/stockfishController.js - Stockfish engine
chess-backend/stockfish/Stockfish
Accounts
- Login page
chess_engine/src/pages/LoginPage.jsx - Sign-up page
chess_engine/src/pages/SignUpPage.jsx - Password reset
chess_engine/src/ResetPasswordPage.jsx - Authentication controller
chess-backend/controllers/authController.js - User records
chess-backend/models/User.js - Token verification
chess-backend/middleware/authMiddleware.js - Dashboard
chess_engine/src/pages/DashboardPage.jsx - Protected page gate
chess_engine/src/components/PrivateRoute.jsx
Community features
- Community page
chess_engine/src/pages/CommunityComponent.jsx - Discussion page
chess_engine/src/pages/DiscussionPage.jsx - Create post
chess_engine/src/pages/CreatePostPage.jsx - Chat history route
chess-backend/routes/chatRoutes.js - Chat messages
chess-backend/models/Message.js
Backend service
- Analysis routes
chess-backend/routes/stockfishRoutes.js - Authentication routes
chess-backend/routes/authRoutes.js - Post routes
chess-backend/routes/post.js - HTTP and socket server
chess-backend/server.js
Other components
- Player
Connections 27
- Player → React application: uses
- React application → Chess board: routes to
- React application → Home page: routes to
- React application → Chessboard shop: routes to
- React application → Login page: routes to
- React application → Sign-up page: routes to
- React application → Password reset: routes to
- React application → Community page: routes to
- React application → Discussion page: routes to
- React application → Create post: routes to
- React application → Protected page gate: guards
- Protected page gate → Dashboard: renders
- Chess board → Analysis routes: requests analysis
- Analysis routes → Analysis controller: dispatches
- Analysis controller → Stockfish engine: runs analysis
- Analysis controller → Analysis displays: returns best line
- Analysis controller → Evaluation display: returns score
- Login page → Authentication routes: submits credentials
- Authentication routes → Authentication controller: dispatches
- Authentication controller → User records: reads and writes
- Token verification → Dashboard: authorizes
- HTTP and socket server → Analysis routes: mounts
- HTTP and socket server → Authentication routes: mounts
- HTTP and socket server → Post routes: mounts
- HTTP and socket server → Chat history route: mounts
- Chat history route → Chat messages: reads messages
- HTTP and socket server → Chat messages: stores socket messages