A runnable Next.js 16 frontend based on the three September 2026 Mingles briefs and the supplied official logos. Includes the public website, holder portal UI, local content studio, an optional Supabase CMS adapter, and a SQL foundation.
Empieza con EMPIEZA_AQUI.md. El contrato de Mingles en ApeChain ya está configurado; incluye backend de firma, wallets, ownership y metadata. Consulta Backend API para el estado actualizado.
Two features and a change to the wallet stack, all verified against ApeChain and in the browser.
CAVA recovery — /recover-mingles · There are 636 Mingles inside the CAVA staking contract, and the contract only offers an all-at-once emergency unstake. This page reports how many a wallet has staked and recovers them in one transaction. It deliberately does not ask for an account or email: whoever has Mingles locked should not depend on an email link. The count is read server-side (/api/staking), and ApeScan is offered as a manual fallback. Contract and selectors were verified in the deployed bytecode, and the unstake was simulated from a real staker before shipping.
Three views per Mingle · Opening a card in My Mingles shows the three views the previous site had: Bottled (from tokenURI), Unbottled and PFP. The art host was verified across the whole token range. There is no download proxy: the old one allowed SSRF, so images open full size in a new tab instead.
Wallets: wagmi + RainbowKit · The hand-rolled EIP-6963 connection only reached injected desktop wallets. RainbowKit adds the connect modal and WalletConnect QR for mobile, and finally uses NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID. Providers mount only on /portal and /recover-mingles; the public site still loads no wallet code. The signature flow is unchanged — RainbowKit connects, our challenge/verify backend still authorises.
Pinned on purpose: wagmi@2.19.5 (wagmi 3 breaks RainbowKit), @rainbow-me/rainbowkit@2.2.11, and @x402/*@2.24.0 as direct dependencies — without the latter the build fails with RainbowKit on Next 16.
Mingle lab — admin → «Mingle lab» · The old site's NFT generator, ported into the content studio: every Mingle is six stacked layers (BG → Tequila Worm → Fur → Face → Bottle → Cap) served from the public traits bucket, browsable 50 at a time, filterable by layer or edition, composable by swapping any layer, and downloadable as a 2× PNG (html-to-image, mingle-{edition}.png). It never writes to the art bucket.
The layer registry is a compact copy (public/data/mingles-traits.json, 486 KB, 5540 Mingles, 125 layer values, the ten 1-of-1 tokens excluded). Regenerate it from the old site's metadata with npm run build:traits; it is fetched only when the tab is opened, so the public site carries nothing.
One known data issue in the bucket, inherited from the old generator and not worked around: traits/Bottle/Standard Bottle Silver.png is a 1×1 fully transparent placeholder (485 Mingles, so those composites show no bottle). Layer art also comes in two resolutions (1296×1312 and 2592×2624) that share the same aspect ratio, so object-fit: cover keeps the stack aligned. Replacing or uploading layer art is not implemented: it would write to the production art bucket and needs its own Storage policies and art review.
Open this folder with File → Open Folder, then use Terminal → New Terminal. Install Node.js 22.18+ or Node.js 24 LTS.
npm ci
npm run devVisit http://localhost:3000. Content studio: http://localhost:3000/admin. Holder portal: http://localhost:3000/portal.
No credentials are needed for the local design preview. The admin editor writes only to your browser until Supabase is configured. This is not an authenticated production admin in preview mode; never treat local storage as trusted data.
npm run typecheck
npm test
npm run build
npm startStop the development server before starting the production server on the same port.
- Responsive Home, Tequila, Art, Story, Experiments, Updates, Build the Distillery, and Holder Portal.
/playretains the earlier blueprint's Play destination;/experimentsis the main navigation destination.- Black-first visual design, 3D pointer-responsive official logo, rotating particle field, floating labels, animated ribbon, page/scroll transitions, visual tilt cards, art-era tabs, and reduced-motion support.
- Holder overview, My Mingles, experiments, activation, distributions, and account views. No fabricated holdings, balances, activity, or claims.
- Content studio: editable hero/page copy/navigation labels, section visibility/order, build states, new experiment cards, story/update CRUD, draft saving, local publication, image upload/selection, and revision restore.
- Server-loaded content with an optional Supabase adapter. Role-checked CMS RPC, separate drafts/publications, audit history, storage policies, and reserved holder tables.
- Requirements review: source decisions, conflicts, implementation coverage, and remaining work.
- Design and UX: palette, typography, motion, responsive behavior, and asset requirements.
- VS Code and Next.js: file map, commands, architecture, and deployment.
- Supabase guide: concrete setup, SQL, security, planned tables, and wallet verification design.
- Content operations: how Memo can operate the editor.
- Launch and QA: verification results and remaining launch gates.
The wallet backend is implemented with ApeChain collection 0x6579cfd742d8982a7cdc4c00102d3087f6c6dd8e. Configure Supabase, apply both migrations, set server secrets and test the complete flow in staging before launch. No remote Supabase project was provisioned and no wallet signature was requested from the user during development. Seven automated tests pass, including local Postgres migrations/RLS/replay protections. See the backend guide for read-only live contract checks.
Activation, NFT migration transactions, and economic distributions remain disabled pending their actual contracts and approved rules. Browser/EIP-6963 wallets are supported; QR WalletConnect is not included. Email login precedes wallet linking. Some advanced CMS workflows still need extension: scheduling, video, full-page draft preview, and remaining secondary copy fields.
The supplied assets contain logos only. Real bottle/cap photography, approved character art, event media, proof records, PVG URLs, and licensed Hogfish/GT Pressura Mono files remain required. The site stays noindex until launch review. No OpenAI API is used.
/mudwater is the campaign page and the game itself. It runs on the same Next app as the rest of the site; the only external piece is the contract on ApeChain.
/mudwaterlive stadium, two arenas, three barrels each/mudwater/termsand/mudwater/privacy, official rules and data notice/api/mudwater/statecounts from the contract, plus the caller's own position/api/mudwater/passdeclares a post and grants the pass onchain/api/mudwater/walletand/api/mudwater/wallet/verifylink a wallet with SIWE/api/mudwater/healthauthorizer balance, with an optional chat alert
Set MUDWATER_CONTRACT_ADDRESS to turn the live mode on. Without it the page stays
on the demo snapshot and no chain call is made. MUDWATER_CHAIN_ID picks the
network: 33111 for Curtis, 33139 for mainnet. Leaving MUDWATER_COLLECTION_ADDRESS
empty disables the holder gate, which is how Curtis runs.
The authorizer key lives only in the server environment, never in a NEXT_PUBLIC_
variable. src/lib/mudwater/authorizer.ts is the single module that reads it and it
imports server-only, so a build fails if that module ever reaches a client
component.