Skip to content

Restructure braindao.org around $IQ and HiIQ - #71

Merged
invisiblemask merged 158 commits into
mainfrom
restructure/iq-hiiq-scope
Aug 21, 2026
Merged

Restructure braindao.org around $IQ and HiIQ#71
invisiblemask merged 158 commits into
mainfrom
restructure/iq-hiiq-scope

Conversation

@invisiblemask

@invisiblemask invisiblemask commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Closes https://github.com/IQIndustries/issues/issues/5196, https://github.com/IQIndustries/issues/issues/5197, https://github.com/IQIndustries/issues/issues/5198, & https://github.com/IQIndustries/issues/issues/5199 when this PR merged

Implements the BrainDAO Restructuring Spec (July 15, 2026): braindao.org narrows its scope to $IQ and HiIQ, reflecting BrainDAO's role as the legal entity that launched IQ rather than a product showcase. The site is rebuilt on one design system, gains a /hiiq route, moves to Next 16, and sheds every dependency advisory.

100 commits · 128 files · +5,590 / −11,523.

Branches merged into this one

PR Branch What it added
#72 fix/responsive Tablet and mobile spacing, alignment and overflow fixes (+61/−21)
#73 restructure/hiiq-page The /hiiq page rebuilt around lock, estimate and decay (+1,428/−199)
#74 chore/upgrade-next-16 Next 16 / React 19 / next-intl 4, and 104 → 0 advisories (+1,336/−4,534)
#76 chore/biome-formatting Biome config that actually runs, plus the resulting reformat (+1,968/−1,676)
#77 chore/drop-dead-code Deletes unreferenced components and the unused hiIQ ABI (+1/−1,943)

Scope and navigation

Nav is Home · HiIQ · Treasury · Dashboard. IQ AI, IQ.wiki, SOPHIA, AIDEN, IQ Blog and Meet the Team are gone from the nav and from the page; the Launch App dropdown is now IQ Dashboard + Stake IQ. The navbar is a content-hugging pill, and below md it collapses into a sheet that carries the nav links, the locale picker and Stake IQ.

Homepage

Hero → live token stats → token overview → markets → utility → treasury → ecosystem.

  • Hero is a looping hero-cosmic-mind-loop.mp4 under a gradient scrim, with two animated SVG orbit rings over it.
  • Stats strip reads IQ price, market cap, circulating supply and total IQ locked. The SOPHIA and exchanges cards are gone.
  • Token overview carries an animated token-flow board (governance / staking / burn).
  • Markets lists the current CEX and DEX venues plus Ethereum, Fraxtal and Polygon, each linking to that chain's explorer for the IQ contract, alongside a liquidity-routing board.
  • Utility covers governance via HiIQ voting power, staking rewards, and fee burn and redistribution.
  • Treasury replaces the old IQ Dashboard section, keeping the "Explore IQ Dashboard" CTA, and adds a locked-share ring.
  • Ecosystem is a three-row ruled list (IQ AI, IQ.wiki, IQ Industries), each glyph carrying its own animation.
  • Footer is outlined panels: about, icon socials, live mini-stats, page/ecosystem/resource columns and inline newsletter signup.

New /hiiq page

Hero → stats band → how it works → estimate → decay → rewards.

What HiIQ is, the veCRV-style lock (up to 4 years for up to 4×), non-transferability, linear decay to 1:1, rewards and requirements, with a Stake IQ CTA to iq.iqai.com/dashboard/stake. Locked totals are fetched live, not hardcoded.

The estimate panel is interactive: drag a lock length from 3 months to 208 weeks and the duration readout, HiIQ amount and boost gauge move together on the veCRV curve itself (1 + 3 × weeks / 208), so no two readouts can disagree. The route is a composition root — every section lives in src/components/layouts/hiiq/.

Design system

One typographic and colour system replaces the ad-hoc styling:

  • Type — Instrument Serif for display, DM Sans for body, DM Mono for labels and figures. IBM Plex Mono is gone.
  • Rules — a four-rung hairline ladder: rule-soft #1D1D20 divides rows inside a container, rule bounds the container, rule-control outlines clickable chrome, rule-action the buttons and pills.
  • Fillscanvas #0A0A0A, surface #0E0E10, surface-raised #131316.
  • PrimitivesContainer, Section, Eyebrow, Display, MonoLabel, Panel, PanelHeader, PillLink in section-kit.tsx. Content column caps at 1180px; every section band opens on a top hairline.
  • --radius is now actually defined; rounded-lg/md/sm had been collapsing to 0px.

Illustrations

Every exported PNG and SVG is replaced by hand-drawn SVG boards: token flow, liquidity routing, treasury ring, hero orbits, the three ecosystem glyphs, and the five hiIQ boards (lock-to-boost, boost gauge, decay curve, reward fan, stake checklist). They share one .ill scope in globals.css so the exports' generic class names (.rail, .dot, .lit) can be used verbatim without leaking document-wide, and a prefers-reduced-motion block parks each animation on its static state.

Data layer

  • Every upstream read goes through unstable_cache on a 300s window, throwing inside the cache and catching outside, so a blip is never stored for the rest of the window.
  • A failed Alchemy RPC degrades to a placeholder figure; neither page 500s.
  • src/config is replaced by a validated src/env.ts on @t3-oss/env-nextjs. A missing NEXT_PUBLIC_ALCHEMY_API_KEY or NEXT_PUBLIC_IQ_GATEWAY_KEY now fails the build with a named error instead of at runtime.
  • Per-page canonical and hreflang via alternatesFor().

Platform and tooling (#74, #76, #77)

  • Next 15.4.10 → 16.3.1, React 18.2 → 19.2.8, next-intl 3 → 4.13.7. src/middleware.ts becomes src/proxy.ts with a named proxy export; global.d.ts moves to next-intl's AppConfig augmentation; the favicon moves to public/. Build wall time 37s → 14s, compile 12.0s → 4.1s on Turbopack.
  • pnpm audit: 104 advisories (53 high, 47 moderate, 4 low) → 0. Removed as installed-but-never-imported: @emotion/react, @emotion/styled, @react-three/drei, @react-three/fiber, three, gsap, @gsap/react, @radix-ui/react-menubar, eslint, eslint-config-next — 328 packages out of the tree, and .eslintrc.json with them.
  • PostHog: strict_script_versioning: false, so surveys and dead-click autocapture stop burning two 404s per page load probing versioned asset paths.
  • Biome now has a real biome.json (tabs, 80 cols, double quotes, CSS formatting, vcs.useIgnoreFile) wired through lint-staged and husky; the repo is reformatted to match.
  • 19 unreferenced components and the unused hiIQ ABI deleted.

Notes for review

  1. A pre-existing mislabeling is corrected here. The old Iqtoken.tsx had the two on-chain figures swapped: getTvl() (IQ held by the hiIQ contract) was labeled "Total HiIQ", and getLockOverview().totalHiiqSupply was labeled "Total volume locked". They now read "Total IQ locked" and "Total HiIQ outstanding". The meaningless + suffix on the TVL figure was also dropped.
  2. No server redirects were added. Everything removed from the homepage was an anchor (#iqai, #sophia, …) which never reaches the server, and there were no /branding, /team or /blog routes in the build. If those URLs exist on the live deployment through other config, redirects need adding separately.
  3. KR and ZH copy for the new sections needs a native-speaker review. Existing footer and dashboard strings were preserved verbatim; the hero, utility, markets and HiIQ copy is newly translated. Key parity is verified (167 keys in all three files, no missing or extra), and lock durations are ICU plurals with the correct single other category for ko and zh.
  4. The newsletter signup stays in the footer, where it already lived.

Open items flagged in review

Not fixed on this branch:

  • Internal links drop the locale. Navbar, Footer, PillLink and StatCell use next/link with unprefixed hrefs, so from /kr a reader with no NEXT_LOCALE cookie and a non-Korean Accept-Language lands back on /en/hiiq. Fix is the locale-aware Link from i18n/routing, which the navbar already imports for the switcher rows.
  • /hiiq ships no og:image, and its twitter:title / twitter:description are the homepage's — a child route's openGraph object replaces the layout's rather than merging into it.
  • <html lang="kr"> is not a valid BCP-47 tag (should be ko); the page's own hreflang alternates already say ko-KR.
  • ~19 MB of orphaned public/ assetsimages/team/ (13 MB) and svgs/aiden.svg (2.6 MB) among them — outlived the components refactor: delete unreferenced components and the unused hiIQ ABI #77 deleted; no public/ file was removed on this branch.
  • Satoshi still ships unusedfont.ts, globals.css @font-face and two tailwind.config.ts families all declare it, and three woff2 are preloaded on every page, but nothing sets font-satoshi.
  • Both pages render dynamically per request. No generateStaticParams / setRequestLocale, so the eight page × locale combinations are SSR rather than ISR.
  • The homepage fetches CoinGecko twice per windowfetchCoinMarketData and getIqStats hit the same gateway URL under different cache keys, and only circulatingSupply is used from the first.

Verification

tsc --noEmit clean, biome check clean across 84 files, pnpm build succeeds, message key parity verified across en/kr/zh, and /, /kr, /zh, /hiiq, /kr/hiiq and /zh/hiiq all return 200 rendering live data.

BrainDAO.org narrows its scope to $IQ and HiIQ. The product marketing
content (IQ AI, IQ.wiki, Sophia, AIDEN, IQ Blog) now lives on iqai.com
and iq.wiki, so the homepage sections, the Meet the Team section and the
Sophia stats fetching are dropped and the footer links out instead.
It was defined inside the removed Iqtoken section but is reused by the
treasury and HiIQ pages.
Drop the SOPHIA and exchanges cards from the stats row and show IQ
price, market cap, circulating supply and total IQ locked instead. The
token card now supports internal links and an optional change figure.
Covers governance via HiIQ voting power, staking rewards and the
platform fee burn and redistribution.
Condensed list of the centralized and decentralized exchanges IQ trades
on, plus the chains it is deployed to with links to each block explorer.
Replaces the IQ Dashboard ecosystem section, keeping the treasury
content and dashboard CTA, and surfacing total IQ locked and total HiIQ
outstanding from chain data.
Hero, live token stats, utility, markets and treasury; the ecosystem
product sections and Meet the Team are gone.
Explains what HiIQ is, the veCRV-style lock, non-transferability, decay
and rewards, with a Stake IQ CTA. Locked totals are fetched live rather
than hardcoded.
Home, HiIQ, Treasury and Dashboard replace the product links. Active
section highlighting now keys off an explicit section field so external
and page links can sit in the same list, and the mobile menu reuses it.
New namespaces for the utility, markets, treasury and HiIQ sections;
ecosystem and team copy dropped. Metadata reframes BrainDAO as the
entity behind IQ and points the social handles at @IQOFFICIAL.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
braindao-ui Ready Ready Preview Aug 21, 2026 9:29am

Request Review

main migrated config.ts to the zod-validated @/env module, so the
Sophia-only pieces of that migration are dropped here alongside the
Sophia stats fetching. Nav and the launch-app links keep the
restructured versions; the ecosystem IQ AI section stays deleted.
Restructure every namespace around the new page composition: hero,
token overview and flow, markets and liquidity routing, utility,
treasury, ecosystem, HiIQ and the rebuilt footer. Drops keys whose
sections no longer exist (navbar exchanges, treasury cards/holdings,
footer social/company headings).

Korean and Chinese are updated in step with English.
Introduces the pieces every section is built from:

- Instrument Serif as the display face, wired through `font-display`
- `rule`, `rule-strong`, `surface` and `surface-raised` colour tokens
  for the hairline grid the layout leans on
- a shared section kit (Section, Container, Display, Eyebrow,
  MonoLabel, Panel) so spacing and type scale stay consistent
- base styles trimmed of the old shimmer, grid and gradient helpers,
  plus the keyframes that drive the hero orbit rings
Replaces the GSAP character animation and the masked grid backdrop
with a quieter composition: serif headline, two pills, and five
concentric SVG orbits with a bright arc travelling each ring.

The arcs are pure CSS — `pathLength="100"` normalises every ellipse so
a single dash rule drives all of them, staggered by negative delays so
the rings are already mid-orbit on first paint. Motion is disabled
under `prefers-reduced-motion`.
Rebuilds the page with the shared section kit: a gradient hero with
the two locking CTAs, a hairline stats grid, and the explainer
sections as cells rather than pointer callouts.
Recomposes the page as hero → stats → token overview → markets →
utility → treasury → ecosystem, all on the shared section kit.

- markets pairs the chain chips with a routing map of which venue
  actually holds the pool on each chain
- treasury draws a donut from live data: IQ locked over circulating
  supply, rather than the static cards it replaces
- ecosystem lists the three products as hairline rows

Drops the card, brief and pointer components the old layout used.
Navbar becomes a floating pill with section links, active state and a
single stake CTA; the exchange dropdown moves into the markets
section, so it goes.

Footer gains a live "IQ right now" strip alongside the brand column
and four link columns. The strip renders on every route via the
layout, so its reads are cached separately from the homepage fetches.
The design's headline is a high-contrast Didone; Instrument Serif's
flatter contrast reads as a different voice at hero scale. Playfair
carries the same hairline-to-stem ratio, so `font-display` now points
at it across every serif heading on the site.
Leads on what the ecosystem is for rather than on the entity, and
moves the highlight onto "intelligent".
Takes the hero to full height and rebuilds the backdrop as a dust
field: a seeded star field with a ragged, turbulence-displaced lower
edge breaking against a plum haze, over faint filament clouds. The
seed is fixed so the server and client render the same positions.

Orbits drop to the design's three rings, sized from its ratios — the
outer one spans ~71% of the viewport — with the travelling arc kept
on each.

The design centres a cut-out figure that we do not have. The hero
composites it between the rings and the copy when
`public/images/hero-figure.png` is present, and stands on the sky and
rings alone until then.
Instrument Serif for headings, DM Sans for the body and sub-header tier,
DM Mono for figures. Retires Playfair Display, Montserrat and IBM Plex
Mono, and moves the page background off pure black onto #1D1D20.
Renames the mono utility to Tailwind's font-mono and drops card-level
sub-headers from the serif down to DM Sans medium, keeping the serif for
section headings only.
Nav, footer, panels and the hero sky all sat on their own near-blacks.
They now share one neutral family, and the stats strip becomes glass over
the hero rather than a band of its own.
The hero grew past its own min-height, pushing the orbit rings and the
stats strip below the fold and clipping the outer ring. Hero and stats now
share a single min-h-svh frame with the hero absorbing the slack, and the
ring SVG is sized so the outer ellipse always closes inside the section.
Also makes the secondary CTA fully transparent.
The polarity was inverted: the page carried #1D1D20 while panels sat
darker. The canvas is now #0E0E10 with panels at #1D1D20, so cards read as
raised rather than recessed.
invisiblemask and others added 12 commits August 19, 2026 14:49
@emotion/*, @react-three/*, three and @types/three had no imports
anywhere in the repo. eslint and eslint-config-next sat in dependencies
rather than devDependencies and were never invoked — linting runs through
Biome via lint-staged, and `next lint` is gone in Next 16 — so they only
served to pull in the minimatch/js-yaml/flatted/ajv advisory chain.

Also bumps axios and unpins postcss to clear their high-severity
advisories, and drops the `export` script (`next export` was removed in
Next 14).

Removes 328 packages. pnpm audit goes from 104 advisories to 47; build
output is byte-identical at 105 kB First Load JS.
Next 15.4.10 was on an unmaintained patch line carrying 25 open
advisories, the earliest of which was fixed in 15.4.11. Moving to 16.3.1
clears all of them rather than chasing the 15.5 backport, which would
still have required the next-intl 4 migration to get here later.

Migration notes:

- middleware.ts becomes proxy.ts with a named `proxy` export, per the
  Next 16 rename. next-intl still exports createMiddleware, so the
  handler itself is unchanged.
- next-intl 4 infers messages from i18n/request.ts, so the explicit
  `messages` prop and the getMessages() call are gone. The type
  augmentation moves from the global IntlMessages interface to
  next-intl's AppConfig.
- globals.css sets scroll-behavior: smooth on html, and Next 16 no longer
  overrides that during route transitions, so html opts back in with
  data-scroll-behavior="smooth".
- next-themes 0.4 writes color-scheme onto html before hydration, which
  React reports as a mismatch, so html gets suppressHydrationWarning.
- favicon.ico moves to public/. As an app-root metadata route it had no
  root layout to attach to and Next 16 failed to resolve it; the layout
  already declared the icon explicitly.
- tsconfig gains the mandatory jsx: react-jsx and the .next/dev types
  path, and the stale next.config.mjs include is corrected to .ts.

Turbopack is now the default bundler: the production build drops from
36.7s to 11.7s, compile from 12.0s to 4.1s. pnpm audit goes from 47
advisories to 13, none of which are in next, next-intl or axios.

Verified: build green, all five locale routes resolve through proxy.ts
with the custom /kr prefix intact, Korean and Chinese messages load,
live IQ token data still fetches, client-side navigation works and the
browser console is clean.
Bumps the remaining direct dependencies to current majors/patches and
drops gsap, @gsap/react and @radix-ui/react-menubar, none of which are
imported anywhere in the tree.

The pnpm.overrides block clears the last transitive advisories, all of
them reached only through tailwindcss 3's build-time deps. `pnpm audit`
now reports no known vulnerabilities, down from 104 at the start of the
upgrade.
posthog-js 1.418 introduced strict_script_versioning, defaulting to
"fallback": it requests /static/<version>/<extension>.js first and only
retries the unversioned URL after that fails. The assets CDN does not
serve the versioned path, so every page load spent two 404s before
loading surveys and dead-click autocapture.
The /ingest paths were `redirects` with permanent: true, so the browser was
handed the posthog.com URL directly — the exact thing `api_host: "/ingest"`
exists to avoid. Rewrites proxy them server-side instead.

The layout also carried `<link rel="canonical" />` with no href, which did
nothing. Canonicals can't live in the layout because it has no pathname and
would point every route at /, so both pages now build their own from
next-intl's getPathname, along with a reciprocal hreflang set.
framer-motion 13, lucide-react 1, react-icons 5 and a posthog-js patch.
All four have live consumers; icons and the mobile menu verified rendering.

prettier is removed rather than bumped. Biome already formats via
lint-staged, and the `format` script passed `--loglevel`, a flag prettier 3
renamed, so the script was on track to break on the next major anyway. It
now runs biome.

Holding the remaining majors for their own changes: tailwindcss 4 is a
config migration that also retires the pnpm.overrides block, typescript 7
is the native rewrite, biome 2 needs `biome migrate` plus repo-wide format
churn, and @types/node should track the Node 24 runtime rather than jump
to 26.

react-intersection-observer is left alone deliberately: its only consumer,
InViewAnimateBottom, has no importers, and it destructures useInView()
without attaching the ref, so inView was permanently false and the
useAnimation controls were never bound to a component. Bumping dead code
that never ran buys nothing.
Biome was running on pure defaults: no biome.json existed, so
`pnpm format` walked 375 files and happily rewrote .next build output,
and the editor had no idea Biome was the formatter at all — hence
formatting only ever happening by hand.

- add biome.json: honour .gitignore (375 files in scope -> 89), tabs,
  80 cols, double quotes, organize-imports, and CSS formatting, which
  Biome 1.9 leaves off unless asked
- point .vscode at biomejs.biome with formatOnSave plus quickfix and
  organize-imports on save, and recommend the extension
- widen the lint-staged glob to jsonc and css so globals.css is covered
One-time reformat now that biome.json exists and CSS is in scope. Pure
whitespace, quote and semicolon churn in machine-generated SVG-to-JSX
dumps, the hiIQ ABI and globals.css, which had never been formatted at
all and had drifted into mixed tab/space indentation.

BraindaoLogo gains the <title> its two siblings already carry so
`biome check` exits clean.
Nothing imports any of these — verified by path and by exported
identifier across src, i18n and messages, then confirmed by a clean
tsc pass.

- src/abis/hiIQABI.abi.ts (1.5k lines): getLockOverview talks to Alchemy
  with a hardcoded `0x18160ddd` totalSupply selector and never loads an
  ABI, so this has been dead since it landed
- icons/1inch.tsx: a duplicate of one-inch.tsx exporting the same
  OneInchIcon name; exchanges.ts imports the latter
- icons for QuickSwap, Bitget, Bithumb, Crypto.com, Fraxswap, IQ.wiki
  and SushiSwap: venues the current design dropped
- svgs/: all four logo and hero-background variants, superseded by
  layouts/brand-logo and hero-orbits
- transitions/InViewAnimateBottom.tsx: also broken — it never attached
  useInView's ref to a node, so `inView` was permanently false and the
  useAnimation controls were never bound to a component. The visible
  animation came from `whileInView` on the motion.div all along
- ui/card.tsx, ui/container-scroll-animation.tsx, ui/popover.tsx:
  unused shadcn scaffolding

Drops @radix-ui/react-popover (only popover.tsx) and
react-intersection-observer (only InViewAnimateBottom.tsx).
The lit arc read as a bar filling and holding, which fought the pink
readout underneath it. Cut the dash to a short glint and walk it along
the swept arc with a hold at each end, so the gauge shows a light
travelling rather than a level rising. Faster and thinner to match.
The travelling glint is the head now, so the dot riding the arc's end
was a second marker for the same thing. Takes its rotation rule and its
reduced-motion entry with it.
feat(hiiq): rebuild the hiiq page around lock, estimate and decay
invisiblemask and others added 4 commits August 21, 2026 09:38
Brings in the HiIQ page rewrite from #73. The only conflict was the
import block in app/[locale]/hiiq/page.tsx: the page now composes from
components/layouts/hiiq/* instead of section-kit, so the old section-kit
import goes and `alternatesFor` stays. Git had already merged the body,
keeping generateMetadata's canonical alongside the new section list.
Upgrade to Next 16 and clear every dependency advisory
chore(tooling): make biome formatting actually run
refactor: delete unreferenced components and the unused hiIQ ABI
@invisiblemask
invisiblemask merged commit 36646c3 into main Aug 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants