Skip to content

andrebuilds/melodyc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Melodyc

AI-powered music generation platform
Generate original songs from text descriptions, custom lyrics, or style prompts.

License PRs Welcome Next.js Python


Overview

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.


Features

  • 🎡 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

Tech Stack

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

Getting Started

Prerequisites

Clone the repository

git clone --recurse-submodules https://github.com/andrebuilds/melodyc.git
cd melodyc

Backend Setup

For 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.py

AWS S3 Configuration

Two 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.


Frontend Setup

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

Documentation

Section File
Backend guide (Modal, AWS, Python) backend/getting-started.md
Frontend guide (Auth, DB, Inngest, Payments, Deploy) frontend/getting-started.md

Contributing

Contributions are welcome. Read CONTRIBUTING.md for the development workflow, contribution requirements, and pull request guidelines.

Community and Support


License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Authors

Created and maintained by:

About

Open source SaaS platform for AI-powered music generation. Generate full tracks from text using ACE-Step, Qwen2 and SDXL-Turbo. Stack: Next.js 15, Python/Modal, Inngest, Polar.sh, BetterAuth. A starting point for learning how to build a complete AI SaaS.

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages