<p align="center">
<img alt="Suno Music Generator" src="https://github.com/Alvin-Liu/suno-music-generator/blob/master/public/logo.png" width="200" style="margin-bottom: 10px;">
</p>
# Suno Music Generator
[English](./README_EN.md) | [简体中文](./README.md)
这是一个基于 NextJS 开发的非官方 [suno.ai](https://www.suno.ai) 音乐生成网站。可以通过用户输入的 prompt 在一分钟左右的时间生成你想要的歌曲。
## Live Demo
最新版本:[https://sunomusic.fun](https://sunomusic.fun)
v1 版本:[https://v1.sunomusic.fun](https://v1.sunomusic.fun)
开源版本对应 v1 版本,最新版本正在优化中,详情可加微信了解:chengzisangeban。
## 工作原理
通过 JavaScript 逆向工程解析 suno.ai 生成歌曲的 API,并使用 [Lemon Squeezy](https://www.lemonsqueezy.com/) 进行支付。同时,项目内置了 token 更新和保活功能,无需担心 token 过期。
## 一键部署
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/Alvin-Liu/suno-music-generator)
## 快速开始
1. 获取 app.suno.ai 账户的 cookie
找到包含关键词 "client?_clerk_js_version" 的请求。找到请求的 Cookie 部分,并复制 Cookie 的值
2. 克隆项目
```shell
git clone https://github.com/Alvin-Liu/suno-music-generator.git
```
3. 安装依赖
```shell
cd suno-music-generator
pnpm install
```
4. 初始化数据库
使用本地数据库: [local postgres](https://wiki.postgresql.org/wiki/Homebrew)
或者使用在线数据库: [vercel-postgres](https://vercel.com/docs/storage/vercel-postgres)
在 `data/install.sql` 文件中复制创建数据库用到的 sql
5. 设置环境变量
在项目跟目录添加 `.env.local` 文件,填入如下配置:
```
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=""
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
SUNO_COOKIE=""
LEMON_SQUEEZY_HOST=https://api.lemonsqueezy.com/v1
LEMON_SQUEEZY_API_KEY=
LEMON_SQUEEZY_STORE_ID=
LEMON_SQUEEZY_PRODUCT_ID=
LEMON_SQUEEZY_MEMBERSHIP_MONTHLY_VARIANT_ID=
LEMON_SQUEEZY_MEMBERSHIP_SINGLE_TIME_VARIANT_ID=
LEMONS_SQUEEZY_SIGNATURE_SECRET=
POSTGRES_URL=
```
SUNO_COOKIE 是你第一步获取的 cookie 值
6. 本地开发
```shell
pnpm dev
```
打开预览:`http://localhost:3000`
## 致谢
- [Suno AI](https://www.suno.ai)
- [nextjs](https://nextjs.org/docs)
- [clerk](https://clerk.com/docs/quickstarts/nextjs)
- [node-postgres](https://node-postgres.com/)
- [tailwindcss](https://tailwindcss.com/)
- [Lemon Squeezy](https://www.lemonsqueezy.com/)
- [aiwallpaper](https://github.com/all-in-aigc/aiwallpaper)
## 其他
你可以通过以下 Twitter 链接与我联系:
[https://twitter.com/Alvin_Liu_9527](https://twitter.com/Alvin_Liu_9527) 。作为 Twitter 新人,我非常真诚地请求你的关注和支持。
如果此项目对你有所帮助,请考虑请我喝杯咖啡
<a href="https://www.buymeacoffee.com/vnorange" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="40" width="174"></a>
没有合适的资源?快使用搜索试试~ 我知道了~
基于 suno.ai 实现的文字快速创作音乐网站.zip
共63个文件
ts:28个
tsx:20个
json:4个
需积分: 0 1 下载量 179 浏览量
2024-04-23
22:33:44
上传
评论
收藏 132KB ZIP 举报
温馨提示
基于 suno.ai 实现的文字快速创作音乐网站.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于 suno.ai 实现的文字快速创作音乐网站.zip (63个子文件)
WGT-code
contexts
AppContext.tsx 1010B
lib
order.ts 203B
constants.ts 1KB
suno.ts 6KB
.vscode
settings.json 191B
next.config.js 142B
app
(auth)
sign-up
[[...sign-up]]
page.tsx 193B
sign-in
[[...sign-in]]
page.tsx 193B
api
personal
music
route.ts 581B
music
token
route.ts 555B
generate
route.ts 2KB
feed
route.ts 3KB
explore
route.ts 1KB
payment
webhook
route.ts 1KB
checkout
route.ts 3KB
getUserInfo
route.ts 941B
(default)
personal
page.tsx 3KB
pricing
page.tsx 3KB
explore
page.tsx 2KB
layout.tsx 574B
page.tsx 1KB
favicon.ico 17KB
layout.tsx 841B
globals.css 1KB
data
install.sql 841B
services
order.ts 1KB
user.ts 335B
LICENSE 11KB
middleware.ts 706B
utils
querystring.ts 292B
request.ts 687B
response.ts 339B
index.ts 243B
components
footer
index.tsx 4KB
input
index.tsx 4KB
header
index.tsx 2KB
user
index.tsx 1KB
hero
index.tsx 374B
social
index.tsx 823B
ui
avatar.tsx 1KB
input.tsx 915B
button.tsx 2KB
dropdown-menu.tsx 7KB
loading.tsx 497B
package.json 1KB
README_EN.md 3KB
public
logo.png 32KB
tailwind.config.ts 2KB
pnpm-lock.yaml 148KB
types
subscribe.d.ts 119B
order.d.ts 269B
music.d.ts 564B
user.d.ts 310B
context.d.ts 171B
settings.json 139B
models
order.ts 3KB
music.ts 2KB
user.ts 905B
db.ts 204B
.gitignore 385B
tsconfig.json 592B
README.md 3KB
postcss.config.js 82B
共 63 条
- 1
资源评论
JJJ69
- 粉丝: 6249
- 资源: 5775
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功