Skip to content
andrebuildsPublic

About

Open-source SaaS platform for AI-powered music generation. Generate full tracks with audio and cover art from a text description, custom lyrics, or a style prompt. Built with Next.js 15, Python/Modal (GPU), ACE-Step, Qwen2, SDXL-Turbo, Inngest, Polar.sh and BetterAuth.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

49 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

78 Commits

Folders and files

Repository files navigation

Melodyc logo Melodyc

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

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, background job queues, and serverless GPU inference β€” all working together.

The hosted platform is completely free: every new account gets 100 credits, and a gamification system (missions, challenges, streaks, and badges) that rewards community activity with new credits is coming soon.

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 FLUX.1-schnell
  • 🎀 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
  • πŸ’³ Free credit-based usage system (100 credits on sign-up)
  • πŸ† Gamification to earn credits (coming soon)
  • πŸ‘€ User authentication with BetterAuth, email verification, and password reset
  • πŸ“§ Transactional and notification emails with Resend
  • 🎧 Community feed to discover, listen to, and like generated tracks
  • πŸŽ›οΈ Personal library (My Music) to manage, publish, and download your music in WAV, MP3, and FLAC
  • πŸ§‘β€πŸŽ€ Public creator profiles with username, profile picture, mascot, followers, and following
  • πŸ”” In-app notifications for likes, followers, listen milestones, and generation results
  • πŸ“Š Creator analytics dashboard with 7, 28, and 90 day ranges, period comparisons, interactive charts, and top songs
  • βš–οΈ GDPR-oriented legal pages in English and Italian, consent records, and a granular cookie banner
  • πŸ“ˆ Cookieless Vercel Web Analytics and Speed Insights, loaded only with consent
  • πŸ›‘οΈ Security headers and server-side input validation
  • πŸ“± 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
Email Resend
Analytics Vercel Web Analytics, Vercel Speed Insights (consent-based)
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 FLUX.1-schnell

Getting Started

Prerequisites

  • Node.js 18+
  • Python 3.12
  • A Modal account
  • A Neon account (PostgreSQL)
  • An AWS account (S3)
  • An Inngest account
  • A Resend account

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, Resend)

# 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, 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 with audio and cover art from a text description, custom lyrics, or a style prompt. Built with Next.js 15, Python/Modal (GPU), ACE-Step, Qwen2, SDXL-Turbo, Inngest, Polar.sh and BetterAuth.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

49 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages