# itzpranshul/analysis-board architecture

> Architecture diagram of the GitHub repository itzpranshul/analysis-board, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/itzpranshul/analysis-board
- Repository: https://github.com/itzpranshul/analysis-board

## Overview

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: [`chess_engine/src/App.jsx`](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/App.jsx) (React application), [`chess-backend/server.js`](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/server.js) (HTTP and socket server), [`chess-backend/controllers/stockfishController.js`](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/controllers/stockfishController.js) (Analysis controller), [`chess-backend/routes/stockfishRoutes.js`](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/stockfishRoutes.js) (Analysis routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_webapp["React application<br/>[App.jsx]"]
  node_boardpage["Chess board<br/>[ChessBoardPage.jsx]"]
  node_boardui["Board controls"]
  node_movehistory["Move history<br/>[MoveHistory.jsx]"]
  node_analysisdisplay["Analysis displays"]
  node_evaluation["Evaluation display"]
  node_home["Home page<br/>[HomeComponent.jsx]"]
  node_shop["Chessboard shop"]
end

subgraph group_analysis["Chess analysis"]
  node_stockcontroller["Analysis controller"]
  node_stockfish["Stockfish engine"]
end

subgraph group_accounts["Accounts"]
  node_login["Login page<br/>[LoginPage.jsx]"]
  node_signup["Sign-up page<br/>[SignUpPage.jsx]"]
  node_reset["Password reset"]
  node_authcontroller["Authentication controller<br/>[authController.js]"]
  node_users[("User records<br/>[User.js]")]
  node_authmiddleware["Token verification<br/>[authMiddleware.js]"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
  node_privateroute["Protected page gate<br/>[PrivateRoute.jsx]"]
end

subgraph group_community["Community features"]
  node_communitypage["Community page"]
  node_discussionpage["Discussion page<br/>[DiscussionPage.jsx]"]
  node_createpost["Create post<br/>[CreatePostPage.jsx]"]
  node_chatroute["Chat history route<br/>[chatRoutes.js]"]
  node_message[("Chat messages<br/>[Message.js]")]
end

subgraph group_service["Backend service"]
  node_stockroutes["Analysis routes<br/>[stockfishRoutes.js]"]
  node_authroutes["Authentication routes<br/>[authRoutes.js]"]
  node_postroute["Post routes<br/>[post.js]"]
  node_server["HTTP and socket server<br/>[server.js]"]
end

node_player(("Player"))

node_player -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_boardpage
node_webapp -->|"routes to"| node_home
node_webapp -->|"routes to"| node_shop
node_webapp -->|"routes to"| node_login
node_webapp -->|"routes to"| node_signup
node_webapp -->|"routes to"| node_reset
node_webapp -->|"routes to"| node_communitypage
node_webapp -->|"routes to"| node_discussionpage
node_webapp -->|"routes to"| node_createpost
node_webapp -->|"guards"| node_privateroute
node_privateroute -->|"renders"| node_dashboard
node_boardpage -.->|"requests analysis"| node_stockroutes
node_stockroutes -->|"dispatches"| node_stockcontroller
node_stockcontroller -->|"runs analysis"| node_stockfish
node_stockcontroller -.->|"returns best line"| node_analysisdisplay
node_stockcontroller -.->|"returns score"| node_evaluation
node_login -->|"submits credentials"| node_authroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authcontroller -->|"reads and writes"| node_users
node_authmiddleware -.->|"authorizes"| node_dashboard
node_server -->|"mounts"| node_stockroutes
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_postroute
node_server -->|"mounts"| node_chatroute
node_chatroute -->|"reads messages"| node_message
node_server -->|"stores socket messages"| node_message

click node_webapp "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/App.jsx"
click node_boardpage "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/ChessBoardPage.jsx"
click node_boardui "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/assets/ChessBoardComponent.jsx"
click node_movehistory "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/assets/MoveHistory.jsx"
click node_analysisdisplay "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/assets/BestMoveDisplay.jsx"
click node_evaluation "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/assets/EvaluationDisplay.jsx"
click node_stockroutes "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/stockfishRoutes.js"
click node_stockcontroller "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/controllers/stockfishController.js"
click node_stockfish "https://github.com/itzpranshul/analysis-board/tree/main/chess-backend/stockfish/Stockfish"
click node_home "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/HomeComponent.jsx"
click node_shop "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/BuyChessboardComponent.jsx"
click node_login "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/LoginPage.jsx"
click node_signup "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/SignUpPage.jsx"
click node_reset "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/ResetPasswordPage.jsx"
click node_authroutes "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/authRoutes.js"
click node_authcontroller "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/controllers/authController.js"
click node_users "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/models/User.js"
click node_authmiddleware "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/middleware/authMiddleware.js"
click node_dashboard "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/DashboardPage.jsx"
click node_privateroute "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/components/PrivateRoute.jsx"
click node_communitypage "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/CommunityComponent.jsx"
click node_discussionpage "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/DiscussionPage.jsx"
click node_createpost "https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/CreatePostPage.jsx"
click node_postroute "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/post.js"
click node_chatroute "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/chatRoutes.js"
click node_message "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/models/Message.js"
click node_server "https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/server.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_boardpage,node_boardui,node_movehistory,node_analysisdisplay,node_evaluation,node_home,node_shop toneBlue
class node_stockcontroller,node_stockfish toneAmber
class node_login,node_signup,node_reset,node_authcontroller,node_users,node_authmiddleware,node_dashboard,node_privateroute toneMint
class node_communitypage,node_discussionpage,node_createpost,node_chatroute,node_message toneRose
class node_stockroutes,node_authroutes,node_postroute,node_server,node_player toneIndigo
```

## Components

### Web application

- [React application](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/App.jsx): `chess_engine/src/App.jsx`
- [Chess board](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/ChessBoardPage.jsx): `chess_engine/src/pages/ChessBoardPage.jsx`
- [Board controls](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/assets/ChessBoardComponent.jsx): `chess_engine/src/assets/ChessBoardComponent.jsx`
- [Move history](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/assets/MoveHistory.jsx): `chess_engine/src/assets/MoveHistory.jsx`
- [Analysis displays](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/assets/BestMoveDisplay.jsx): `chess_engine/src/assets/BestMoveDisplay.jsx`
- [Evaluation display](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/assets/EvaluationDisplay.jsx): `chess_engine/src/assets/EvaluationDisplay.jsx`
- [Home page](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/HomeComponent.jsx): `chess_engine/src/pages/HomeComponent.jsx`
- [Chessboard shop](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/BuyChessboardComponent.jsx): `chess_engine/src/pages/BuyChessboardComponent.jsx`

### Chess analysis

- [Analysis controller](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/controllers/stockfishController.js): `chess-backend/controllers/stockfishController.js`
- [Stockfish engine](https://github.com/itzpranshul/analysis-board/tree/main/chess-backend/stockfish/Stockfish): `chess-backend/stockfish/Stockfish`

### Accounts

- [Login page](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/LoginPage.jsx): `chess_engine/src/pages/LoginPage.jsx`
- [Sign-up page](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/SignUpPage.jsx): `chess_engine/src/pages/SignUpPage.jsx`
- [Password reset](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/ResetPasswordPage.jsx): `chess_engine/src/ResetPasswordPage.jsx`
- [Authentication controller](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/controllers/authController.js): `chess-backend/controllers/authController.js`
- [User records](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/models/User.js): `chess-backend/models/User.js`
- [Token verification](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/middleware/authMiddleware.js): `chess-backend/middleware/authMiddleware.js`
- [Dashboard](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/DashboardPage.jsx): `chess_engine/src/pages/DashboardPage.jsx`
- [Protected page gate](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/components/PrivateRoute.jsx): `chess_engine/src/components/PrivateRoute.jsx`

### Community features

- [Community page](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/CommunityComponent.jsx): `chess_engine/src/pages/CommunityComponent.jsx`
- [Discussion page](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/DiscussionPage.jsx): `chess_engine/src/pages/DiscussionPage.jsx`
- [Create post](https://github.com/itzpranshul/analysis-board/blob/main/chess_engine/src/pages/CreatePostPage.jsx): `chess_engine/src/pages/CreatePostPage.jsx`
- [Chat history route](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/chatRoutes.js): `chess-backend/routes/chatRoutes.js`
- [Chat messages](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/models/Message.js): `chess-backend/models/Message.js`

### Backend service

- [Analysis routes](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/stockfishRoutes.js): `chess-backend/routes/stockfishRoutes.js`
- [Authentication routes](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/authRoutes.js): `chess-backend/routes/authRoutes.js`
- [Post routes](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/routes/post.js): `chess-backend/routes/post.js`
- [HTTP and socket server](https://github.com/itzpranshul/analysis-board/blob/main/chess-backend/server.js): `chess-backend/server.js`

### Other components

- **Player**

## Connections

- 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
