How marcelo-maga/code-modrinth works
Main Components
• Web Interface: Represented primarily by the frontend code in apps/frontend (built using Nuxt/Vue) and its supporting assets, styles, middleware, and API routes.
• Desktop App: Found in apps/app. It contains Tauri configurations along with Rust components and native integrations. Also note the daedalus_client under apps – a further client component running as a separate executable.
• Additional Clients/Utilities: Other apps such as apps/app-playground, apps/daedalus_client, labrinth, and docs. These components may have their own build pipelines and runtime logic.
• Shared Libraries and Packages: The packages folder contains several modules such as app-lib (with its own Rust code and SQL migrations), UI libraries, ESLint configurations, TSConfig presets, utilities, and more. They provide common functionality (API handling, state management, asset utilities, etc.) that are reused across the apps.
• Development & Configuration Tools: Top-level configuration files (.cargo, .github, pnpm-workspace.yaml, etc.) and CI/CD workflows. They orchestrate building, testing, and deploying across the entire monorepo.
Relationships and Interactions
• The desktop app interacts with native integrations, Tauri configurations (apps/app/tauri*.json, build.rs) and may also use back-end Rust modules (database, authentication, process management) within the same directory.
• Both frontend and desktop components interact with backend APIs that can be traced in routes, API helper modules (for instance, in apps/app/src/api/ and apps/daedalus_client/src).
• The CI/CD configuration (inside .github/workflows) automates builds for multiple apps, and the multi-package management via pnpm and Turbo (e.g., turbo.json) ties everything together.
Architectural Patterns & Technologies
• Monorepo Structure: Separation of concerns using the “apps” and “packages” directories. Each app is self-contained yet shares common code via packages.
• Full-Stack Separation: The web interface (client-side UI) is clearly split from the desktop’s backend (native Rust via Tauri) while both re-use shared modules.
• Modern Tech Stack: Note the use of Rust (for native/back-end parts), TypeScript/JavaScript (front-end code and shared utilities), Vue/Nuxt (web interface), and SQL migrations (database schema management).
Suggested Elements
• Under “Packages”: List key modules such as app-lib, ui, eslint-config-custom, tsconfig, and utils.