How modrinth/code works
The Modrinth monorepo contains the website, desktop app, API, and shared libraries. For the desktop app, users manage Minecraft instances, install content, and access instance features; the frontend and native Rust layer divide that experience. The API exposes platform services, while the website is a separate product. README evidence establishes these products but not their runtime connections. The sampled API route shows OAuth-client operations using persistence and authentication; other unsampled capabilities are represented by their source directories without inferred call flows.
Main entry points: oauth_clients.rs OAuth client routes · main.rs Desktop runtime · frontend/src Modrinth website · app-frontend/src App interface
Components 18
Website
- Modrinth website
apps/frontend/src
Desktop app
- App interface
apps/app-frontend/src - Instance library
apps/app-frontend/src/components/ui/library - Content installation
apps/app-frontend/src/providers - Instance features
apps/app-frontend/src/pages/instance - Download management
apps/app-frontend/src/components/ui/download-manager - Instance sharing
apps/app-frontend/src/components/ui/shared-instances - Desktop runtime
apps/app/src/main.rs - Native commands
apps/app/src/api
Platform API
- API routes
apps/labrinth/src/routes - OAuth client routes
apps/labrinth/src/routes/v3/oauth_clients.rs - API models
apps/labrinth/src/models - API database
apps/labrinth/src/database - File hosting
apps/labrinth/src/file_hosting
Shared libraries
- App state and services
packages/app-lib/src - Query engine
packages/toasty/src/engine.rs - API client library
packages/api-client/src/core/abstract-client.ts
Other components
- Modrinth user
Connections 7
- Modrinth user → Modrinth website: uses
README.md - Modrinth user → App interface: uses
README.md - Modrinth user → API routes: requests services
- Desktop runtime → Native commands: registers
apps/app/src/main.rs - OAuth client routes → API database: queries
apps/labrinth/src/routes/v3/oauth_clients.rs - OAuth client routes → File hosting: uses for icons
apps/labrinth/src/routes/v3/oauth_clients.rs - OAuth client routes → API models: uses models
apps/labrinth/src/routes/v3/oauth_clients.rs