This project is a TypeScript monorepo containing two applications:
- Unofficial Suno API: An AI for generating music. This is a submodule of a fork of the unofficial Suno API repository.
- NestJS Application: Consumes the Suno API to generate songs and videos with the help of the OpenAI API and automatically uploads these videos to a YouTube channel and playlist periodically using cron and Bull.
- Installation
- Configuration
- Usage
- Project Structure
- Docker
- Google Cloud Credentials
- Scripts
- Additional Notes
-
Clone the repository:
git clone <REPOSITORY_URL> cd <REPOSITORY_NAME>
-
Install dependencies using
pnpm
:pnpm install
-
YouTube API:
- Configure credentials for the YouTube API in Google Cloud.
- Download the
credentials.json
file and copy it to/apps/orchestrator
.
-
Token Generation:
-
Run the following script to generate the
token.json
file:node apps/orchestrator/index.js
-
Remember that the
redirect_uri
you need to set in thecredentials.json
file isurn:ietf:wg:oauth:2.0:oob
to generate the token, which theindex.js
script will then request.
-
-
Start the application using Docker Compose:
docker-compose up
-
Periodically update the Suno cookie, as it expires every 7 days.
/apps
/api-suno
: Unofficial Suno API (submodule)./orchestrator
: NestJS application that consumes the Suno API, generates content, and uploads it to YouTube.
This project uses docker-compose
to start the applications. Make sure you have Docker and Docker Compose installed on your system.
To configure Google Cloud credentials:
- Create a project in Google Cloud and enable the YouTube API.
- Configure the OAuth consent screen.
- Create OAuth 2.0 credentials and download the
credentials.json
file. - Copy
credentials.json
to/apps/orchestrator
. - Run the script
node apps/orchestrator/index.js
to generate thetoken.json
file.
-
Generate Token:
node apps/orchestrator/index.js
- Ensure you update the Suno cookie periodically, as it expires every 7 days.
- The project uses
cron
andBull
for periodic task execution.