Skip to content

An ai music website developed based on Next.js and Suno AI.

Notifications You must be signed in to change notification settings

Sprheany/ai-song

Repository files navigation

This is an ai music website developed based on Next.js. It uses Suno AI to generate music.

Demo

We have deployed an example website on Vercel, so you can see how it runs: ai-song.vercel.app

Deploy on Vercel

Deploy with Vercel

Run locally

  1. obtain the cookie of your Suno AI account

    Locate the request that contains the keyword "client?_clerk_js_version". Navigate to the Cookie section, hover your mouse over it, and copy the value of the Cookie.

  2. clone project

    git clone https://github.com/Sprheany/ai-song.git
  3. install dependencies

    cd ai-song
    npm install
  4. init database

    create your database and run npm run db:push to create tables, then run npm run db:seed to crawl data from Suno API

    Suno API is crawled through the official website, it may not work in the future.

  5. set env variables

    put .env under ai-song root dir with values list below

    SUNO_TOKEN=
    
    POSTGRES_PRISMA_URL=
    POSTGRES_URL_NON_POOLING=
    
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
    CLERK_SECRET_KEY=
    
    NEXT_PUBLIC_URL=
    
    LEMONSQUEEZY_API_KEY=
    LEMONSQUEEZY_STORE_ID=
    LEMONSQUEEZY_PRODUCT_ID=
    LEMONSQUEEZY_WEBHOOK_SECRET=
    

    SUNO_COOKIE is the cookie value you obtained in the first step

  6. run

    npm run dev

    Open http://localhost:3000 with your browser to see the result.

Thanks

About

An ai music website developed based on Next.js and Suno AI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages