Skip to content

Professional chess diagram generator with full FEN support, 23 piece styles, board customization, and ultra-HD PNG/JPEG export up to 12,800px. Built with React, Tailwind CSS, and HTML5 Canvas.

License

Notifications You must be signed in to change notification settings

BilgeGates/chess_viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

259 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

β™ŸοΈ Chess Diagram Generator

Professional chess position visualizer with ultra-HD export capabilities

React Tailwind CSS Backend Privacy License: MIT PRs Welcome

Live Demo Β· Report Bug Β· Request Feature


πŸ“– Table of Contents


🌟 Overview

Chess Diagram Generator is a modern web application for creating high-quality chess diagrams from FEN notation.
It is built for chess players, coaches, authors, streamers, and developers who need fast, precise, and customizable board visuals.


✨ Features

  • Full FEN notation support with validation
  • Multi-FEN input (up to 10 positions)
  • Ultra-HD PNG & JPEG export (up to 12,800Γ—12,800px)
  • Batch export & clipboard copy
  • 23 professional piece sets
  • Advanced color picker & themes
  • Favorites, history & famous positions
  • Board flip & coordinates

πŸ–Ό Demo & Screenshots

Live demo: https://chess-viewer-site.vercel.app

SCREENSHOOT


πŸš€ Quick Start

Prerequisites

Node.js >= 16
npm >= 8

Installation

# Clone the repository
git clone https://github.com/BilgeGates/chess_viewer.git

# Navigate to project directory
cd chess_viewer

# Install dependencies
npm install
# or
yarn install

# Start development server
npm start
# or
yarn start

The application will automatically open at http://localhost:3000

Production Build

# Create optimized production build
npm run build

# Preview production build locally
npm run preview

# Deploy to Vercel (requires Vercel CLI)
vercel --prod

πŸ“ Project Structure

Complete File Tree (Click to expand)
chess_viewer/
β”‚
β”œβ”€β”€ πŸ“‚ public/
β”‚   β”œβ”€β”€ index.html
β”‚
β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ components/
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ board/              # Chess Board Rendering
β”‚   β”‚   β”‚   β”œβ”€β”€ BoardSquare.jsx    # Single square component (memoized)
β”‚   β”‚   β”‚   β”œβ”€β”€ BoardGrid.jsx      # 8Γ—8 grid layout
β”‚   β”‚   β”‚   β”œβ”€β”€ ChessBoard.jsx     # Main board with Canvas rendering
β”‚   β”‚   β”‚   β”œβ”€β”€ MiniChessPreview.jsx # Thumbnail for history
β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ controls/           # Control Panel System
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ atoms/          # Atomic components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ FENInputField.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ FamousPositionButton.jsx
β”‚   β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ modals/         # Modal dialogs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AdvancedFENInputModal.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ExportSettingsModal.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ FENHistoryModal.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ThemeModal.jsx
β”‚   β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ControlPanel.jsx   # Main control container
β”‚   β”‚   β”‚   β”œβ”€β”€ BoardSizeControl.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DisplayOptions.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ExportSettings.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FENInput.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PieceSelector.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ThemeSelector.jsx
β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ui/                 # Reusable UI Components
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ base/           # Base components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Badge.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Button.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Card.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Checkbox.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Input.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Modal.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Select.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SearchableSelect.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RangeSlider.jsx
β”‚   β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ color-picker/   # Advanced color picker
β”‚   β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ parts/      # Picker components
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ColorCanvas.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ColorInput.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ColorPalettes.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ColorSwatch.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HueSlider.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PrimaryActions.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SelectedPreview.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ThemePresetCard.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ views/      # Picker views
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ThemeMainView.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ThemeAdvancedPickerView.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ThemeSettingsView.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ColorPicker.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PickerModal.jsx
β”‚   β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ActionButtons.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ExportProgress.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ NotificationContainer.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ UserGuide.jsx
β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   β”‚
β”‚   β”‚   └── πŸ“‚ layout/             # Layout components
β”‚   β”‚       β”œβ”€β”€ Navbar.jsx
β”‚   β”‚       β”œβ”€β”€ Footer.jsx
β”‚   β”‚       └── index.js
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ pages/                  # Application pages
β”‚   β”‚   β”œβ”€β”€ HomePage.jsx
β”‚   β”‚   β”œβ”€β”€ AboutPage.jsx
β”‚   β”‚   β”œβ”€β”€ DownloadPage.jsx
β”‚   β”‚   β”œβ”€β”€ SupportPage.jsx
β”‚   β”‚   └── index.js
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ hooks/                  # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ useChessBoard.js       # FEN parsing & validation
β”‚   β”‚   β”œβ”€β”€ usePieceImages.js      # Image loading & caching
β”‚   β”‚   β”œβ”€β”€ useFENHistory.js       # History management
β”‚   β”‚   β”œβ”€β”€ useTheme.js            # Theme state
β”‚   β”‚   β”œβ”€β”€ useNotifications.js    # Toast system
β”‚   β”‚   β”œβ”€β”€ useLocalStorage.js     # Persistent storage
β”‚   β”‚   β”œβ”€β”€ useColorState.js       # Color picker state
β”‚   β”‚   β”œβ”€β”€ useColorConversion.js  # Color utilities
β”‚   β”‚   β”œβ”€β”€ useCanvasPicker.js     # Canvas interactions
β”‚   β”‚   β”œβ”€β”€ useOutsideClick.js     # Click outside detection
β”‚   β”‚   └── index.js
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ utils/                  # Utility functions
β”‚   β”‚   β”œβ”€β”€ fenParser.js           # FEN validation & parsing
β”‚   β”‚   β”œβ”€β”€ colorUtils.js          # Color conversions
β”‚   β”‚   β”œβ”€β”€ coordinateCalculations.js # Board coordinates
β”‚   β”‚   β”œβ”€β”€ canvasExporter.js      # Export logic
β”‚   β”‚   β”œβ”€β”€ imageOptimizer.js      # Canvas optimization
β”‚   β”‚   └── index.js
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ constants/              # Application constants
β”‚   β”‚   β”œβ”€β”€ chessConstants.js      # Piece sets, themes, positions
β”‚   β”‚   └── index.js
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ routes/                 # Routing configuration
β”‚   β”‚   └── Router.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ App.jsx                    # Root component
β”‚   β”œβ”€β”€ index.js                   # Entry point
β”‚   └── index.css                  # Global styles
β”‚
β”œβ”€β”€ πŸ“„ .env                        # Environment variables
β”œβ”€β”€ πŸ“„ .gitignore
β”œβ”€β”€ πŸ“„ postcss.config.js
β”œβ”€β”€ πŸ“„ tailwind.config.js
β”œβ”€β”€ πŸ“„ package.json
β”œβ”€β”€ πŸ“„ package-lock.json
β”œβ”€β”€ πŸ“„ vercel.json                 # Vercel deployment config
β”œβ”€β”€ πŸ“„ README.md
β”œβ”€β”€ πŸ“„ CONTRIBUTING.md
β”œβ”€β”€ πŸ“„ ARCHITECTURE.md
β”œβ”€β”€ πŸ“„ SECURITY.md
β”œβ”€β”€ πŸ“„ CODE_OF_CONDUCT.md
β”œβ”€β”€ πŸ“„ FAQ.md
└── πŸ“„ LICENSE

