AOSSIE-Org / AOSSIE-Org/DebateAI

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

Abierto
#403 5 comentarios 0 reacciones 1 asignado Reclamado por @Prateekiiitg56 Ver en GitHub
enhancement
Lenguaje dominante
TypeScript
Estrellas
84
Forks
198
Merge medio
2 d 19 h
PR fusionados (30 d)
30

Descripción

### 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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.