Skip to main content

Overview

The Modrinth App is a desktop application for managing Minecraft mods, modpacks, and instances. Built with Tauri 2.x, it combines a Rust backend (Theseus) with a Vue 3 frontend. Platforms: Windows, macOS, Linux
Framework: Tauri 2.x
Backend: Rust (Theseus library)
Frontend: Vue 3 + Tailwind CSS

Architecture

Tauri Application Model

Component Separation

  1. Tauri Shell (apps/app/) - Desktop framework, native integrations
  2. Frontend (apps/app-frontend/) - Vue 3 UI rendered in WebView
  3. Backend Library (packages/app-lib/) - Theseus Rust library for core logic

Directory Structure

App Shell (apps/app/)

Frontend (apps/app-frontend/)

Backend Library (packages/app-lib/)

Tauri Commands (IPC)

The frontend communicates with the backend via Tauri commands.

Defining Commands (Rust)

packages/app-lib/src/api/profile.rs

Registering Commands

apps/app/src/main.rs

Calling from Frontend (TypeScript)

apps/app-frontend/src/helpers/profile.ts

Usage in Components

src/pages/Library.vue

Theseus (Backend Library)

Theseus (packages/app-lib/) is the Rust library powering the app.

Core Features

Profile Management

Profiles represent Minecraft instances (game version + mods + config).

Mod Installation

Minecraft Version Management

Java Runtime Detection

Game Launching

State Management

Theseus maintains application state in memory and SQLite.
src/state/mod.rs

Event System

Theseus emits events for long-running operations:
Frontend subscribes:

Database (SQLite)

Local data is stored in SQLite:
migrations/001_create_profiles.sql
Queries:

Frontend (Vue 3)

The frontend is a Vue 3 SPA rendered in Tauri’s WebView.

API Client Integration

Use @modrinth/api-client with TauriModrinthClient:
src/App.vue

Shared Components

The app reuses components from @modrinth/ui:
See the cross-platform-pages skill for shared page components.

Routing

Vue Router handles navigation:
src/router.ts

Native Features

File System Access

Handle modrinth:// URLs:
src/main.rs

System Tray

Auto-Updates

Cross-Platform Builds

Build Targets

CI/CD (GitHub Actions)

The theseus-build.yml workflow builds for all platforms:

Development

Running Locally

This launches the app with:
  • Frontend hot-reloading (Vite HMR)
  • Rust recompilation on code changes (requires manual restart)

Environment Variables

packages/app-lib/.env.local

Debugging

Open DevTools:
  • macOS: Cmd+Option+I
  • Windows/Linux: Ctrl+Shift+I
Rust logs:
Logs appear in the terminal running pnpm app:dev.

Testing

Rust Tests

Frontend Tests

Integration Tests

tests/integration_test.rs

Pre-PR Checks

Distribution

Installers

Tauri creates platform-specific installers:
  • macOS: .dmg (disk image) + .app bundle
  • Windows: .msi (installer) + .exe (portable)
  • Linux: .deb, .AppImage

Download

Users download from modrinth.com/app.

Auto-Updates

The app checks for updates on launch and downloads/installs automatically.

Next Steps

Packages

Learn about shared packages (Theseus, UI, etc.)

Testing

Testing strategies for Rust and Vue

Deployment

CI/CD and release process

Frontend (Web)

Compare with the web frontend architecture