A comprehensive chess platform for the Bangladesh chess community, featuring game analysis, player profiles, events, clubs, and learning resources.
- Game Analysis: Advanced PGN analysis with Stockfish 17 engine
- Move quality classification (Brilliant, Great, Best, Excellent, Good, Inaccuracy, Mistake, Miss, Blunder)
- Win percentage calculations
- Position evaluation graphs
- Best move suggestions
- Chess Engine: Interactive engine analysis with Stockfish 17
- Bot Games: Play against AI bots with different difficulty levels
- Puzzles: Chess puzzles and tactics training
- Player Profiles: View player statistics, ratings, and game history
- Leaderboards: Rankings and statistics
- Events: Tournament and event management
- Clubs: Chess club directory and details
- Forum: Community discussions
- News: Chess news and updates
- Interactive Lessons: Step-by-step chess tutorials
- Video Tutorials: Educational chess videos
- Recommended Books: Chess literature recommendations
- Practice Games: Training games and exercises
- District Map: Interactive map of Bangladesh districts
- Club Locations: Find chess clubs by location
- Multi-language support (English, Bengali)
- Dark/Light theme switching
- Responsive design
- User authentication and profiles
- Search functionality
- Watch live games
- React 19 - UI library
- Vite 7 - Build tool and dev server
- React Router 7 - Routing
- Zustand - State management
- React Query - Data fetching and caching
- Lucide React - Icons
- chess.js - Chess logic and PGN parsing
- react-chessboard - Chess board component
- Stockfish 17 - Chess engine (WebAssembly)
- Firebase - Authentication, Firestore, Realtime Database
- Netlify - Hosting and Deployment
- date-fns - Date formatting
- react-markdown - Markdown rendering
- leaflet - Interactive maps
- Node.js 18+ and npm
- Firebase account and project setup
- Git
-
Clone the repository
git clone https://github.com/abdussamiakanda/chessBD.git cd chessBD -
Install dependencies
npm install
-
Set up Firebase
- Create a Firebase project at Firebase Console
- Enable Authentication, Firestore, and Realtime Database
- Copy your Firebase configuration
- Create a
.env.localfile in the root directory:VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id VITE_FIREBASE_APP_ID=your_app_id VITE_FIREBASE_DATABASE_URL=your_database_url
-
Stockfish Engine Files
- The Stockfish 17 engine files should be in
public/engines/stockfish-17/ - Ensure both multi-threaded and single-threaded versions are present:
stockfish-17.jsandstockfish-17-part-*.wasm(multi-threaded)stockfish-17-single.jsandstockfish-17-single-part-*.wasm(single-threaded)
- The Stockfish 17 engine files should be in
-
Start the development server
npm run dev
-
Open your browser
- Navigate to
http://localhost:5173(or the port shown in terminal)
- Navigate to
-
Lint your code
npm run lint
-
Build the project
npm run build
-
Preview the production build
npm run preview
- Netlify account
- Git repository (GitHub, GitLab, or Bitbucket)
-
Push your code to Git
git add . git commit -m "Prepare for Netlify deployment" git push origin main
-
Connect to Netlify
- Go to Netlify
- Click "Add new site" โ "Import an existing project"
- Connect your Git repository
- Netlify will auto-detect the build settings from
netlify.toml
-
Configure Environment Variables
- In Netlify dashboard, go to Site settings โ Environment variables
- Add all required variables from
.env.example:VITE_FIREBASE_API_KEYVITE_FIREBASE_AUTH_DOMAINVITE_FIREBASE_PROJECT_IDVITE_FIREBASE_STORAGE_BUCKETVITE_FIREBASE_MESSAGING_SENDER_IDVITE_FIREBASE_APP_IDVITE_FIREBASE_MEASUREMENT_IDVITE_FIREBASE_DATABASE_URLVITE_GROK_API_KEY(optional)
-
Deploy
- Netlify will automatically build and deploy on every push to your main branch
- Or trigger a manual deploy from the Netlify dashboard
The netlify.toml file includes:
- Build command:
npm run build - Publish directory:
dist - SPA redirects (all routes โ
/index.html) - Security headers
- Caching headers for static assets
- In Netlify dashboard, go to Site settings โ Domain management
- Add your custom domain
- Follow Netlify's DNS configuration instructions
chessBD/
โโโ public/
โ โโโ engines/
โ โ โโโ stockfish-17/ # Stockfish engine files
โ โโโ bangladesh_geojson_*.json # Map data
โ โโโ favicon.svg
โโโ src/
โ โโโ components/ # Reusable components
โ โ โโโ auth/ # Authentication components
โ โ โโโ chess/ # Chess-related components
โ โ โโโ events/ # Event components
โ โ โโโ games/ # Game components
โ โ โโโ maps/ # Map components
โ โ โโโ standings/ # Leaderboard components
โ โ โโโ ui/ # UI components
โ โโโ contexts/ # React contexts
โ โโโ hooks/ # Custom React hooks
โ โโโ lib/ # Library code
โ โ โโโ api.js # API functions
โ โ โโโ bots/ # Bot definitions
โ โ โโโ chess/ # Chess utilities
โ โ โโโ engine/ # Chess engine integration
โ โ โโโ firebase.js # Firebase configuration
โ โ โโโ utils/ # Utility functions
โ โโโ locales/ # Translation files
โ โโโ pages/ # Page components
โ โ โโโ learn/ # Learning pages
โ โโโ store/ # State management
โ โโโ App.jsx # Main app component
โ โโโ main.jsx # Entry point
โ โโโ index.css # Global styles
โโโ .gitignore
โโโ netlify.toml # Netlify configuration
โโโ package.json
โโโ vite.config.js # Vite configuration
โโโ README.md
- PGN upload and parsing
- Move-by-move analysis with Stockfish 17
- Move quality indicators
- Evaluation graphs
- Player information display
- Interactive engine analysis
- Position evaluation
- Best move calculation
- Multi-threaded support
- Statistics and ratings
- Game history
- Chess.com and Lichess integration
The netlify.toml file contains deployment configuration:
- Build command and publish directory
- SPA routing redirects
- Security headers
- Caching headers for static assets and WASM files
The vite.config.js handles:
- React plugin
- Worker configuration
- WASM file handling
- Build output optimization
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Requires WebAssembly support for chess engine
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and proprietary.
For questions or support, please contact the project maintainer.
Built with โค๏ธ for the Bangladesh chess community