Skip to content

nocoo/lyre

Repository files navigation

Lyre Logo

Lyre

Audio recording management and transcription platform
Upload Β· Transcribe Β· Explore

Vite Cloudflare Workers Cloudflare D1 TypeScript License

Lyre Preview


Features

  • Audio Upload β€” Direct-to-OSS presigned upload with progress tracking (up to 500 MB)
  • ASR Transcription β€” Aliyun DashScope async job, polled by a Cloudflare Cron Trigger
  • AI Summaries β€” Multi-provider LLM summarization (OpenAI, Anthropic) with streaming markdown
  • Audio Player β€” Custom player with play/pause, skip, variable speed, and progress seeking
  • Transcript Viewer β€” Sentence view synced to playback, full-text view, one-click copy
  • Word-Level Karaoke β€” Lazy-loaded word timestamps, clickable words for seeking, real-time highlighting
  • Recording Management β€” CRUD, search, folders, tags, status filter, pagination, and sorting
  • Dashboard β€” Charts and statistics for recording activity overview
  • Cloudflare Access SSO β€” Email-based access control enforced at the edge
  • Cloudflare D1 β€” Serverless SQLite store managed entirely on the Cloudflare edge
  • Remote Backup β€” Bidirectional Backy integration (push + pull webhook)
  • macOS App β€” Native Swift/SwiftUI menu bar app for meeting recording (mic + system audio)

Architecture

                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   Browser ───▢ β”‚ Cloudflare Access (SSO + JWT)            β”‚
                β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                β”‚ Worker `lyre-api`  (apps/api)            β”‚
                β”‚   β€’ Hono router                          β”‚
                β”‚   β€’ Static SPA via [assets] (apps/web)   β”‚
                β”‚   β€’ D1 binding `DB`                      β”‚
                β”‚   β€’ Cron Trigger β†’ ASR poll              β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚              β”‚
                         β–Ό              β–Ό
                   Aliyun OSS    Aliyun DashScope
                   (audio blobs)  (qwen3-asr-flash)
  • apps/web β€” Vite SPA, served as static assets by the Worker.
  • apps/api β€” Hono Worker entry, middleware (Access JWT, bearer token), and route adapters.
  • packages/api β€” Framework-agnostic handlers, services, repos, contracts (@lyre/api).
  • apps/macos β€” Native menu bar recorder that uploads via the Worker API.

Quick Start

1. Install dependencies

# Requires Bun: https://bun.sh
bun install

Supply-chain hardening β€” trusted dependencies. Bun does not run npm lifecycle scripts (preinstall / install / postinstall / prepare) for dependencies by default. This repo's package.json declares an explicit trustedDependencies allow-list, which replaces Bun's built-in 367-package default list β€” only packages on this short list are permitted to execute install scripts. Current entries:

  • better-sqlite3 β€” fetches the prebuilt native binding used by the in-memory test DB.
  • husky β€” installs the local git hooks declared in .husky/.

Trusted fallback procedure. If a new dependency genuinely needs to run an install script (typical case: a package shipping a prebuilt native binding), add it to trustedDependencies in the same PR that introduces the dependency. Reviewers must inspect the package's install script and confirm it is not an attack vector before approving. Packages omitted from the list silently skip their lifecycle scripts β€” confirm via bun pm untrusted after install.

2. Configure environment variables

The Worker reads its config from Wrangler (apps/api/wrangler.toml + secrets). The Vite SPA only needs the API origin at build time.

See docs/01-deployment.md for the full list of Cloudflare bindings (D1, vars, secrets) and how to provision them.

3. Local development

# Vite SPA (web UI)
bun run web:dev

# Hono Worker against a local D1 (separate terminal)
bun run worker:dev

4. Deploy

# Build the SPA into apps/web/dist, then publish the Worker
bun run deploy        # production
bun run deploy:test   # staging environment

Project Structure

lyre/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/        Vite SPA (@lyre/web) β€” bundled into the Worker as static assets
β”‚   β”œβ”€β”€ api/        Hono Worker (@lyre/api-worker) β€” entry, middleware, routes, cron
β”‚   └── macos/      Native Swift/SwiftUI menu bar app
β”œβ”€β”€ packages/
β”‚   └── api/        @lyre/api β€” handlers, services, repos, contracts (framework-agnostic)
β”œβ”€β”€ docs/
└── package.json    Bun workspaces root

Tech Stack

Layer Technology
Runtime Bun (dev/build), Cloudflare Workers (prod)
Web Vite 7 + React 19 + TypeScript 5
API Hono 4 on Cloudflare Workers
Database Cloudflare D1 (SQLite) via Drizzle ORM
UI shadcn/ui + Radix UI + Tailwind CSS v4
Auth Cloudflare Access (web) + bearer device tokens (macOS)
AI Vercel AI SDK (OpenAI + Anthropic)
Storage Aliyun OSS (zero-SDK, custom V1 signature)
ASR Aliyun DashScope (qwen3-asr-flash-filetrans)
Job polling Cloudflare Cron Trigger β†’ cronTickHandler
Deploy Wrangler (bun run deploy)

Common Commands

Command Description
bun run web:dev Start the Vite SPA dev server
bun run worker:dev Start the Hono Worker locally (Wrangler)
bun run lint Lint web + @lyre/api
bun run typecheck Typecheck web + worker + @lyre/api
bun run test Unit tests for web + worker + @lyre/api
bun run test:coverage @lyre/api coverage gate
bun run deploy Build SPA + publish Worker to production
bun run deploy:test Build SPA + publish Worker to staging

License

MIT Β© 2026

About

🎢 Audio recording management and transcription platform with word-level karaoke playback

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages