Skip to main content

Frontend Setup

Guide for setting up and running the QsnDEX Next.js frontend locally.

Prerequisites

  • Node.js 20 or later

Installation

cd frontend
npm install

Development

Start the development server with hot reload:

npm run dev

The application is available at http://localhost:3000.

Production Build

npm run build
npm start

This creates an optimized production build and serves it on port 3000.

Linting

npm run lint

Key Configuration Files

FilePurpose
next.config.tsNext.js configuration (rewrites, image domains, etc.)
tailwind.config.tsTailwindCSS theme configuration
wagmi.tsWagmi chain and connector configuration
tsconfig.jsonTypeScript compiler options

Theme

QsnDEX uses the Obsidian Gold dark theme as its default appearance. The design system features dark backgrounds with gold accent colors. An optional light theme is available and can be toggled by the user in the interface.

Key theme characteristics:

  • Dark mode (default): Deep dark backgrounds (#0a0a0a, #111111) with gold accents (#d4a843, #f5d77a)
  • Light mode (optional): Clean light backgrounds with adjusted contrast
  • Typography: System font stack with monospace for numerical data
  • Animations: Framer Motion for page transitions and micro-interactions

Connecting to the Backend

By default, the frontend proxies API requests to http://localhost:8080. This is configured in next.config.ts via rewrites. For production, update the API base URL to point to the deployed backend.

Environment Variables

Frontend environment variables are prefixed with NEXT_PUBLIC_:

VariableDescription
NEXT_PUBLIC_API_URLBackend API base URL
NEXT_PUBLIC_WALLETCONNECT_PROJECT_IDWalletConnect project ID for wallet connections