![]()
Hi 🤙 In this project, you'll build a SaaS application that generates original music using AI. The tool uses a state-of-the-art music generation model to create songs from simple text descriptions, custom lyrics, or style prompts. You'll learn how to build a complete production-ready SaaS with user authentication, a credit-based payment system using Polar.sh, and background processing queues to handle user load. All services used in this project are free, so you won't have to pay anything to follow along. We'll use technologies such as Next.js 15, React, Typescript, Tailwind CSS, ShadCN, BetterAuth, Polar, Python, FastAPI, Modal, Inngest, Neon, S3 on AWS, and more.
Features:
Follow these steps to install and set up the project.
git clone --recurse-submodules https://github.com/Andreaswt/ai-music-generation-saas.git
Download and install Python if not already installed. Use the link below for guidance on installation: Python Download
Create a virtual environment with Python 3.12.
Navigate to backend folder:
cd backend
Install dependencies:
pip install -r requirements.txt
Modal setup:
modal setup
Run on Modal:
modal run main.py
Deploy backend:
modal deploy main.py
Install dependencies:
cd frontend
npm i
Run:
npm run dev
Run the local queue development server with Inngest:
cd frontend
npx inngest-cli@latest dev
Policy for frontend user:
{
"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:
{
"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"
}
]
}
2 commits
Python
79.1%
TypeScript
17.6%
Jupyter Notebook
1.2%
![]()
Hi 🤙 In this project, you'll build a SaaS application that generates original music using AI. The tool uses a state-of-the-art music generation model to create songs from simple text descriptions, custom lyrics, or style prompts. You'll learn how to build a complete production-ready SaaS with user authentication, a credit-based payment system using Polar.sh, and background processing queues to handle user load. All services used in this project are free, so you won't have to pay anything to follow along. We'll use technologies such as Next.js 15, React, Typescript, Tailwind CSS, ShadCN, BetterAuth, Polar, Python, FastAPI, Modal, Inngest, Neon, S3 on AWS, and more.
Features:
Follow these steps to install and set up the project.
git clone --recurse-submodules https://github.com/Andreaswt/ai-music-generation-saas.git
Download and install Python if not already installed. Use the link below for guidance on installation: Python Download
Create a virtual environment with Python 3.12.
Navigate to backend folder:
cd backend
Install dependencies:
pip install -r requirements.txt
Modal setup:
modal setup
Run on Modal:
modal run main.py
Deploy backend:
modal deploy main.py
Install dependencies:
cd frontend
npm i
Run:
npm run dev
Run the local queue development server with Inngest:
cd frontend
npx inngest-cli@latest dev
Policy for frontend user:
{
"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:
{
"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"
}
]
}
2 commits
Python
79.1%
TypeScript
17.6%
Jupyter Notebook
1.2%