AOSSIE-Org / AOSSIE-Org/DebateAI

[FEATURE]: Add endpoint to export debate transcript as downloadable PDF

Aberta
#403 5 comentários 0 reações 1 responsável Reivindicada por @Prateekiiitg56 Ver no GitHub
enhancement
Linguagem predominante
TypeScript
Estrelas
84
Forks
198
Merge médio
2d 19h
PRs com merge (30d)
30

Descrição

### Feature and its Use Cases

Right now, once a debate ends, the transcript only exists as JSON data pulled through GET /transcript/:id for the frontend UI to render. There's no way to actually download or save it as a file. I'd like a new endpoint that generates a PDF version of a completed debate transcript.

Use case: a user finishes a debate and wants to download the full transcript (their arguments, opponent's arguments, phase-by-phase breakdown, and result) as a PDF. They can then review it later, share it with a coach/mentor for feedback, or keep it as a practice log outside the platform - without needing to stay logged in or keep the tab open.

Proposed endpoint: GET /transcript/:id/export?format=pdf, reusing the same transcript data already modeled in backend/models/transcript.go and already queried in backend/controllers/transcript_controller.go (GetTranscriptByIDHandler). No new data model needed - this is purely an additive read-only export on top of existing data.

### Additional Context

Relevant files: backend/controllers/transcript_controller.go, backend/routes/transcriptroutes.go, backend/models/transcript.go, backend/services/transcriptservice.go.
Implementation idea: use a Go PDF library like gofpdf or maroto to render the existing transcript struct into a formatted PDF (topic, participants, phase-by-phase speech text, result).
Good first-contribution candidate - self-contained, doesn't touch websocket/matchmaking logic, low risk since it's just a new read path on existing data.
Optional follow-up (could be a separate issue): add a "Download PDF" button next to each transcript in the frontend's transcript history page.

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.