Skip to content

james2177/StellarSwipe-FrontEnd

 
 

Repository files navigation

StellarSwipe-FrontEnd

Overview

Modern, responsive web app featuring:

  • Infinite scrolling signal feed
  • Gamified swipe mechanics (Framer Motion drag gestures)
  • Freighter wallet integration
  • Real-time dashboard & trade execution

Connects to Soroban contracts for on-chain actions.

Tech Stack

  • Next.js 15+ (App Router)
  • TypeScript
  • Tailwind CSS 4 + shadcn/ui
  • Framer Motion (swipes/animations)
  • TanStack Query (data fetching)
  • @stellar/freighter-api + stellar-sdk
  • Zustand (state)
  • Vercel deployment

Quick Start

  1. Clone & install:
    git clone https://github.com/EndeMathew/StellarSwipe-frontend.git
    cd StellarSwipe-frontend
    npm install
    

Set environment variables (.env.local): NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org

Run dev server: npm run dev

Worker Tracing

Asynchronous worker execution paths are instrumented via src/tracing/worker-tracing.service.ts.

What is traced

Worker Span name
/api/signals route handler worker:signals:fetch
Freighter wallet connect worker:wallet:connect
Signal price polling interval worker:signalPrice:poll

API

// Wrap any async function — returns its result, re-throws on error
const data = await traceWorker("worker:my:task", async () => fetchData(), { page: 1 });

// Manual span lifecycle
const finish = startSpan("worker:my:task", { key: "value" });
try {
  await doWork();
  finish("ok");
} catch (err) {
  finish("error", err as Error);
}

Each span captures: traceId, spanId, name, startedAt, endedAt, durationMs, status, attributes, and error (if any).

In development (NODE_ENV=development) spans are logged to console.debug. Replace the emit function in the service to forward spans to any observability backend (Datadog, OpenTelemetry, etc.).

Security

  • Attributes are caller-controlled — the service never reads or mutates them.
  • No secrets are injected or logged by the tracing layer itself.
  • Existing authentication and authorization semantics are fully preserved.

Running tests

npm test

About

A decentralized application (DApp) on the Stellar Network that gamifies copy trading. Users are presented with "Trade Signals" in a card stack interface. Swiping Right copies the trade (executes a buy), and swiping Left discards the signal. This leverages Stellar's low fees and fast finality to enable a high-frequency, engaging trading experience.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 98.0%
  • CSS 1.6%
  • JavaScript 0.4%