Skip to content

Repository files navigation

Dexifier

Dexifier swap interface

A privacy-first Web3 swap interface for wallet-connected and walletless cross-chain trading.

Next.js TypeScript Rango Redux Tailwind

What Dexifier Demonstrates

Dexifier is built as a production-style decentralized exchange frontend. It focuses on the hard parts of Web3 product engineering: route discovery, wallet/provider state, transaction confirmation, no-wallet swaps, QR/deposit flows, persistent history, settings, and a polished trading experience.

The project is especially useful as a portfolio example because it shows how a frontend engineer can connect complex third-party protocols to a usable interface without hiding the underlying transaction lifecycle from the user.

Product Motivation

Cross-chain swapping is powerful but often confusing. Users need to choose networks, select tokens, compare routes, connect wallets, understand approvals, track pending transactions, and recover when a route fails. Dexifier organizes that flow into a single interface:

  • Wallet swap mode for users who want direct wallet execution through supported providers.
  • No-wallet swap mode for users who want a one-time deposit address flow without browser wallet connection.
  • Route comparison so users can evaluate recommended, fastest, lowest-fee, and best-rate paths.
  • Local history and status tracking so transactions are not just submitted and forgotten.

Public Dexifier positioning describes the product as a cross-chain/on-chain swap aggregator with privacy-first, no-KYC, no-signup expectations. This repository implements the interface layer around that product idea.

Architecture

flowchart LR
    User[Trader] --> UI[Next.js App Router UI]
    UI --> State[Redux Toolkit + React Context Providers]
    UI --> Wallets[Wallet Providers and Web3Modal]
    UI --> Routes[Rango Routing API]
    UI --> NoWallet[No-Wallet API]

    Routes --> Meta[Chains, Tokens, Swappers]
    Routes --> Quote[Best Routes and Confirm Route]
    Routes --> Tx[Create, Approve, Check Status]

    NoWallet --> Currencies[Currency Metadata]
    NoWallet --> Rate[Rate Quote]
    NoWallet --> Deposit[Create Deposit Transaction]
    NoWallet --> Confirm[Poll Transaction Status]

    State --> Cards[Swap Card, Routes Card, Details Card]
    Wallets --> Manager[Rango Queue Manager]
    Manager --> Pending[Pending Swap Lifecycle]
Loading

Core User Flows

Wallet-Connected Swap

  1. User connects a supported wallet.
  2. App loads blockchain and token metadata from Rango.
  3. User selects source chain/token, destination chain/token, and amount.
  4. App requests best routes from Rango.
  5. Routes are sorted and rendered in the routes card.
  6. User confirms a route.
  7. Queue manager tracks approval, transaction creation, status checks, and failure reporting.

No-Wallet Swap

  1. User selects source and destination currencies/networks.
  2. App requests a rate quote from the no-wallet API.
  3. User submits destination/refund details.
  4. API creates a transaction and returns deposit instructions.
  5. UI renders QR/deposit information and polls transaction status.
  6. History is preserved through the no-wallet Redux slices.

Implementation Highlights

Area Implementation
Routing app/api/rango-api.ts wraps Rango metadata, best routes, transaction creation, approval checks, status checks, and failure reporting.
No-wallet flow app/api/noWallet-api.ts handles currencies, rates, transaction creation, and confirmation polling.
Swap UI app/_components/exchange-card/ coordinates token selection, chain selection, route fetches, and confirmation.
Route display app/_components/routes-card/ renders available swap paths and route metadata.
Transaction detail app/_components/swap-details-card/ surfaces execution details after route confirmation.
Wallet support app/wallet/, app/providers/Web3ModalProvider.tsx, and Rango wallet packages manage provider integration.
State management redux_slice/ separates browser swap state, no-wallet transaction state, settings, filters, routes, and history.
UI system Radix primitives, shadcn-style components, Tailwind, Lucide icons, React Toastify, and modal patterns.

Technology Stack

  • Framework: Next.js 14 App Router, React 18, TypeScript.
  • Web3: Rango SDK, Rango wallet packages, Web3Modal, Wagmi/Viem, Web3.js.
  • State: Redux Toolkit, React Redux, Redux Persist, React Query.
  • Forms and validation: Formik, Yup.
  • UI: Tailwind CSS, Radix UI, Lucide React, custom modal/card components.
  • Utilities: Axios client wrappers, QR generation, queue manager integration.

Repository Structure

Dexifier/
  app/
    _components/
      exchange-card/          # Main swap form, token/chain popups, wallet popup
      routes-card/            # Route result cards and route details
      swap-details-card/      # Transaction execution details
      no-wallet/              # No-wallet user interface
      settings-popup/         # Settings, filters, history popups
    api/
      rango-api.ts            # Rango routing and transaction API wrapper
      noWallet-api.ts         # No-wallet API wrapper
    providers/                # Token, filter, settings, Web3Modal providers
    wallet/                   # Wallet provider discovery and helpers
  redux_slice/
    slice/browserSlice/       # Wallet, token, chain, route, swap browser state
    slice/noWalletSlice/      # No-wallet currency, rate, transaction, history state
  docs/assets/                # README screenshots

Environment

Create .env.local with the keys used by the API clients:

NEXT_PUBLIC_RANGO_API_KEY_BASIC=your_rango_api_key
NEXT_PUBLIC_NO_WALLET_API_URL=your_no_wallet_api_base_url

Depending on the deployment target, wallet provider configuration may also require WalletConnect/Web3Modal project settings.

Run Locally

npm install
npm run dev

Open:

http://localhost:3000

Production build:

npm run build
npm run start

Scaling Plan

  • Add route simulation and human-readable risk explanation before confirmation.
  • Add stronger transaction recovery states for stuck, expired, failed, and refunded swaps.
  • Add E2E tests around walletless flow and Rango route confirmation.
  • Move sensitive API mediation behind a backend edge service where needed.
  • Add analytics for route failures, abandonment, quote latency, and chain-level demand.
  • Add accessibility review for keyboard navigation, modal focus traps, and mobile layouts.

Skills Demonstrated

  • Complex Web3 UI state modeling.
  • Cross-chain route and transaction lifecycle integration.
  • Wallet-provider orchestration.
  • No-wallet deposit-address swap UX.
  • Production-style error handling and user feedback.
  • Responsive trading interface design.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages