AOSSIE-Org / AOSSIE-Org/DebateAI

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

Ouverte
#403 5 commentaires 0 réactions 1 personne assignée Réclamée par @Prateekiiitg56 Voir sur GitHub
enhancement
Langage dominant
TypeScript
Étoiles
84
Forks
198
Merge moyen
2 j 19 h
PR mergées (30 j)
30

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.