Open
Conversation
…> frontend workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Docker AI Tutor Implementation
Summary
This PR implements a fully dockerized AI Chess Tutor that analyzes chess moves using Stockfish and provides educational feedback via OpenAI GPT-4.
Key Features
Architecture
Services
How to Run
Prerequisites
Quick Start - Mock Mode (No API Key Needed)
Navigate to project root
cd /path/to/Y_Stem_and_Chess/reactStart all services
Access the application
Stop services
Setup with Real OpenAI Integration
Create environment file
Edit
chessServer/.envwith your API keyIMPORTANT: Make sure these lines are NOT commented out (no
#at start):Start services
Verify OpenAI mode is active
Check logs for:
[OpenAI] Running in OPENAI mode with model: gpt-4oDetached Mode (Background)
Testing
Quick Test Commands
Expected Result: ✅ 133/133 tests pass in ~10 seconds
Step-by-Step Test Instructions
Step 1: Run Local Tests
Expected Output:
Step 2: Test Docker Build
Expected: All 3 images build successfully
Step 3: Test Docker Deployment
Expected Output:
Step 4: Check Logs for Errors
✅ Expected: No errors or critical warnings
Step 6: Clean Up
Cross-Platform Compatibility
Platform Support
Docker Images
node:18.20.8(multi-arch) - Chess Servernode:18.20.8-slim(multi-arch) - Stockfish Servernginx:alpine(multi-arch) - FrontendStockfish
apt-getfrom Debian repositoriesTroubleshooting
Issue: Tests fail with port conflicts
Solution: Stop Docker containers before running tests
Issue: "Cannot connect to Docker daemon"
Solution: Start Docker Desktop application
Issue: Frontend shows 404
Solution: Ensure you're accessing http://localhost:3001 (not 3000)
Issue: Stockfish timeout errors
Solution: Depth is already optimized at 8. Check if container is running:
Issue: OpenAI not working (still in mock mode)
Solution: Check your
.envfile - ensure variables are NOT commented out:#from start ofOPENAI_API_KEYandLLM_MODElinesLLM_MODE=openai(not mock)Issue: "Module not found" errors
Solution: Reinstall dependencies
PR Review Checklist
For Reviewers - Complete This Checklist:
Prerequisites
Step 1: Clone and Test
git checkout feature/LLM_Stockfish_integrationdocker-compose -f docker-compose.aitutor.yml downcd chessServer && npm install && npm testStep 2: Docker Build
cd ..docker-compose -f docker-compose.aitutor.yml buildStep 3: Deployment Test
docker-compose -f docker-compose.aitutor.yml up -ddocker psStep 4: Clean Up
docker-compose -f docker-compose.aitutor.yml down