Skip to content

Latest commit

Β 

History

57 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎭 Giano Reader

Tauri Vite JavaScript

Read globally, understand locally. The dual-faced reader for language explorers.

5EgwP4AOvV

πŸ“– Bridging the Gap in Foreign Literature

Giano Reader is a lightweight, high-performance desktop application designed for those who refuse to let a language barrier stand between them and a great book.

Named after the Roman god of dualities and transitions, Giano provides a synchronized, side-by-side reading experience. It is specifically crafted for language learners who want to dive into foreign literature without losing the flow, the context, or the original book's formatting.


πŸš€ Why Giano Reader?

  • ⚑ Lightweight & Native: Built with Tauri 2, offering a snappy desktop experience with a minimal system footprint.
  • πŸ”— Fluid Synchronization: As you scroll the original text, the translation follows perfectly. Never lose your place again.
  • 🧠 Context-Aware: Unlike standard translators, Giano preserves the "soul" of the EPUB, rendering native styles while providing a modern translation overlay.
  • ⏳ Smart Lazy Translation: Our chunking logic means you don't have to wait for the whole book to be processedβ€”it translates as you read, starting from your current position.

✨ Key Features

  • Open and read EPUB files
  • Navigable table of contents (TOC)
  • Chapter navigation with progress bar and chapter tick marks
  • Side-by-side translation (original + translated) with synchronized scroll
  • Dual-Mode Translation (FREE / PRO): Toggle between lightweight free translation and premium context-aware AI translation
    • FREE Mode: Direct, instant paragraph translation via Google Translate (no API key required)
    • PRO Mode: Context-aware, natural, literary translations via OpenRouter (supports models like google/gemini-2.5-flash, meta-llama/llama-3-8b-instruct, etc.)
  • Dynamic Model Fetching: Load and select the newest premium models directly from OpenRouter within Giano Reader Settings
  • Interactive Paragraph Pairing: Instantly highlight corresponding paragraphs with matching color codes (using custom 5-color palettes tailored for light and dark themes) to follow complex narratives effortlessly
  • Word-Level Bidirectional Hover Alignment: Hovering a word in the original text highlights the corresponding word in the translation (and vice versa) for immediate word-by-word comparison
  • Paragraph Numbers Toggle: Show/hide small paragraph numbers at the start of each text block for precise, high-accuracy study alignment
  • Lazy translation: starts from your current reading position, expands downward as you scroll
  • Original EPUB view mode (rendered in an iframe with native styling)
  • Bookmarks with chapter and scroll position, import/export as JSON
  • Filesystem Database Migration: Tauri desktop app stores library metadata and bookmarks in secure, local JSON files on disk, ensuring virtually unlimited storage and preventing browser QuotaExceededError limits
  • Book detail panel: editable title, author, publisher, year, language, status, personal notes
  • 6 themes: Dark (default), Light, Monokai, Solarized Dark, Nord, Sepia
  • Custom font family and font size controls
  • Configurable folder scan depth (1–10 levels)
  • UI language support with RTL (Arabic)
  • SVG icons (Font Awesome 6 Free) instead of emoji
  • Language dropdowns with SVG flag images (compatible with WebView2 on Windows)
  • Window geometry persistence across restarts (Tauri only)
  • AI Text-to-Speech (TTS): Multi-model TTS engine with FREE (browser SpeechSynthesis) and PRO (OpenRouter) modes supporting Orpheus 3B, Kokoro 82M, Gemini Flash TTS, Grok Voice TTS, and Microsoft MAI-Voice-2 β€” with audio download to WAV/MP3
  • Resizable Library Modal: User-resizable library window for comfortable browsing of large collections
  • Clean Library Tool: One-click verification of all book file links with removal of broken entries
  • i18n Developer Automations: Integrated script in .antigravity/ to automatically align and synchronize all 20 translation locales instantly

🌍 Supported Languages

Giano Reader supports 20 interface languages: English, Chinese, Hindi, Spanish, French, Bengali, Portuguese, Russian, Japanese, Indonesian, German, Korean, Italian, Thai, Filipino, Arabic, Albanian, Swedish, Ukrainian, Slovenian.


