Skip to content

Conversation

@IMB11
Copy link
Member

@IMB11 IMB11 commented Nov 1, 2025

  • Base structure of the package
  • Move projects v2/v3 stuff from utils to package as an example
  • Create DI provider for the nuxt client singleton
  • Modify projects pages (app + web) to use new package.

@IMB11 IMB11 requested a review from Prospector November 1, 2025 14:49
@IMB11 IMB11 added website Relates to Modrinth.com web frontend app Relates to Modrinth App frontend Involves work from the frontend team dev-ex Improvements to developer experience labels Nov 1, 2025
@IMB11 IMB11 marked this pull request as draft November 1, 2025 19:03
@IMB11 IMB11 marked this pull request as ready for review November 7, 2025 08:32
@IMB11
Copy link
Member Author

IMB11 commented Nov 7, 2025

We will figure out publishing at a later date.

Copy link
Member

@Prospector Prospector left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall, quite cool but quite concerned that the tauri implementation is not doing what we want

@IMB11 IMB11 requested a review from Copilot November 11, 2025 23:18
Copilot finished reviewing on behalf of IMB11 November 11, 2025 23:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a new @modrinth/api-client package to provide a flexible, type-safe API client for Modrinth's APIs (Labrinth, Kyros, and Archon). The implementation supports multiple platforms (Node.js, browsers, Nuxt, Tauri) with a composable feature system for authentication, retries, circuit breaking, and logging.

Key changes:

  • New modular API client package with platform-specific implementations
  • Feature system for composable request/response processing (auth, retry, circuit breaker, verbose logging)
  • Migration of projects v2/v3 functionality from utils package to new client modules
  • Frontend app updated to use new DI-based client singleton

Reviewed Changes

Copilot reviewed 41 out of 45 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/api-client/* New package with core client, features, modules, and platform implementations
packages/utils/api/* Removed old API implementation now replaced by api-client package
packages/ui/src/providers/api.ts Removed old API provider in favor of new client
apps/frontend/src/providers/api-client.ts New DI provider for Nuxt client singleton
apps/frontend/src/app.vue Updated to use new client provider
apps/frontend/src/error.vue Updated to provide client in error page
apps/frontend/src/pages/[type]/[id]/settings/*.vue Updated to use new client API
pnpm-lock.yaml Added api-client dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

IMB11 and others added 2 commits November 12, 2025 09:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Calum H. <hendersoncal117@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Calum H. <hendersoncal117@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Calum H. <hendersoncal117@gmail.com>
Copy link
Member

@Prospector Prospector left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved, but only use for archon and kyros for now. Labrinth stuff needs more cooking/maybe a different solution

@Prospector Prospector added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit 70e2138 Nov 12, 2025
3 checks passed
@IMB11 IMB11 deleted the cal/dev-392 branch November 14, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Relates to Modrinth App dev-ex Improvements to developer experience frontend Involves work from the frontend team website Relates to Modrinth.com web frontend

Development

Successfully merging this pull request may close these issues.

3 participants