Lirius is a complete web-based lyric timing synchronizer app. It helps users synchronize plain-text lyrics with .flac audio files, and output a valid .srt or .txt file.
- Musixmatch-like Interface: View a vertical list of lyrics centered on the screen, auto-scrolling with the current line. Includes smart lyric input modal enforcing Musixmatch guidelines, an auto-fix utility, and strict structural tag controls.
- Two-way Synchronization: Click the audio seek bar to automatically update the active lyric line and auto-scroll, or click a synced lyric line to update the audio seek bar to that timestamp.
- Keyboard Shortcuts: Fast synchronization controls using keyboard arrows (Down to lock line/next, Up to reset/previous, Left/Right to fine-tune timing).
- Responsive & Touch Controls: Designed mobile-first with smart dark/light theme options using Tailwind CSS. On-screen touch controls available for easy lyric synchronization on both mobile and desktop.
- Local Dashboard: Resume incomplete projects straight from your browser. Data is persisted to IndexedDB (using
idb-keyval) to support larger database sizes and prevent the 5MB browser storage limits oflocalStorage. Manage multiple works with table search, sorting, filtering, and pagination. Due to browser security constraints, you must re-select your original.flacfile to resume audio playback. - Advanced SRT & TXT Export: Generates a correctly formatted
.srtfile for your synchronized lyrics (excluding structural tags), or.txtfiles (including Musixmatch structural tags). Supports advanced handling of#INSTRUMENTALtags.
- Frontend: React, Vite, TypeScript
- Styling: Tailwind CSS, Lucide React (Icons)
- State Management & Storage: Zustand, IndexedDB (via
idb-keyval) - Testing: Vitest
Follow these instructions to run, build, and test Lirius locally:
Ensure you have Node.js installed, then run:
npm installLaunch the development server with hot-module replacement (HMR):
npm run devOnce started, the application will be accessible at http://localhost:5173/lirius/dist/ (or the local address shown in your terminal).
To build the application for deployment:
npm run buildThis runs the TypeScript compiler check (tsc -b) and bundles the frontend app using Vite into the /dist directory.
Note
The repository's root marketing page (index.html) relies on the compiled styles generated in dist/assets/index.css. To ensure the root landing page renders with correct styles and layout, you must execute npm run build at least once.
Ensure code quality and style guidelines are met using ESLint and Prettier:
# Run lint check
npm run lint
# Format the codebase
npx prettier --write .Run the unit test suite built with Vitest:
npm run test- Clean Code Architecture: Emphasizes strict separation between UI views (
features/,components/), State (store/), Custom Audio/Shortcut Hooks (hooks/), and Formatting/Parsing Utilities (utils/). - IndexedDB Data Persistence: Replaced simple local storage persistence with an asynchronous
idb-keyvalimplementation in Zustand. This ensures that extensive timing projects with large numbers of lyric lines do not crash the app or exceed browser storage quotas. - Security Constraints Handling: The browser sandbox prevents persistent access to local audio files (
.flac). The app maintains lyric timing states but requires the user to re-select the audio file when reopening a project. - TypeScript Strictness: Project avoids
anytypes by utilizing interface-driven models found insrc/typesand strict compiler options.