πŸ› οΈ Technology Stack

Core Technologies


React (18+ compatible, built with 19.x)
UI Framework

JavaScript ES6+
Language

Tailwind CSS 3.3.5
Styling

HTML5 Canvas
Rendering

Node.js 16+
Runtime

Performance Stack

  • Rendering: HTML5 Canvas
  • Optimization: React.memo, useCallback, useMemo
  • Storage: localStorage (browser native)
  • Deployment: Vercel (Edge + CDN)

🌐 Browser Support

Browser Version Status
Chrome 90+ βœ… Tested
Firefox 88+ βœ… Tested
Safari 14+ βœ… Expected to work
Edge 90+ βœ… Expected to work
Opera 76+ βœ… Expected to work

Required Browser Features

  • HTML5 Canvas API
  • ES6+ JavaScript
  • CSS Grid & Flexbox
  • Clipboard API (optional)
  • localStorage API

πŸ” Security & Privacy

This project follows a privacy-first, zero-backend architecture.
All functionality runs entirely in the user's browser with no external data flow.

πŸ”’ Security Highlights

  • βœ… No server-side data storage
  • βœ… Client-side processing only
  • βœ… No cookies, trackers, or fingerprinting
  • βœ… No third-party analytics or telemetry
  • βœ… No user data is collected, stored, or transmitted

🧠 Threat Model

  • No authentication or user accounts
  • No sensitive or personal data processed
  • No external APIs or background requests
  • Attack surface limited to static client-side execution only

πŸ›‘οΈ Data Safety Guarantee

Chess Diagram Generator will never upload, sync, or share your data.
All positions, exports, favorites, and settings remain local to your device.


🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.

Quick Contribution Guide

# 1. Fork the repository
# 2. Create your feature branch
git checkout -b feature/amazing-feature

# 3. Commit your changes
git commit -m 'Add amazing feature'

# 4. Push to the branch
git push origin feature/amazing-feature

# 5. Open a Pull Request

Contributors


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2026 Khatai Huseynzada

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ‘¨β€πŸ’» Author

Khatai Huseynzada

Front-End Web Developer | Open Source Contributor

GitHub LinkedIn Email


πŸ™ Acknowledgments

This project wouldn't be possible without these amazing resources:


Lichess
Lichess piece SVGs

React Team
Amazing framework

Tailwind Labs
Beautiful utilities

Lucide Icons
Icon library

Special Thanks

  • Lichess.org - Inspiration and FEN notation standards
  • Vercel - Hosting and deployment platform

πŸ“§ Support & Contact

Channel Link
πŸ› Bug Reports GitHub Issues
πŸ’‘ Feature Requests GitHub Discussions
πŸ“§ Email [email protected]

Responses on a best-effort basis


FAQ

How do I report a bug?
  1. Check if the issue already exists in GitHub Issues
  2. If not, create a new issue with:
    • Clear description of the problem
    • Steps to reproduce
    • Expected vs actual behavior
    • Screenshots (if applicable)
    • Browser and OS information
Can I use this commercially?

Yes! This project is MIT licensed, which means you can use it for commercial purposes.
Just include the license notice in your project.

How do I add a new piece set?
  1. Add piece images to /public/pieces/[set-name]/
  2. Update PIECE_SETS in src/constants/chessConstants.js
  3. Submit a pull request with your changes
Can I export to SVG format?

Currently only PNG and JPEG are supported.
SVG export is planned for version 4.0.0.
You can track progress in Issue #1.


Β© 2026 Khatai Huseynzada. Licensed under MIT.

About

Professional chess diagram generator with full FEN support, 23 piece styles, board customization, and ultra-HD PNG/JPEG export up to 12,800px. Built with React, Tailwind CSS, and HTML5 Canvas.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages