Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions amm-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
result
result-*
modules/
75 changes: 73 additions & 2 deletions amm-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,71 @@ This project requires Nix with experimental features enabled. If you haven't alr
mkdir -p ~/.config/nix && echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
```

## Running the UI
Install the Logos package manager CLI globally (one-time):

```bash
nix profile install 'github:logos-co/logos-package-manager#cli'
```

This makes `lgpm` available as a global command.

## Running the UI standalone

Start the UI with:

```bash
nix run .
```

This builds and runs the application in development mode.
This builds and runs the application in development mode. The Logos bridge is unavailable in standalone mode, but the UI layout and mock data are fully functional.

## Running inside Logos Basecamp
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This documents a manual local installation path, but it does not implement the Basecamp integration requested by #29. The linked issue asks for the AMM module to be added to Basecamp's flake inputs, bundled/discoverable at startup, and covered by a smoke test. As written, a fresh Basecamp build still has no AMM module wired into its preinstalled modules, so closing #29 from this PR would make the issue appear solved without changing the Basecamp runtime path.


### 1. Build the LGX package

```bash
# Development variant (requires nix store at runtime)
nix build '.#lgx' --out-link result-lgx

# Portable variant (self-contained, works without nix)
nix build '.#lgx-portable' --out-link result-lgx-portable
```

### 2. Install into Basecamp

```bash
# Launch Basecamp once to initialise its data directory, then quit
nix run 'github:logos-co/logos-basecamp'

# Set the data directory path
# macOS:
BASECAMP_DIR="$HOME/Library/Application Support/Logos/LogosBasecampDev"
# Linux:
# BASECAMP_DIR="$HOME/.local/share/Logos/LogosBasecampDev"

# Install the UI plugin
lgpm --ui-plugins-dir "$BASECAMP_DIR/plugins" \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This command always installs result-lgx/*.lgx into the dev data directory. That is correct only for the development package. If the user followed the portable build command above, this should instead install from result-lgx-portable/*.lgx and target the portable Basecamp data directory. Please split the dev and portable flows so the package variant, Basecamp variant, and data directory match.

install --file result-lgx/*.lgx
```

> **Note:** Use matching variants throughout — dev with dev, portable with portable. Mixing variants causes loading failures. The portable build uses the `LogosBasecamp` data directory instead of `LogosBasecampDev`.

### 3. Launch Basecamp

```bash
nix run 'github:logos-co/logos-basecamp'
```

This fetches, builds, and launches Basecamp in one step. The AMM UI appears as a new tab in the Basecamp sidebar.

### Installing via the Basecamp UI

Alternatively, use the built-in package manager:

1. Launch Basecamp
2. Open Package Manager
3. Select "Install from file"
4. Choose the `.lgx` file from `result-lgx/`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This UI-install fallback also points only at result-lgx/, even though the section documents a portable build at result-lgx-portable/. Please either mention both outputs explicitly or keep the README to a single supported variant.


## Updating Dependencies

Expand All @@ -29,3 +85,18 @@ To update the pinned versions of dependencies in `flake.lock`:
```bash
nix flake update
```

## Troubleshooting

**Stale QML cache after rebuild:**
```bash
QML_DISABLE_DISK_CACHE=1 nix run 'github:logos-co/logos-basecamp'
```

**Reset Basecamp data directory:**
```bash
# macOS
rm -rf ~/Library/Application\ Support/Logos/LogosBasecampDev
# Linux
rm -rf ~/.local/share/Logos/LogosBasecampDev
```
2 changes: 1 addition & 1 deletion amm-ui/flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "Logos QML UI Module — replace with your description";
description = "Logos Swap — Decentralized, privacy preversed trading";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Small typo in public metadata: privacy preversed trading should be privacy-preserving trading .


inputs = {
logos-module-builder.url = "github:logos-co/logos-module-builder";
Expand Down
Loading