Welcome to the Modrinth Monorepo, the primary codebase for the Modrinth web interface and app. It contains lines of code and has
contributors!
If you're not a developer and you've stumbled upon this repository, you can access the web interface on the Modrinth website and download the latest release of the app here.
- Monorepo tooling: Turborepo + pnpm workspaces
- Frontend: Vue 3 / Nuxt 3, Tailwind CSS v3
- Backend: Rust (Labrinth API), Postgres, Clickhouse
- Indentation: Use TAB everywhere, never spaces
| App | Description |
|---|---|
frontend |
Main Modrinth website (Nuxt 3) |
app-frontend |
Desktop/app frontend (Vue 3) |
app |
Desktop/app shell (Tauri) |
app-playground |
Testing playground for app |
labrinth |
Backend API service |
daedalus_client |
Daedalus client implementation |
docs |
Documentation site (Astro) |
| Package | Description |
|---|---|
ui |
Shared Vue component library (@modrinth/ui) |
assets |
Styling and auto-generated icons (@modrinth/assets) |
api-client |
API client for Nuxt, Tauri, and Node/browser |
app-lib |
Shared app library |
blog |
Blog system and changelog data |
utils |
Shared utility functions (mostly deprecated) |
moderation |
Moderation utilities |
daedalus |
Daedalus protocol |
tooling-config |
ESLint, Prettier, TypeScript configs |
ariadne |
Analytics library |
modrinth-log |
Logging utilities |
modrinth-maxmind |
MaxMind GeoIP |
modrinth-util |
General utilities |
muralpay |
Payment processing |
path-util |
Path utilities |
sqlx-tracing |
SQLx query tracing |
| 配置 | 最低要求 | 推荐要求 |
|---|---|---|
| CPU | 2 核 | 4 核及以上 |
| 内存 | 4 GB | 8 GB及以上 |
| 磁盘 | 50 GB | 100 GB及以上 |
| 网络 | 10 Mbps | 100 Mbps及以上 |
cd /opt
git clone https://gitee.com/xcqmtd/code.git modrinth
cd /opt/modrinth
chmod +x deploy.sh
sudo ./deploy.shcd /opt
git clone https://github.com/StarsevenMeow/modrinth-code.git modrinth
cd /opt/modrinth
chmod +x deploy.sh
sudo ./deploy.sh一键部署脚本支持以下环境变量参数:
| 参数 | 说明 | 默认值 |
|---|---|---|
DOMAIN |
指定域名(避免交互式输入) | 无 |
CERT_EMAIL |
指定 SSL 证书邮箱 | 无 |
SKIP_DOCKER |
跳过 Docker 安装 | false |
SKIP_PORT_CHECK |
跳过端口检查 | false |
USE_SELF_SIGNED |
使用自签名证书 | false |
# 示例:指定域名和邮箱,跳过交互式输入
DOMAIN=your-domain.com [email protected] ./deploy.sh
# 示例:离线部署(已安装 Docker,使用自签名证书)
SKIP_DOCKER=true USE_SELF_SIGNED=true ./deploy.sh详细的手动部署教程请参考 DEPLOYMENT_GUIDE.md,包含:
- 服务器准备(系统更新、防火墙配置、域名解析)
- Docker 和 Docker Compose 安装
- 目录结构创建
- 环境变量配置
- Docker Compose 配置
- SSL 证书配置(Certbot)
- Nginx 反向代理配置
- 服务管理命令
- 常见问题排查
- 安全建议
# 启动服务
cd /opt/modrinth
docker-compose up -d
# 停止服务
docker-compose down
# 查看服务状态
docker-compose ps
# 查看服务日志
docker-compose logs -f
# 更新服务
docker-compose pull && docker-compose up -d| 文件 | 路径 |
|---|---|
| Docker Compose | /opt/modrinth/docker-compose.yml |
| 环境变量 | /opt/modrinth/.env |
| Nginx 配置 | /opt/modrinth/nginx/modrinth.conf |
| SSL 证书 | /opt/modrinth/nginx/ssl/ |
This repository contains two primary packages. For detailed development information, please refer to their respective guides:
- Website:
pnpm web:dev(copy.envtemplate inapps/frontend/first) - App:
pnpm app:dev(copy.envtemplate inpackages/app-lib/first) - Storybook (packages/ui):
pnpm storybook
We welcome contributions! Before submitting any contributions, please read our contributing guidelines.
If you plan to fork this repository for your own purposes, please review our copying guidelines.
If you discover a security vulnerability within our codebase, please follow our responsible disclosure guidelines.
If you need help with the Modrinth web interface or app, please visit our support page. For general inquiries, you can also join our Discord server.
All packages in this repository are licensed under their respective licenses. Refer to the LICENSE file in each package for more information.
