Commit graph

9 commits

Author SHA1 Message Date
ifedan-ed
e1ff5b045e Real PDF rendering with PDF.js and word-level highlights on canvas
- PDF pages rendered by PDF.js directly from File object (no conversion shown)
- Each page gets a transparent overlay canvas for drawing highlights
- Word positions extracted from PDF.js getTextContent() in PDF coordinate space
- convertToViewportPoint() maps PDF space → canvas pixels correctly (handles y-flip)
- On each sentence: purple highlight rectangles drawn over matching words on the PDF
- Sentence→word mapping via character-position search through word stream
- PDF rendering and text extraction run in parallel (pages appear as they render)
- Nextcloud PDFs use pdf_b64 → PDF.js rendering path
- Removed iframe approach entirely

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 05:16:01 +02:00
ifedan-ed
4fc76bc650 Show PDF instantly from local file, extract text in background
- PDF renders immediately on file select via blob URL (no server round-trip)
- Text extraction happens in background (only needed for TTS audio)
- Default view is now PDF (shows the real document, not extracted text)
- User can switch to Text view to see extracted sentences with highlighting
- Nextcloud PDFs also default to PDF view when opened

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 04:56:30 +02:00
ifedan-ed
7afbe3a22a Replace PDF.js canvas with native browser iframe PDF viewer
- Browser renders PDF exactly as-is using its built-in viewer (Chrome/Edge/Firefox)
- No external dependencies - just a blob URL in an <iframe>
- Page navigation via #page=N fragment syncs PDF view with playback position
- Fixed flex layout so iframe fills remaining height correctly
- Removed PDF.js script tag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 04:43:52 +02:00
ifedan-ed
00af54c95a Add PDF.js viewer, column-aware PDF extraction, and view toggle
- PDF pages rendered via PDF.js (see actual document, not just extracted text)
- Text/PDF view toggle appears for PDF documents (top-right of header)
- PDF view scrolls to current page as sentences are read
- Column-aware extraction: detects two-column layouts, reads left column
  top-to-bottom then right column (fixes academic papers, double-page PDFs)
- De-hyphenation: removes mid-word line breaks from extracted text
- Both PDF upload and Nextcloud download now return pdf_b64 + page_texts
- sentence→page mapping so PDF view auto-scrolls during playback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 04:16:56 +02:00
ifedan-ed
ee3ffcfe90 Add email verification, user Nextcloud settings, Groq TTS, favicon, and settings page
- Email verification: send link on register via SMTP2GO (noreply@pedshub.com), verify endpoint, beautiful HTML email
- Unverified users see yellow banner in app with resend button; also shown on settings page
- User settings page (/settings): personal Nextcloud credentials (override admin-wide config)
- Admin and per-user Nextcloud config merged (user settings take priority)
- Groq PlayAI TTS: 20 English voices + 2 Arabic voices via groq-playai-tts / groq-playai-tts-arabic
- Added groq-playai-tts and groq-playai-tts-arabic to litellm config
- Favicon SVG (purple play button) across all pages
- Settings link in user dropdown menu
- verify-ok.html and verify-fail.html result pages
- DB migration: added email_verified column, verification_tokens and user_settings tables

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 04:12:25 +02:00
ifedan-ed
fb8e1340f1 Add auth, Nextcloud, voice lock, saved docs, progress saving, and all new TTS voices
- Auth system: JWT login/register with Cloudflare Turnstile, admin + user roles
- Admin panel: user management (role/active toggle, delete), Nextcloud config
- 6 TTS models: OpenAI TTS / TTS-HD, ElevenLabs, Gemini 2.5 Flash/Pro
- Voice lock: prevent model/voice changes while audio is playing
- Nextcloud browser: PROPFIND WebDAV, folder navigation, PDF loading
- Saved documents: save/load with PUT/POST, progress auto-saves every 2s
- Resume playback: remembers sentence position per user per document
- Better sentence highlighting with glow effect

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 03:23:18 +02:00
ifedan-ed
87d38183c0 Remove cached pycache 2026-04-11 02:27:12 +02:00
ifedan-ed
ef19a08e8e Add .gitignore 2026-04-11 02:27:12 +02:00
ifedan-ed
6458b101e1 Initial commit: Speechify clone with multi-provider TTS 2026-04-11 02:27:05 +02:00