├── main.py # 🚀 Entry point that runs the Flask application
├── app.py # 🏗️ Main Flask application configuration and routes
├── pgn_converter.py # 🔄 Core PGN to GIF conversion logic
├── static/ # 🎨 Static assets directory
│ ├── css/
│ │ └── custom.css # 🎨 Custom styling including dark mode
│ ├── js/
│ │ └── main.js # 🖱️ Client-side JavaScript for board interaction
│ └── img/
│ └── chesspieces/ # ♜ SVG chess pieces
│ ├── bB.svg # ♝ Black Bishop
│ ├── bK.svg # ♚ Black King
│ ├── bN.svg # ♞ Black Knight
│ ├── bP.svg # ♟ Black Pawn
│ ├── bQ.svg # ♛ Black Queen
│ ├── bR.svg # ♜ Black Rook
│ ├── wB.svg # ♗ White Bishop
│ ├── wK.svg # ♔ White King
│ ├── wN.svg # ♘ White Knight
│ ├── wP.svg # ♙ White Pawn
│ ├── wQ.svg # ♕ White Queen
│ └── wR.svg # ♖ White Rook
└── templates/ # 🖼️ Jinja2 HTML templates
├── base.html # 🏗️ Base template with layout and common elements
└── index.html # 🎭 Main page template
-
📜 PGN Processing:
- 📂 File upload support
- 📝 Text input support
⚠️ Validation and error handling
-
♟️ Chess Board Visualization:
- 🎥 Interactive board preview
- ⏭️ Move navigation controls
- 🖼️ SVG piece rendering
-
🎨 User Interface:
- 🌙 Dark/Light mode toggle
- 📱 Responsive design
- ⏳ Loading indicators
- ❌ Error feedback
-
⚙️ Main Dependencies:
- 🏗️ Flask for web server
- ♜ python-chess for PGN processing
- 🖥️ chess.js and chessboard.js for board visualization
- 🎨 Bootstrap for styling
- ⭐ Font Awesome for icons
To deploy this Flask application on Render, follow these steps:
Ensure your project is committed and pushed to a GitHub repository.
git add .
git commit -m "Initial commit"
git push origin main
- Go to Render
- Click on New Web Service
- Connect your GitHub repository
- Select Python as the environment
bash render-build.sh
gunicorn -w 4 -b 0.0.0.0:10000 app:app
Create a file named render-build.sh and add the following:
#!/bin/bash
# Install system dependencies
apt-get update && apt-get install -y libcairo2 libcairo2-dev
pip install -r requirements.txt
Make sure the file is executable:
chmod +x render-build.sh
Under Environment Settings in Render, add any required environment variables.
Click Deploy, and Render will build and start your application.
This project is licensed under the MIT License. See the LICENSE file for details.
MIT License
Copyright (c) 2025 M.P. Goutam
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:
[...] (Full MIT License text)