# $QUANT — landing + live terminal An orchestra of ~18 AI agents trading Hyperliquid perps. Marketing site (LARP) with a **Living Agent Swarm** aesthetic, driven by **real Hyperliquid market data**. - **Landing** (`/`) — hero swarm + 6-layer pipeline + live signal desk + agent roster + performance + tokenomics + roadmap + Telegram modes + FAQ + waitlist. - **Terminal** (`/terminal`) — live dashboard: real price/funding/OI, in-browser TA, agent vote matrix and a LONG/SHORT/SKIP verdict. ## Stack React 19 · Vite 8 · TypeScript · Tailwind v4 · shadcn-style UI · anime.js v4 (SVG) · Recharts · React Router · Lenis. Package manager: **pnpm**. ## Run ```bash pnpm install pnpm dev # dev server (http://localhost:5173) pnpm build # production build → dist/ (deploy this only) pnpm preview # serve the built dist/ pnpm gen:icons # regenerate favicon.ico / og.png from public/favicon.svg ``` ## Data - **Live:** Hyperliquid public info API (`POST https://api.hyperliquid.xyz/info`, no auth, CORS `*`) → live BTC/ETH/SOL price, funding, OI. Indicators (RSI/MACD/EMA/ATR/Bollinger) are computed in-browser in `src/lib/ta.ts`; agent votes + verdict in `src/lib/signals.ts`. - **Seed fallback:** `src/data/seedMarket.ts` renders deterministic data instantly (labelled non-live) so cards never hang; live data replaces it. - **Honesty:** anything that can't be real pre-TGE (token price/holders/PnL track record) is rendered but clearly labelled **simulated**. ## Live paper-trading worker `worker/` is an always-on Node loop that **reuses the browser brain** (`src/lib/ta.ts` + `signals.ts`) server-side: real candles → real TA → 4-agent vote → verdict, then it **paper-trades** the verdict against live Hyperliquid prices and broadcasts every fill to **Telegram**. This turns the simulated PnL track record into an honest, verifiable one — no order is ever signed (`dry-run` only). See [`worker/README.md`](worker/README.md). ```bash pnpm worker # run forever (Telegram optional — prints to stdout if unset) pnpm worker:once # single tick smoke test ``` ## ⚠️ Fill these before launch Edit `src/data/site.ts`: - `x` — the project's X/Twitter URL (manager-provided; shown in header + footer) - `telegram` — Telegram link - `contract` — $QUANT Solana mint (post-TGE) Other: - **Wallet:** `src/components/ConnectWallet.tsx` is a cosmetic Solana connect modal (honest pre-TGE). To wire real **Reown AppKit (Solana)**, add a `projectId` (Reown dashboard) and swap the modal body — see the project plan. - **DexScreener token strip:** add the `$QUANT` pair address once it lists. - The `base-verification` meta tag is already in `index.html`. ## Research agent (FactsAI) The landing has a **"Research agent · L4"** section that renders a real AI market brief with cited web sources from [FactsAI](https://factsai.org/docs) (`src/lib/factsai.ts`, `components/sections/AIBrief.tsx`). It self-hides when the feed is unreachable, so the page never looks broken. ⚠️ **A static site cannot call FactsAI directly** — the API returns no `Access-Control-Allow-Origin` (browser blocks it) and a client key would be public. Also, at the time of building, FactsAI's endpoint returned `500 "Service configuration error"` (their backend). To enable it: 1. Deploy the included proxy: [`proxy/factsai-worker.js`](proxy/factsai-worker.js) (Cloudflare Worker — holds the key + adds CORS). See the header comment for `wrangler` steps. 2. Set `VITE_FACTSAI_PROXY=https://.workers.dev` in `.env.local`, then `pnpm build`. 3. FactsAI must also fix their upstream `500` before real answers return. Without a proxy, set `VITE_FACTSAI_KEY` in `.env.local` for local dev only (the key is baked into the bundle and CORS will still block production). ## Deploy Ship **`dist/` only** to the GitLab static host (agency `templates/starter` pipeline). If the app is served without SPA fallback, deep-linking `/terminal` on refresh may 404 — configure the host to fall back to `index.html`, or switch to `HashRouter` in `src/App.tsx`.