πŸ“₯ Download & Install

You can find the ready-to-use installers for Windows (.msi), macOS (.dmg), and Linux (.AppImage) here:

πŸ‘‰ Download Giano Reader v0.9.0

Important

Migration Note (from v0.7.x to v0.8.x): Before installing version 0.8.x, it is highly recommended to export your Library (using the export feature in Settings) to prevent any potential data or metadata loss during the schema migration.

Important

Migration Note (from v0.8.x to v0.9.x): The app identifier has changed from com.bolzonella.giano-reader to giano-reader. After installing v0.9.0, run the migration script once to preserve your existing data (library, bookmarks, reading state):

powershell -ExecutionPolicy Bypass -File scripts/migrate-appdata.ps1

This moves your data from %LOCALAPPDATA%\com.bolzonella.giano-reader\ to %LOCALAPPDATA%\giano-reader\ and removes the old directory. If you skip this step, the app will start fresh with an empty library.


πŸ“¦ Build Instructions

For build requirements and instructions see BUILD.md.

Quick Start

  1. Clone the repo: git clone https://github.com/user/giano-reader.git
  2. Install dependencies: npm install
  3. Run in dev mode: npm run tauri dev

πŸ›  Project Structure

giano-reader/
β”œβ”€β”€ index.html              # HTML entry point β€” all UI markup
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.js          # Vite: port 1420, ignores src-tauri/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”œβ”€β”€ logo.png
β”‚   β”œβ”€β”€ icons/              # SVG UI icons (Font Awesome 6 Free, SIL OFL 1.1)
β”‚   β”‚   β”œβ”€β”€ gear.svg
β”‚   β”‚   β”œβ”€β”€ xmark.svg
β”‚   β”‚   β”œβ”€β”€ book-bookmark.svg
β”‚   β”‚   β”œβ”€β”€ star.svg
β”‚   β”‚   β”œβ”€β”€ arrows-left-right-to-line.svg
β”‚   β”‚   β”œβ”€β”€ file-image.svg
β”‚   β”‚   β”œβ”€β”€ upload.svg
β”‚   β”‚   └── download.svg
β”‚   └── flags/              # SVG flag images for language dropdowns
β”‚       β”œβ”€β”€ it.svg, gb.svg, fr.svg, de.svg, es.svg, pt.svg
β”‚       β”œβ”€β”€ ru.svg, cn.svg, jp.svg, sa.svg, ph.svg, al.svg
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.js             # All frontend logic: reader, UI, bookmarks, library, scroll sync
β”‚   β”œβ”€β”€ tts.js              # Text-to-Speech engine (FREE/PRO, multi-model, audio download)
β”‚   β”œβ”€β”€ translator.js       # Google Translate integration (chunked, lazy)
β”‚   β”œβ”€β”€ i18n.js             # UI translations (20 languages); exports t(lang, key, vars)
β”‚   β”œβ”€β”€ settings-utils.js   # Pure utility functions (no DOM); used by main.js and tests
β”‚   └── style.css           # All styles (dark mode via body.dark)
└── src-tauri/
    β”œβ”€β”€ Cargo.toml
    β”œβ”€β”€ build.rs
    β”œβ”€β”€ tauri.conf.json     # Window config, CSP, bundle settings
    β”œβ”€β”€ capabilities/
    β”‚   └── default.json    # Tauri capability declarations
    └── src/
        β”œβ”€β”€ main.rs         # Tauri entry point (calls lib::run)
        └── lib.rs          # Plugin registration + DevTools in debug builds

βš™οΈ How Translation Works

Giano Reader implements a flexible dual-mode translation engine:

  • FREE Mode: Uses the unofficial Google Translate public endpoint (translate.googleapis.com) β€” no API key required. Text is split into ~4500-character chunks and translated lazily: the visible block first, then subsequent ones as you scroll.
  • PRO Mode: Uses OpenRouter APIs to query advanced Large Language Models (LLMs) like Gemini and Llama. This provides premium literary-grade, context-aware translations that respect the author's writing style. To activate it, simply paste your OpenRouter API Key into Settings. Once active, Giano will query OpenRouter asynchronously, and the text will be displayed block-by-block.

