Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4,369 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modrinth Monorepo Cover

Issues Pull Requests Contributors Lines of Code Commit Activity Last Commit

Modrinth Monorepo

Welcome to the Modrinth Monorepo, the primary codebase for the Modrinth web interface and app. It contains Lines of Code lines of code and has Contributors 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.

Architecture

  • 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

Apps (apps/)

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)

Packages (packages/)

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

Deployment

环境要求

配置 最低要求 推荐要求
CPU 2 核 4 核及以上
内存 4 GB 8 GB及以上
磁盘 50 GB 100 GB及以上
网络 10 Mbps 100 Mbps及以上

一键部署

方式一:从 Gitee 克隆(推荐)

cd /opt
git clone https://gitee.com/xcqmtd/code.git modrinth
cd /opt/modrinth
chmod +x deploy.sh
sudo ./deploy.sh

方式二:从 GitHub 克隆

cd /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/

Development

This repository contains two primary packages. For detailed development information, please refer to their respective guides:

Dev Commands

  • Website: pnpm web:dev (copy .env template in apps/frontend/ first)
  • App: pnpm app:dev (copy .env template in packages/app-lib/ first)
  • Storybook (packages/ui): pnpm storybook

Contributing

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.

Security

If you discover a security vulnerability within our codebase, please follow our responsible disclosure guidelines.

Support

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.

License

All packages in this repository are licensed under their respective licenses. Refer to the LICENSE file in each package for more information.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages