interledger / rafiki

An open-source, comprehensive Interledger service for wallet providers, enabling them to provide Interledger functionality to their users.
https://rafiki.dev/
Apache License 2.0
262 stars 88 forks source link

Rafiki Admin UI Errors When Running Directly via `pnpm dev` #3110

Open JoblersTune opened 2 days ago

JoblersTune commented 2 days ago

Currently, Rafiki offers two different ways to spin up the local playground using Docker Compose:

  1. With Authentication: Spins up the Kratos containers.
  2. Without Authentication: Does not spin up the Kratos containers.

But the third way of accessing Rafiki Admin is by running the Remix app directly in dev mode on your local machine. However, it is annoying when you run this command to get the app up in dev mode, because the application exits with an error stating that no Kratos container URL was provided. Chances are you don't want auth enabled when you're spinning up the app locally since you wouldn't be able to interact with it past the login pages anyway.

Authentication can be disabled by setting AUTH_ENABLED=false, this should ideally be the default behavior when using pnpm dev to spin up the UI. Or at least maybe we could have a note somewhere telling people about this. Or even just remove the dev command option from the package.json file so people know to rather spin it up in dev mode via Docker instead.

Steps to Reproduce

cd into the frontend package and run pnpm dev Observe the error: No Kratos container URL provided. Expected Behavior: When running the Rafiki Admin UI in dev mode with AUTH_ENABLED=false, the application should not require a Kratos container URL. This behavior should be default when dev mode is detected to avoid unnecessary configuration hurdles for developers. This way you have access to the app immediately without further config.

Proposed Solution