[Feature]: Add game history export — allow users to download their game as a PGN file

Offen
#2,563 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

@navyasastry06 arbeitet bereits daran.

Seit 06.8.2026.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
django, python
Bereich
full-stack

Rechercherichtung

Trace the backend REST move-processing flow and locate or establish the proposed game/pgn.py entry point, then identify how the frontend handles completed games. Done means moves can produce a valid PGN through GET /api/game/:id/pgn and a post-game “Download PGN” button downloads it; run the existing backend and frontend tests after checking their locations.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement frontend GSSoC

Summary

PGN (Portable Game Notation) is the universal standard format for recording chess games. Every major chess platform (chess.com, Lichess, Chess24) allows users to download their games as PGN files, which can then be imported into analysis tools like Stockfish, ChessBase, or opened on any chess website. Checkora has no game export functionality, which means players cannot save or analyze their games after they finish. This is a significant missing feature for a chess platform.

Problem
Games played on Checkora are not saved or exportable.
Players who want to analyze a game they played against the AI cannot export it.
There is no PGN export, no FEN export, and no game history view.
Competitive players and learners who use Checkora for improvement cannot review their games.
Proposed Solution

I will implement PGN generation and download functionality:

  1. Move history tracking — The backend already validates and processes moves via its REST API. I will ensure each move is stored in a session-level move list with the full move notation.

  2. PGN generation — At the end of a game (or at any point during), generate a valid PGN string:

python

game/pgn.py

def generate_pgn(game_state):
headers = {
'Event': 'Checkora Game',
'Date': datetime.now().strftime('%Y.%m.%d'),
'White': game_state.get('white_player', 'Player'),
'Black': game_state.get('black_player', 'Checkora AI'),
'Result': game_state.get('result', ''),
}
header_str = '\n'.join(f'[{k} "{v}"]' for k, v in headers.items())
moves_str = ' '.join(
f'{i//2 + 1}. {m}' if i % 2 == 0 else m
for i, m in enumerate(game_state['moves'])
)
return f"{header_str}\n\n{moves_str} {game_state.get('result', '
')}"

  1. Download endpoint — GET /api/game/:id/pgn returns the PGN as a text file download.

  2. Frontend button — "Download PGN" button appears after game end (and optionally mid-game). Triggers file download via the Blob API.

Could you assign this issue to me?

Labels: feature, enhancement, help wanted, GSSoC 2026

Vorherrschende Sprache
Python
Sterne
140
Forks
513
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Checkora/Checkora

Alle Issues in Checkora/Checkora

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.