Development
Prerequisites
- Node.js 22+
- npm or pnpm
- Trade API backend running locally or accessible
Local Setup
# Clone with submodules (lethean_ui)
git clone --recursive https://forge.lthn.ai/lthn/trade-frontend.git
cd trade-frontend
# Install dependencies
npm install
# Configure
export NEXT_PUBLIC_API_URL=http://localhost:3336
# Run dev server
npm run dev
The development server starts at http://localhost:3000.
Submodules
The submodules/lethean_ui/ directory contains the shared Lethean UI component library. If building in Docker without the submodule, the Dockerfile creates stub components automatically.
Building
npm run build
npm start
Production build serves on port 30289.
Docker Build
docker build -t lthn/trade-frontend:testnet .
The Dockerfile handles submodule stubs, TypeScript compilation, and Next.js static generation.