https://github.com/bernietv/ai-music-generator
An open-source AI-powered music lab that generates songs, lyrics, and cover art with a modern full-stack setup β‘πΆπ€π¨
https://github.com/bernietv/ai-music-generator
ace-step awss3 better-auth fastapi inngest modal-labs nextjs polar python3 qwen shadcn-ui stability-ai tailwindcss
Last synced: 3 months ago
JSON representation
An open-source AI-powered music lab that generates songs, lyrics, and cover art with a modern full-stack setup β‘πΆπ€π¨
- Host: GitHub
- URL: https://github.com/bernietv/ai-music-generator
- Owner: BernieTv
- License: mit
- Created: 2025-08-19T10:36:38.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-19T12:46:18.000Z (10 months ago)
- Last Synced: 2025-08-29T23:51:38.883Z (10 months ago)
- Topics: ace-step, awss3, better-auth, fastapi, inngest, modal-labs, nextjs, polar, python3, qwen, shadcn-ui, stability-ai, tailwindcss
- Language: Python
- Homepage: https://ai-music-generator-green.vercel.app
- Size: 14 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MD
Awesome Lists containing this project
README

# πΆ AI Music Generator
An **AI-driven music creation toolkit** that combines lyrics, beats, and cover art generation into a single workflow. Itβs not meant to replace musicians β just to give you something weird, fast, and occasionally impressive without opening GarageBand.
## β¨ Features
- π΅ **AI Music Generation** with ACE-Step
- π§ **LLM-Powered Lyric & Prompt Generation** with Qwen2-7B
- πΌοΈ **AI Thumbnail Generation** with stabilityai/sdxl-turbo
- π€ **Multiple generation modes:** _descriptions, custom lyrics, or described lyrics_
- πΈ **Instrumental Tracks** for music without vocals
- β‘ **Serverless GPU Processing** with Modal for blazing-fast generation
- π **Queue System** powered by Inngest for background task handling
- π³ **Credit-Based System** with **Polar.sh** for seamless pack purchases
- π€ **User Authentication** via BetterAuth
- π§ **Community Music Feed** to explore, play, and like AI-generated songs
- ποΈ **Personal Track Dashboard** to manage, publish, and showcase your music
- π **Python & FastAPI Backend** driving the music logic
- π± **Next.js, Tailwind & Shadcn UI Frontend** for a clean, modern experience
---
## π οΈ Technology Stack
**π Backend:**
- π Python 3.12
- β‘ FastAPI
- βοΈ Modal (serverless GPU execution)
- π Inngest (event-driven queues)
- π¦ AWS S3 (file storage)
**π» Frontend:**
- βοΈ Next.js 14
- π¨ Tailwind CSS
- πΌοΈ Shadcn UI
- π BetterAuth (authentication)
- π³ Polar.sh (credit packs & payments)
**π€ AI Models:**
- π΅ ACE-Step (music generation)
- π§ Qwen2-7B (lyrics & prompts)
- πΌοΈ stabilityai/sdxl-turbo (thumbnails)
---
## π Setup
### Clone the Repo
```bash
git clone --recurse-submodules https://github.com/BernieTv/AI-Music-Generator.git
```
### Backend Setup
```bash
cd backend
pip install -r requirements.txt
modal setup
modal run main.py
modal deploy main.py
```
> β οΈ Note: All **backend environment variables** (AWS keys, S3 bucket name, etc.) should be configured in the **Modal Secrets tab**, not in a local `.env` file.
### Frontend Setup
```bash
cd frontend
npm i
npm run dev
```
### Queue (Inngest)
```bash
cd frontend
npx inngest-cli@latest dev
```
---
## βοΈ AWS Setup
### Policy for Frontend User
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject"],
"Resource": "arn:aws:s3:::music-generation-bucket/*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::music-generation-bucket"
}
]
}
```
### Policy for Backend User
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::music-generation-bucket/*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::music-generation-bucket"
}
]
}
```
---
## π Environment Variables
### Backend
```
AWS_ACCESS_KEY_ID=""
AWS_REGION=""
AWS_SECRET_ACCESS_KEY=""
S3_BUCKET_NAME=""
```
### Frontend
```
DATABASE_URL=""
BETTER_AUTH_SECRET=""
MODAL_KEY=""
MODAL_SECRET=""
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY_ID=""
AWS_REGION=""
S3_BUCKET_NAME=""
GENERATE_FROM_DESCRIPTION=""
GENERATE_FROM_DESCRIBED_LYRICS=""
GENERATE_WITH_LYRICS=""
POLAR_ACCESS_TOKEN=""
POLAR_WEBHOOK_SECRET=""
```
---
## π€ Project Vibe
This project is a playful experiment that blends music and AI. It wonβt replace your favorite artist, but itβs a fun way to turn prompts into beats, lyrics, and cover art. Sometimes the results are surprisingly good, sometimes theyβre quirky β but thatβs part of the charm. Ideal for tinkering, learning, or just seeing what AI comes up with when asked to make music.