refactor: migrate project from Flask to Next.js with TypeScript, Prisma, and Edge TTS integration

This commit is contained in:
2026-09-03 00:16:04 -07:00
parent 84f79dc5f9
commit f033a6045c
60 changed files with 5340 additions and 2179 deletions
+50 -5
View File
@@ -1,10 +1,55 @@
# Be my anchor
# Be My Anchor 🎙️
Make you a podcast like audio fomr articles you'd like to read but want to listen instead.
> Transform articles, tech blogs, and research papers into an engaging, hearing-first multimedia podcast experience.
## How to run it
---
## Features (Milestone 1)
- **High-Fidelity Neural Audio Generation**: Multi-provider TTS architecture powered by Microsoft Edge Neural Voices (free, zero-key) with OpenAI TTS interface ready.
- **Smart Text Chunking & Audio Stitching**: Automatically splits long articles and paragraphs into natural spoken chunks, stitches them into a unified `.mp3`, and calculates precise timing cues.
- **Local File System Audio Storage**: Decoupled audio management with native HTTP Range streaming support for smooth scrubbing.
- **Synchronized Web Player**:
- Interactive player with Play / Pause, Progress scrubbing, Speed controls (0.8x - 2.0x), and ±15s jumps.
- Live synchronized transcript that auto-scrolls and highlights the active spoken paragraph.
- Click-to-seek directly from transcript.
- **Episode Library**: Local database persistence via Prisma & SQLite (easily migratable to MongoDB / PostgreSQL).
---
## Tech Stack
- **Framework**: Next.js 16 (App Router) + React 19 + TypeScript
- **Styling**: Tailwind CSS + Lucide Icons
- **Database & ORM**: Prisma + SQLite
- **Audio Engine**: `msedge-tts` (Neural TTS)
---
## Quick Start
### 1. Install Dependencies
```bash
npm install
```
make setup
python -m src.server.app
### 2. Initialize Database
```bash
npx prisma db push
```
### 3. Run Development Server
```bash
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) in your browser.
---
## Architecture & Roadmap
Refer to [Product Requirements Document (`docs/prd.md`)](docs/prd.md) for full architecture details:
- **Phase 1 (Complete)**: Audio generation core, chunking, stitching, local audio storage, and synchronized web player.
- **Phase 2 (Upcoming)**: Hearing-front LLM transformation (Feynman Deep-Dive Presenter & Dual-Host Banter).
- **Phase 3 (Upcoming)**: Synchronized visual stage (displaying diagrams, figures, and code in sync with audio).