Skip to content

Latest commit

 

History

History
136 lines (88 loc) · 5.48 KB

README.md

File metadata and controls

136 lines (88 loc) · 5.48 KB

🟡 Namadillo

About

Namadillo is a Web App built using React, designed to work hand-in-hand with the Namada Browser Extension.

It provides a user-friendly interface for interacting with the Namada network, with development progressing in step with the phases outlined in the Namada Roadmap.

Contribution

Contributions are always welcome! If you're interested in getting involved, please start by reading through our CONTRIBUTING file.

🚀 Getting Started

If you'd like to host Namadillo, there are multiple setup options available. This guide will walk you through the steps to set up and run the project. You can choose to run Namadillo either with Docker or without it, depending on your preference and environment.

Configuration

When the user accesses Namadillo, the interface prompts them to enter valid Namada URLs for the RPC, Indexer, and MASP Indexer services. You can preconfigure these values to simplify the process for the user.

For publicly available infrastructure services, refer to the Namada Ecosystem Repository. Verify the configured URLs are valid and publicly accessible to ensure proper functionality. Invalid URLs, such as local IP addresses or those requiring VPN access, may prevent Namadillo from working correctly.

Preconfiguration can be set up based on how you choose to run Namadillo by editing the appropriate configuration file outlined in the table.

Docker Self-Hosted
apps/namadillo/docker/docker-compose.yml apps/namadillo/public/config.toml

Example:

indexer_url = "https://<namada-indexer>:5001"
rpc_url = "https://<rpc>:26657"
masp_indexer_url = "https://<namada-masp-indexer>:5000"
localnet_enabled = false

Your selected RPC service should include the following ngnix configuration. Without this setup, the interface may fail to sync properly.

add_header Access-Control-Allow-Origin *;
add_header Access-Control-Max-Age 3600;
add_header Access-Control-Expose-Headers Content-Length;

🐳 Docker Deployment

Prerequisites

Before starting, ensure you have the necessary tools and dependencies installed. Below are the steps to set up the required environment.

  • Packages: Install prerequisite packages from the APT repository.
apt-get install -y curl apt-transport-https ca-certificates software-properties-common git nano build-essential

Usage

Ensure you have the latest repository cloned to maintain compatibility with other Namada interfaces. Use the following commands to clone the repository and navigate into its directory.

# Clone this repository, copy the URL from the Code button above.
git clone <copied-url>
cd <repository-name>

Modifiy the docker/namadillo/docker-compose.yml with your required enviroment varibvales, described in teh configraution chapter.

Once the file is updated, build the Docker containers for the project. To build the Docker image, execute the following command from the monorepo root (namada-interface).

Modify the docker/namadillo/docker-compose.yml file to include your required environment variables, as described in the configuration section.

docker compose -f docker/namadillo/docker-compose.yml build

Launch the Namadillo interface containers with the appropriate naming convention for the Namada ecosystem.

# Start the Docker containers in the foreground, displaying logs and keeping the terminal active until stopped.
docker compose -p namada-interface -f docker/namadillo/docker-compose.yml up

# Start the Docker containers in detached mode, running them in the background without displaying logs.
docker compose -p namada-interface -f docker/namadillo/docker-compose.yml up -d

Namadillo is a single-page application, so all paths must be redirected to the index.html file. For ngnix users, refer to the example configuration docker/namadillo/docker-compose.yml for proper setup.

Ach-based Linux

If you're using an Arch-based Linux distribution and encounter the following error:

Error:
the --chmod option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled

You can resolve the issue by installing docker-buildx:

sudo pacman -S docker-buildx

🖥️ Self-Hosted Deployment

Use the following commands to set up your environment.

# Install project dependencies
yarn

# Build WebAssembly dependencies (for using SDK Query)
yarn wasm:build

# Build WebAssembly dependencies with debugging enabled
yarn wasm:build:dev

# Start the application in development mode
yarn dev

# Proxy RPC requests if running chains locally
yarn dev:proxy

# Build a production-ready release
yarn build

# Run ESLint to check for code issues
yarn lint

# Automatically fix ESLint issues
yarn lint:fix

# Execute test suites
yarn test

You can edit RPC, Indexer and MASP Indexer URLs, with the apps/namadillo/public/config.toml as a base, and specify the values you wish to override.