AI-powered music generation platform
Generate original songs from text descriptions, custom lyrics, or style prompts.
Melodyc is an open-source SaaS platform that lets users generate original music through artificial intelligence. Describe a mood, paste your lyrics, or define a style β Melodyc takes care of the rest, producing a complete track with audio and AI-generated cover art.
Built with a modern full-stack architecture, Melodyc is designed to be a real-world reference for anyone who wants to learn how to build a production-ready SaaS: authentication, payments, background job queues, and serverless GPU inference β all working together.
All platforms used offer a free tier β you won't need to spend anything to start developing.
- π΅ AI music generation with ACE-Step v1 3.5B
- π§ Automatic lyrics and prompt generation with Qwen2-7B-Instruct
- πΌοΈ AI cover art generation with SDXL-Turbo
- π€ Three generation modes: free description, custom lyrics, described lyrics
- πΈ Instrumental track option (no vocals)
- β‘ Serverless GPU processing with Modal (GPU L40S)
- π Background job queue system with Inngest
- π³ Credit-based usage system
- π° Polar.sh integration for purchasing credit packages
- π€ User authentication with BetterAuth
- π§ Community feed to discover, listen to, and like generated tracks
- ποΈ Personal dashboard to manage, listen to, and publish your music
- π± Modern UI with Next.js, Tailwind CSS and ShadCN
| Area | Technologies |
|---|---|
| Frontend | Next.js 15, React 19, TypeScript, Tailwind CSS 4, ShadCN |
| Authentication | BetterAuth |
| Payments | Polar.sh |
| Database | PostgreSQL (Neon) + Prisma ORM |
| Queue / Workflow | Inngest |
| Storage | AWS S3 |
| AI Backend | Python 3.12, Modal (GPU L40S) |
| Music Model | ACE-Step v1 3.5B |
| Text Model | Qwen2-7B-Instruct |
| Image Model | SDXL-Turbo |
- Node.js 18+
- Python 3.12
- A Modal account
- A Neon account (PostgreSQL)
- A Polar.sh account
- An AWS account (S3)
- An Inngest account
git clone --recurse-submodules https://github.com/andrebuilds/melodyc.git
cd melodycFor the complete step-by-step guide, see backend/getting-started.md.
# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # macOS / Linux
# Install dependencies
cd backend
pip install -r requirements.txt
# Configure Modal
modal setup
# Run locally
modal run main.py
# Deploy
modal deploy main.pyTwo separate IAM users are required β one for the backend (upload + read) and one for the frontend (read-only + presigned URLs).
Backend IAM policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowUploadAndRead",
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject"],
"Resource": "arn:aws:s3:::melodyc-bucket/*"
},
{
"Sid": "AllowList",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::melodyc-bucket"
}
]
}Frontend IAM policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowRead",
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::melodyc-bucket/*"
},
{
"Sid": "AllowList",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::melodyc-bucket"
}
]
}For the full IAM setup walkthrough, see backend/getting-started.md.
For the complete step-by-step guide, see frontend/getting-started.md.
# Install dependencies
cd frontend
npm install
# Configure environment variables
cp .env.example .env
# Fill in your values (database, AWS, Modal, BetterAuth, Polar)
# Apply database migrations
npx prisma migrate dev
# Start the frontend
npm run dev
# Start the Inngest queue (separate terminal)
npx inngest-cli@latest dev| Section | File |
|---|---|
| Backend guide (Modal, AWS, Python) | backend/getting-started.md |
| Frontend guide (Auth, DB, Inngest, Payments, Deploy) | frontend/getting-started.md |
Contributions are welcome. Read CONTRIBUTING.md for the development workflow, contribution requirements, and pull request guidelines.
This project is licensed under the MIT License β see the LICENSE file for details.
Created and maintained by:
- Andrea D'Ambrosio β github.com/andrebuilds
- Thomas Fortuna β github.com/fortunathomas