Skip to content
bibekgupta3333Public

About

Lyrica - AI-Powered Complete Song Generator 🎡 A full-stack monorepo for generating complete songs - lyrics, vocals with customizable pitch, and instrumental music using AI agents, RAG, and local LLMs. Transform your ideas into full songs ready for playback and download!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

57 Commits

Folders and files

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

Repository files navigation

Lyrica - AI-Powered Complete Song Generator 🎡

A full-stack monorepo for generating complete songs - lyrics, vocals with customizable pitch, and instrumental music using AI agents, RAG, and local LLMs. Transform your ideas into full songs ready for playback and download!

✨ Key Features

🎀 Complete Song Generation

  • Lyrics Creation: AI-powered lyrics with multi-agent system
  • Voice Synthesis: Text-to-speech with customizable pitch and effects
  • Music Composition: Genre-matched instrumental music generation
  • Professional Mixing: Automated multi-track mixing and mastering

🎡 Audio Capabilities

  • Voice Profiles: Multiple voice options with different styles
  • Pitch Control: Adjust vocal pitch up/down 12 semitones
  • BPM Control: Set tempo from 40-220 BPM
  • Audio Effects: Reverb, echo, compression, and more
  • Multi-track Production: Separate vocal and instrumental tracks
  • Format Support: MP3, WAV, OGG, FLAC, M4A

πŸ€– AI-Powered Features

  • Multi-Agent System: Planning, Generation, Refinement, Voice, Music agents
  • RAG Integration: Context-aware lyrics from vector database
  • Real-time Streaming: Watch lyrics and audio generation live
  • Quality Scoring: Automatic quality assessment

πŸ“± Multi-Platform

  • Web App: Full-featured web interface with audio player
  • Mobile App: Native iOS and Android with offline playback
  • Background Play: Continue listening while app is in background
  • Download: Save songs for offline access

πŸ—οΈ Monorepo Structure

lyrica/
β”œβ”€β”€ lyrica-backend/          # FastAPI backend with LangGraph agents
β”œβ”€β”€ lyrica-web/              # Next.js web application
β”œβ”€β”€ lyrica-mobile/           # React Native mobile app
β”œβ”€β”€ package.json             # Root package.json with workspace scripts
β”œβ”€β”€ turbo.json               # TurboRepo configuration
β”œβ”€β”€ pnpm-workspace.yaml      # pnpm workspace configuration
└── docker-compose.yml       # Docker services (PostgreSQL, Redis, ChromaDB)

πŸš€ Quick Start

Prerequisites

  • Node.js 22+
  • pnpm 8+
  • Python 3.12+
  • Docker & Docker Compose
  • Ollama (optional, for local LLM)

Installation

# Install pnpm globally if you haven't
npm install -g pnpm

# Install all dependencies (backend + frontend)
pnpm install

# Set up backend (creates venv, installs Python deps)
cd lyrica-backend && bash scripts/setup.sh && cd ..

Running Everything

# Start all services (PostgreSQL, Redis, ChromaDB)
pnpm docker:up

# Run backend + web + mobile in parallel
pnpm dev

# Or run individually:
pnpm dev:backend   # Backend only (port 8000)
pnpm dev:web       # Web only (port 3000)
pnpm dev:mobile    # Mobile only (Expo)

Access Points

πŸ“¦ Available Scripts

Root Level Commands

pnpm dev              # Run all apps in parallel
pnpm build            # Build all apps
pnpm test             # Run all tests
pnpm lint             # Lint all apps
pnpm format           # Format all code
pnpm clean            # Clean all build artifacts

# Docker commands
pnpm docker:up        # Start services
pnpm docker:down      # Stop services
pnpm docker:logs      # View logs

# Database commands
pnpm db:migrate       # Create migration
pnpm db:upgrade       # Apply migrations
pnpm db:seed          # Seed database

Backend Commands

cd lyrica-backend
make dev              # Run backend server
make test             # Run tests
make lint             # Lint code
make format           # Format code
make db-upgrade       # Apply migrations
make db-seed          # Seed database

Web Commands