For both modes, translation is entirely lazy: the app begins translating from your current reading position and expands downward as you scroll. When you open a bookmark, translation starts directly from the saved position, saving bandwidth and system load.


πŸ“š Advanced Learning & Reading Helpers

Giano Reader includes premium tools designed to speed up comprehension and make comparative reading natural:

  • Paragraph Coloring (Palette): Clicking the palette icon ([Palette]) in the translation header activates high-contrast paragraph matching. The original paragraphs and their corresponding translations are colored in matching background tints, letting your eyes instantly jump between the two versions. Giano includes separate, hand-tailored 5-color palettes optimized for both dark and light modes to maintain excellent text contrast.
  • Word-Level Bidirectional Alignment: When paragraph coloring is turned off, hovering over any individual word in the original text will automatically highlight the corresponding translated word (and vice versa). This is incredibly powerful for identifying sentence structures, vocabulary counterparts, and idioms.
  • Paragraph Numbers (#): Clicking the # button toggles small inline paragraph numbers at the start of each text block. This helps you track structural alignment across chapters.

Library

The library scans local folders for EPUB files and stores book metadata (title, author, publisher, year, language, description, cover thumbnail, estimated page count, file size) persistently.

To prevent web browser storage quota limitations (localStorage is limited to ~5MB), Giano Reader desktop (Tauri) automatically migrates all library metadata and bookmarks to secure JSON files directly on your local filesystem (giano-library.json and giano-bookmarks.json in the app's system data directory). This supports virtually unlimited library sizes and prevents QuotaExceededError crashes when scanning thousands of ebooks. The browser version retains a fast fallback storage mode. Books can be filtered by reading status (To read / Reading / Read) and searched by title or author. The scan depth (1–10 folder levels) is configurable in Settings.

The Clean Library tool verifies that all stored book paths still exist on disk. Any broken links are presented in a modal with the option to remove them in one click.


πŸŽ™οΈ Text-to-Speech (TTS)

Giano Reader includes a dual-mode TTS engine for listening to your books:

  • FREE Mode: Uses the browser's built-in SpeechSynthesis API with available system voices. No configuration needed.
  • PRO Mode: Connects to OpenRouter to access high-quality neural TTS models:
    • Orpheus 3B β€” 8 English voices (Tara, Leah, Jess, Mia, Zoe, Leo, Dan, Zac)
    • Kokoro 82M β€” Multilingual voices across English, Italian, French, Spanish, Portuguese, Japanese, Chinese, Hindi
    • Gemini 3.1 Flash TTS β€” 30 expressive voices with style descriptors
    • Grok Voice TTS β€” 5 voices (Eve, Ara, Rex, Sal, Leo) with 20+ language support
    • Microsoft MAI-Voice-2 β€” Natural voices across 10 languages

All voices display ♀️/♂️ gender indicators. PRO mode accumulates audio as you listen and enables a Download button (far right of the TTS toolbar) that opens a native "Save As" dialog to export the chapter audio as MP3 or WAV.


Icons and flags

UI icons are SVG files from Font Awesome 6 Free (SIL OFL 1.1 for icons, MIT for code), stored in public/icons/.

Language dropdowns use custom SVG flags in public/flags/ instead of Unicode emoji, to ensure compatibility with WebView2 on Windows (which does not render flag emoji in HTML elements).


Main dependencies

Package Purpose
epubjs EPUB parsing and rendering
tauri-plugin-dialog Native file open/save dialogs
tauri-plugin-fs Filesystem read/write access
Vite 6 Build tool and dev server

βš–οΈ License

This project is licensed under a custom license. See the LICENSE file for details.

About

Desktop application to read ebooks in EPUB formats with integrated translation via Google Translate.

Topics

Resources

Stars

27 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages