https://github.com/aritrac1/lyrixtube
LyrixTube is a full-stack application that extracts song information from YouTube music links and retrieves accurate lyrics using the Genius Lyrics API. Built with Flutter for a beautiful UI and Node.js/Express for a robust backend.
https://github.com/aritrac1/lyrixtube
android dart dio docker docker-compose expressjs flutter full-stack-app-development genius-api ios javascript lyrics-generator mobile-app nodejs provider provider-state-management youtube-music-lyrics-generator
Last synced: about 20 hours ago
JSON representation
LyrixTube is a full-stack application that extracts song information from YouTube music links and retrieves accurate lyrics using the Genius Lyrics API. Built with Flutter for a beautiful UI and Node.js/Express for a robust backend.
- Host: GitHub
- URL: https://github.com/aritrac1/lyrixtube
- Owner: AritraC1
- Created: 2026-01-26T16:02:42.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-05-19T06:42:36.000Z (about 2 months ago)
- Last Synced: 2026-05-19T09:09:53.750Z (about 2 months ago)
- Topics: android, dart, dio, docker, docker-compose, expressjs, flutter, full-stack-app-development, genius-api, ios, javascript, lyrics-generator, mobile-app, nodejs, provider, provider-state-management, youtube-music-lyrics-generator
- Language: Dart
- Homepage:
- Size: 499 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π΅ LyrixTube
> A full-stack lyrics lookup app that generates song lyrics from YouTube music links.
LyrixTube combines a Flutter mobile frontend with a Node.js/Express backend. The backend extracts metadata from YouTube URLs, searches Genius for lyrics, formats them, and caches results in MongoDB.
## β¨ Whatβs Included
- π¬ YouTube song metadata extraction using `play-dl`
- π Lyrics lookup with `genius-lyrics`
- π§ MongoDB caching layer for repeated searches
- π± Flutter UI with Provider state management and Dio HTTP client
- π³ Docker Compose setup for backend + MongoDB
- π§ͺ Jest backend tests with Supertest
## π οΈ Tech Stack
### Frontend
- Flutter
- Dart
- Provider
- Dio
- Shimmer
### Backend
- Node.js
- Express
- MongoDB / Mongoose
- Genius Lyrics API
- play-dl
- CORS
- dotenv
## Demo
| Home | Lyrics |
| -------------------------------------------------- | --------------------------------------------------- |
|
|
|
## π Project Structure
```
LyrixTube/
βββ lyrix_tube_app/ # Flutter frontend
β βββ lib/
β β βββ main.dart
β β βββ provider/ # app state
β β βββ screen/ # UI screens
β βββ android/
β βββ ios/
β βββ pubspec.yaml
βββ server/ # Node.js backend
β βββ Dockerfile
β βββ .env.example
β βββ index.js
β βββ app.js
β βββ config/db.js
β βββ controllers/
β βββ routes/
β βββ services/
β βββ models/
β βββ utils/
βββ docker-compose.yml # backend + MongoDB orchestration
βββ README.md # this file
```
## π Getting Started
### Prerequisites
- Flutter 3.6.0+
- Node.js 14+
- npm or yarn
- Docker & Docker Compose (optional, recommended for backend)
### 1. Clone the repository
```bash
git clone https://github.com/AritraC1/LyrixTube.git
cd LyrixTube
```
### 2. Backend setup
```bash
cd server
npm install
cp .env.example .env
```
Edit `server/.env` and set:
```env
PORT=3000
GENIUS_TOKEN=your_genius_api_key
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=your_mongo_super_secret_password
MONGO_INITDB_DATABASE=lyrixtube
MONGO_URI=mongodb://admin:your_mongo_super_secret_password@mongo:27017/your_database_name?authSource=admin
```
Start the backend locally:
```bash
npm start
```
The backend will run on `http://localhost:3000`.
### 3. Frontend setup
```bash
cd ../lyrix_tube_app
flutter pub get
flutter run
```
## π³ Docker Setup
The backend and MongoDB are orchestrated with Docker Compose.
### Start services
```bash
docker compose up --build -d
```
### Verify services
```bash
docker compose ps
curl http://localhost:3001/health
curl http://localhost:3001/db-health
```
### Stop services
```bash
docker compose down
```
## π API Endpoints
### Health
- `GET /health` β service health status
- `GET /db-health` β MongoDB connection status
### Lyrics
- `POST /api/generate-lyrics`
Request body:
```json
{
"link": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
```
Success response:
```json
{
"status": "success",
"data": {
"song": "Never Gonna Give You Up",
"artist": "Rick Astley",
"lyrics": "[Chorus]\nNever gonna give you up..."
}
}
```
Error response:
```json
{
"status": "error",
"message": "..."
}
```
## π§ Backend behavior
- Validates YouTube video URLs using `play-dl`
- Extracts artist and song names from video titles
- Searches Genius for the best lyrics match
- Filters out junk or translation results
- Formats lyrics and caches them in MongoDB
- Increments `search_count` for repeated lookups
## π§ͺ Testing
Run backend tests:
```bash
cd server
npm test
```
## π Environment variables
Copy `server/.env.example` to `server/.env` and configure values.
- `PORT` β backend port
- `GENIUS_TOKEN` β Genius API token
- `MONGO_URI` β MongoDB URI
- `MONGO_INITDB_ROOT_USERNAME` β MongoDB root user
- `MONGO_INITDB_ROOT_PASSWORD` β MongoDB root password
- `MONGO_INITDB_DATABASE` β database name
## π Notes
- The Flutter app is not containerized in this repository.
- MongoDB is used for caching lyrics and improving repeated requests.
- Docker Compose maps host port `3001` to the backend container port `3000`.
---