cd lyrica-web
pnpm dev              # Run dev server
pnpm build            # Build for production
pnpm start            # Start production server
pnpm lint             # Lint code

Mobile Commands

cd lyrica-mobile
pnpm install          # Install dependencies
pnpm start            # Start Metro bundler
pnpm android          # Run on Android
pnpm ios              # Run on iOS (macOS only)

πŸ›οΈ Architecture

Backend (FastAPI)

  • Framework: FastAPI with async support
  • Database: PostgreSQL (via SQLAlchemy)
  • Cache: Redis
  • Vector Store: ChromaDB for RAG
  • LLM: Ollama (Llama 3 / Mistral)
  • Agents: LangGraph multi-agent system
  • Embeddings: sentence-transformers
  • Voice Synthesis: Bark / Coqui TTS
  • Music Generation: MusicGen / AudioCraft
  • Audio Processing: librosa, pydub, soundfile

Frontend Web (Next.js)

  • Framework: Next.js 14+ with App Router
  • Language: TypeScript
  • Styling: Tailwind CSS
  • State: Zustand / TanStack Query
  • API Client: Axios / Fetch

Mobile (React Native)

  • Framework: React Native CLI (0.76+)
  • Navigation: React Navigation 6
  • Language: TypeScript
  • State: Zustand / TanStack Query
  • Platforms: iOS, Android

πŸ“š Documentation

All documentation is organized in the docs/ folder:

Getting Started

Architecture

Guides

Planning

Component Docs

Development

🐳 Docker Services

# PostgreSQL - Port 5432
# Redis - Port 6379
# ChromaDB - Port 8001

# Start all services
docker-compose up -d

# Check status
docker-compose ps

# View logs
docker-compose logs -f

# Stop all services
docker-compose down

πŸ”§ Development Workflow

1. Start Services

pnpm docker:up

2. Initialize Database

pnpm db:upgrade
pnpm db:seed

3. Run Development Servers

pnpm dev

4. Make Changes

  • Backend code: lyrica-backend/app/
  • Web code: lyrica-web/src/
  • Mobile code: lyrica-mobile/

5. Test & Lint

pnpm test
pnpm lint
pnpm format

🌳 Project Structure

Backend

lyrica-backend/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/              # API endpoints
β”‚   β”œβ”€β”€ core/             # Core config
β”‚   β”œβ”€β”€ models/           # Database models
β”‚   β”œβ”€β”€ schemas/          # Pydantic schemas
β”‚   β”œβ”€β”€ crud/             # CRUD operations
β”‚   β”œβ”€β”€ services/         # Business logic
β”‚   β”œβ”€β”€ agents/           # LangGraph agents
β”‚   └── db/               # Database utilities
β”œβ”€β”€ tests/                # Tests
β”œβ”€β”€ scripts/              # Utility scripts
β”œβ”€β”€ alembic/              # Database migrations
└── requirements.txt      # Python dependencies

Web

lyrica-web/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/              # Next.js App Router
β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ lib/              # Utilities
β”‚   └── styles/           # Global styles
└── public/               # Static assets

Mobile

lyrica-mobile/
β”œβ”€β”€ app/                  # Expo Router pages
β”œβ”€β”€ components/           # React Native components
β”œβ”€β”€ services/             # API services
└── assets/               # Images, fonts, etc.

🚒 Deployment

See DEPLOYMENT_GUIDE.md for detailed deployment instructions including:

  • Docker deployment
  • AWS infrastructure (Terraform)
  • Kubernetes (EKS + Helm)
  • CI/CD with GitHub Actions

🀝 Contributing

  1. Create a feature branch
  2. Make your changes
  3. Run tests and linting
  4. Submit a pull request

πŸ“ License

[Your License Here]

πŸ‘€ Author

Bibek Gupta


Built with ❀️ using FastAPI, Next.js, React Native, and TurboRepo

About

Lyrica - AI-Powered Complete Song Generator 🎡 A full-stack monorepo for generating complete songs - lyrics, vocals with customizable pitch, and instrumental music using AI agents, RAG, and local LLMs. Transform your ideas into full songs ready for playback and download!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages