Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
954cbf7
feat: add new scenarios for Pawn, Bishop, Knight, Rook, Queen, and King
Oct 28, 2025
8fce1a8
chore: add node-schedule dependency for activity scheduler
Nov 3, 2025
e0c0f02
feat: add timed instruction popup with dynamic loading bar and fade-out
Nov 3, 2025
b6694ab
fix(ui): improve responsiveness, spacing, and error handling in lesso…
Nov 5, 2025
d6b93de
fix(ui): improve chess lessons for logged students
Nov 14, 2025
6b7a922
modularized the codebase
laharigandrapu11 Nov 15, 2025
4fcce2a
Merge branch 'main' of https://github.com/YSTEMandChess/react into co…
laharigandrapu11 Nov 15, 2025
44d85bd
fix: test cases
laharigandrapu11 Nov 15, 2025
3f79bfd
fix: test build
laharigandrapu11 Nov 15, 2025
078ac34
fix: test build
laharigandrapu11 Nov 15, 2025
80faf80
fix: test build
laharigandrapu11 Nov 15, 2025
378dc69
fix: test build
laharigandrapu11 Nov 15, 2025
582d381
fix: test build
laharigandrapu11 Nov 15, 2025
671ac90
Merge pull request #98 from YSTEMandChess/feature/lessons-flow-enhanc…
yalrubaye Nov 16, 2025
d98c8c2
Merge branch 'main' of https://github.com/YSTEMandChess/react into co…
laharigandrapu11 Nov 16, 2025
095d54d
fix: unlock all lessons for guests and simplify backend handling
Nov 17, 2025
f8e8107
feat: replace alert with modal for lesson completion
Nov 18, 2025
445b1ea
fix(knight): update Training 1 FEN to remove illegal pawns
Nov 18, 2025
f2b978b
test: mock SweetAlert2 in Jest to prevent CI import errors
Nov 18, 2025
693f563
test: update LessonsSelection test to remove outdated Loading assertion
Nov 18, 2025
31fcf7b
test: update LessonsSelection test to remove outdated Loading assertion
Nov 18, 2025
575dae2
test: update lesson visibility expectation for guests
Nov 18, 2025
15a3946
Merge pull request #102 from YSTEMandChess/feature/lessons-flow-enhan…
F-Hejazi Nov 18, 2025
0d38a3d
Merge branch 'main' of https://github.com/YSTEMandChess/react into co…
laharigandrapu11 Nov 18, 2025
71432a3
Merge pull request #100 from YSTEMandChess/code-modularization
laharigandrapu11 Nov 20, 2025
fbc42e4
feat: add student profile animations and interactions (#103)
laharigandrapu11 Nov 26, 2025
a9a04aa
feat: update UI styling across profile and auth pages (#104)
laharigandrapu11 Dec 6, 2025
a6e6802
Fix environment import paths and configuration
yalrubaye Dec 16, 2025
a998df3
Add environment configuration files
yalrubaye Dec 16, 2025
442fad3
Merge pull request #106 from YSTEMandChess/main-fixed
yalrubaye Dec 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@ jobs:

- name: Create environment file
run: |
mkdir -p src/environments
cat <<EOF > src/environments/environment.js
mkdir -p src/core/environments
cat <<EOF > src/core/environments/environment.ts
export const environment = {
production: false,
agora: {
appId: '${{ secrets.APP_ID }}',
},
email: {
user: '${{ secrets.EMAIL_USER || '' }}',
pass: '${{ secrets.EMAIL_PASS || '' }}'
},
urls: {
middlewareURL: '${{ secrets.MIDDLEWARE_URL }}',
chessClientURL: '${{ secrets.CHESS_CLIENT_URL }}',
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ react-ystemandchess/environment.prod.ts
react-ystemandchess/environment.ts
environment.php
.env
environment.*
environment.*.local
environment.secret.*
create_envs.sh
create_env.sh
create_dev_envs.sh
Expand Down
46 changes: 39 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,16 @@ Each service runs independently and requires its own terminal window. Start the

Handles user authentication, database operations, and coordinates other services.


```bash
cd middlewareNode
npm install # Install backend dependencies
npm start # Start the API server
npm start # Start the API server (runs from src/server.js)
```

The server typically runs on port 8000. You should see "MongoDB Connected..." when it starts successfully.

> **Note**: After modularization, the entry point is now `src/server.js`

**If you intend to test the mentor and student login pages, you may use the following usernames and passwords respectively:**

mentor 123123123
Expand Down Expand Up @@ -166,11 +167,13 @@ Manages chess game logic, validates moves, and handles real-time gameplay:
```bash
cd chessServer
npm install
npm start
npm start # Starts from src/index.js
```

Defaults to port 3000 (or the next available port if taken).

> **Note**: After modularization, the entry point is now `src/index.js`

---

#### Chess Engine Server
Expand All @@ -180,11 +183,13 @@ Integrates Stockfish for AI opponents and move analysis:
```bash
cd stockfishServer
npm install
npm start
npm start # Starts from src/index.js
```

This service usually runs on port 8080.

> **Note**: After modularization, the entry point is now `src/index.js`

---

#### Chess Client (Testing Interface)
Expand All @@ -198,8 +203,9 @@ Run the http server on port 80 using: `npx http-server -p 80` to ensure that the
You can use the **Live Server extension in VS Code** to open the HTML files for local testing of the chess board:

* **Board only:** Right-click `index.html` → "Open with Live Server"
* **Board with controls:** Right-click `parent.html` → "Open with Live Server"
* **Mentor/Student interaction:** Right-click `both.html` → "Open with Live Server"
* **Archived files:** `archive/parent.html` and `archive/both.html` contain legacy testing interfaces

> **Note**: Old HTML test files have been moved to `archive/` directory after modularization

---

Expand Down Expand Up @@ -231,4 +237,30 @@ git checkout -b my-branch-name

---

You’re all set! Happy coding and thank you for contributing to educational equity! 🎯♟️
## Project Structure

This project has been recently modularized for better organization and maintainability. Key structural changes:

- **All Node.js services** now have their code in a `src/` directory
- **React app** uses a feature-based architecture with:
- `components/` - Reusable UI components
- `features/` - Feature modules (auth, lessons, student, mentor, etc.)
- `core/` - Core infrastructure (services, types, utils)
- `assets/` - Static assets and images
- **Configuration files** are organized in the `config/` directory
- **Kubernetes deployments** are in the `yaml/` directory

---

## Docker Deployment

To run all services using Docker:

```bash
cd config
docker-compose up
```

---

You're all set! Happy coding and thank you for contributing to educational equity! 🎯♟️
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions chessServer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "chess-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "src/index.js",
"scripts": {
"start": "nodemon index.js",
"start": "nodemon src/index.js",
"test": "jest --detectOpenHandles --forceExit"
},
"keywords": [],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 10 additions & 2 deletions create_travis_envs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ printf "Creating environment files and variables\n\n"

#Creating environment files and variables for react-ystemandchess
printf "Creating environment files for react-ystemandchess\n"
cd react-ystemandchess/src && mkdir environments
cd environments
cd react-ystemandchess/src && mkdir -p core/environments
cd core/environments

#Creating and adding environment.js file and variables
touch environment.js
Expand All @@ -14,6 +14,10 @@ printf " production: false,\n" >> environment.js
printf " agora: {\n" >> environment.js
printf " appId: ' ',\n" >> environment.js
printf " },\n" >> environment.js
printf " email: {\n" >> environment.js
printf " user: '',\n" >> environment.js
printf " pass: ''\n" >> environment.js
printf " },\n" >> environment.js
printf " urls: {\n" >> environment.js
printf " middlewareURL: 'http://127.0.0.1:8000',\n" >> environment.js
printf " chessClientURL: 'http://localhost',\n" >> environment.js
Expand All @@ -29,6 +33,10 @@ printf " production: false,\n" >> environment.prod.js
printf " agora: {\n" >> environment.prod.js
printf " appId: ' ',\n" >> environment.prod.js
printf " },\n" >> environment.prod.js
printf " email: {\n" >> environment.prod.js
printf " user: '',\n" >> environment.prod.js
printf " pass: ''\n" >> environment.prod.js
printf " },\n" >> environment.prod.js
printf " urls: {\n" >> environment.prod.js
printf " middlewareURL: 'http://127.0.0.1:8000',\n" >> environment.prod.js
printf " chessClientURL: 'http://localhost',\n" >> environment.prod.js
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions middlewareNode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions middlewareNode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "middleware",
"version": "1.0.0",
"description": "API for Y STEM And Chess Inc",
"main": "server.js",
"main": "src/server.js",
"dependencies": {
"aws-sdk": "^2.889.0",
"axios": "^0.21.1",
Expand All @@ -22,7 +22,7 @@
"uuid": "^8.3.2"
},
"scripts": {
"start": "nodemon server.js"
"start": "nodemon src/server.js"
},
"author": "",
"license": "ISC",
Expand Down
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions middlewareNode/src/config/custom-environment-variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"mongoURI": "MONGO_URI",
"jwtSecret": "JWT_SECRET",
"indexKey": "INDEX_KEY",

"corsOptions": { "origin": "CORS_ORIGIN" },

"email": {
"user": "EMAIL_USER",
"pass": "EMAIL_PASS"
},

"user": "EMAIL_USER",
"senderEmail": "SENDER_EMAIL",

"clientId": "GOOGLE_CLIENT_ID",
"clientSecret": "GOOGLE_CLIENT_SECRET",
"redirectUri": "GOOGLE_REDIRECT_URI",
"refreshToken": "GOOGLE_REFRESH_TOKEN",

"basepath": "BASEPATH",

"awsAccessKey": "AWS_ACCESS_KEY_ID",
"awsSecretKey": "AWS_SECRET_ACCESS_KEY",

"appID": "AGORA_APP_ID",
"uid": "AGORA_UID",
"customerId": "AGORA_CUSTOMER_ID",
"customerCertificate": "AGORA_CUSTOMER_CERT",

"server": { "port": "PORT" }
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading