ChessNews is a modern web platform designed for chess enthusiasts. It aggregates chess news from multiple sources, tracks ELO ratings from the Turkish Chess Federation (TSF), and provides interactive chess tools for the community.
This project aims to create a comprehensive information and news resource for chess players, particularly focusing on the Turkish chess community. The platform serves as a centralized hub for chess news, ELO rankings, and interactive chess tools without competing with major platforms like Lichess or Chess.com.
- Real-time chess news aggregation from multiple sources
- Category-based filtering (TREND, NEW)
- Responsive news cards with modern UI
- Admin panel for news management
- Special focus on chess tournaments and communities in the Thrace region
- Automated ELO data extraction from TSF
- Real-time ELO rankings and player statistics
- Player search and filtering capabilities
- Direct profile links via FIDE ID
- Support for both ELO and UKD data from TSF sources
- Lichess Puzzles: Daily chess puzzles and training
- Lichess TV: Live chess broadcasts
- Classic Games: Historical chess games database
- Pro Games: Grandmaster games and analysis
- Featured games from famous chess masters as news content
- Comprehensive news management system
- ELO data management and updates
- Classic games database management
- User authorization and permission system
- Content management tools for authorized users
- Announcement system similar to university websites
- Chess rules, regulations, and guidelines
- Blog-style article publishing
- Optional WhatsApp support channel for community interaction
- React 18 - Modern UI framework
- TypeScript - Type safety and development experience
- Vite - Fast build tool and development server
- Material-UI (MUI) - Comprehensive UI component library
- React Router - Client-side routing
- Firebase - Authentication and real-time database
- Chess.js - Chess logic and game handling
- CM-Chessboard - Interactive chess board component
- Node.js - JavaScript runtime environment
- Express.js - Web application framework
- TypeScript - Type-safe backend development
- Axios - HTTP client for external API calls
- Node-Cron - Scheduled task management
- Cheerio - HTML parsing and web scraping
- PDF/XLS Parsers - Document processing for ELO data
- Firebase Firestore - Primary NoSQL database
- Firebase Authentication - User management
- Firebase Storage - File and media storage
- Node.js (v16 or higher)
- npm or yarn package manager
- Git version control
git clone <repository-url>
cd ChessNewscd backend
npm installcd frontend
npm installCreate environment files for both frontend and backend:
Create a .env file in the backend directory:
PORT=3001
NODE_ENV=development
# Firebase Admin SDK (optional)
FIREBASE_PROJECT_ID=your-project-id
FIREBASE_PRIVATE_KEY=your-private-key
FIREBASE_CLIENT_EMAIL=your-client-emailCreate a .env file in the frontend directory:
VITE_API_URL=http://localhost:3001
VITE_FIREBASE_API_KEY=your-firebase-api-key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
VITE_FIREBASE_APP_ID=your-app-id
VITE_FIREBASE_MEASUREMENT_ID=your-measurement-idNote: The current Firebase configuration in frontend/src/firebase/config.ts uses hardcoded values. After creating your .env file with the correct values, the application will automatically use the environment variables instead of the hardcoded values.
cd backend
npm run devBackend will run on http://localhost:3001
cd frontend
npm run devFrontend will run on http://localhost:5173
cd backend
npm run build
npm startcd frontend
npm run build
npm run previewChessNews/
├── backend/ # Backend application
│ ├── src/
│ │ ├── controllers/ # API controllers
│ │ ├── elo/ # ELO data processing modules
│ │ ├── routes/ # API route definitions
│ │ ├── services/ # Business logic services
│ │ └── index.ts # Main server file
│ ├── package.json
│ └── tsconfig.json
├── frontend/ # Frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── firebase/ # Firebase configuration
│ │ ├── config/ # Configuration files
│ │ └── App.tsx # Main application component
│ ├── public/ # Static assets
│ ├── package.json
│ ├── vite.config.ts
│ └── tsconfig.json
└── README.md
GET /api/elo- Retrieve all ELO dataPOST /api/elo/update- Manually update ELO data
GET /api/news- Get all news articlesGET /api/news/featured- Get featured newsGET /api/news/tsf- Get TSF-specific newsGET /api/news/chesscom- Get Chess.com newsPOST /api/news- Create new news articlePUT /api/news/:id- Update news articleDELETE /api/news/:id- Delete news article
Run the following in browser console:
// Create default admin account
window.createDefaultAdmin();
// Or create custom admin account
window.createAdmin({
email: "admin@example.com",
password: "password123",
displayName: "Admin User",
permissions: ["NEWS_READ", "NEWS_CREATE", "ELO_READ", "GAMES_READ"]
});/admin/login- Admin login page/admin/dashboard- Admin dashboard/admin/news- News management/admin/elo- ELO data management/admin/games- Game database management
- Automatic: Every 2nd day of the month at 04:05 AM
- Manual: Via
/api/elo/updateendpoint - Source: Turkish Chess Federation official website
// Monthly cron job (2nd day of month, 04:05 AM)
cron.schedule('5 4 2 * *', async () => {
await updateEloData();
});# Check port availability
netstat -ano | findstr :3001
# View server logs
cd backend
npm run dev# Reinstall dependencies
cd frontend
rm -rf node_modules
npm install
# Clear Vite cache
npm run dev -- --force# Manual ELO update
curl -X POST http://localhost:3001/api/elo/update
# Check backend logs
cd backend
npm run dev- Lazy loading for components
- Image optimization and compression
- Code splitting for better bundle management
- Bundle size optimization
- API response caching
- Database query optimization
- Rate limiting implementation
- Comprehensive error handling
- Input validation and sanitization
- XSS protection mechanisms
- CSRF protection
- Secure HTTP headers
- Rate limiting for API endpoints
- Input sanitization and validation
- Authentication middleware
- Environment variable protection
- Console logging for development
- Error tracking and reporting
- Performance monitoring
- User analytics and behavior tracking
- API endpoint health monitoring
- Database connectivity checks
- External service status monitoring
This project is designed to serve chess players in the Tekirdağ and Thrace regions. The platform can be commercialized for use by chess clubs and associations. Collaboration with newly established chess organizations can expand the project's scope and impact.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
This project is licensed under the MIT License.
- TSF - For ELO data access
- Lichess - For API services and chess tools
- Material-UI - For UI components
- Firebase - For backend services
Note: This project is developed for educational purposes. Additional security measures should be implemented for production use.
This project aims to create a dynamic and sustainable information platform that adds value to chess communities.