Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 5.54 KB

CLAUDE.md

File metadata and controls

81 lines (62 loc) · 5.54 KB

CLAUDE.md

@AGENTS.md

Deep Dive, the public Upside app. Next 16 (Turbopack, Cache Components), Tailwind v4, coss ui on Base UI, hugeicons, Privy for wallets. Domain vocabulary: CONTEXT.md.

Commands

bun install
bun run dev          # http://localhost:3000
bun run typecheck
bun run build
bun run format

Environment: copy .env.example to .env.local. The build prerenders / and needs SYNDICATE_URL and SYNDICATE_BEARER.

Layout

folder what
app/ routes and app/api/ server handlers
components/, lib/ app code
shared/deepdive research report components
shared/marketdata syndicate client and types
shared/ui shared components and theme (shared/ui/styles/globals.css)

Import everything through @/.

Brand

role colour
background #18181b, surfaces #212125 / #2a2a2f, neutral greys
action, rise, focus lime #CCFF04, black text on it
fall, error red #EF103E
selection, badge purple #7B00FF as a background under white text
purple hover/press blue #4E00FF

Change a token in shared/ui/styles/globals.css or app/globals.css, never a hard-coded colour. Do not rename hv-* tokens or storage keys: renaming them wipes readers' state.

Code

  • Everything in code is English: labels, aria-labels, errors.
  • No comments. A comment only when the code cannot say why it is so (a workaround, an external constraint), one line.
  • The front end does not repair the back end: missing or wrong data is reported to syndicate, never patched in the browser.
  • No secret in the repository. Server keys live in .env.local and are read only in app/api/ and server modules.

Deep Dive product constraints

  • Layout and component styling belongs in Tailwind utilities on the element. CSS files are limited to global/print rules and CSS-only rendering behavior such as SVG animation or unavoidable structural selectors.
  • Every visible text must identify content, explain a necessary decision, or name an action. No unsolicited slogans, marketing sidebars, decorative eyebrows, repeated branding, or filler footers. Use the selected Figma copy; do not invent replacement copy to fill space.
  • Onboarding, wallet, search, authentication, and research share the Upside theme (medium graphite, brand lime, purple; see Brand) on mobile and laptop.
  • Skip onboarding opens the wallet. Search and existing research remain reachable from the wallet with a visible return path. Do not create a separate competing wallet or exploration product.
  • Use the supplied portfolio composition exactly. Missing company weights remain missing; never fabricate allocations, holdings, balances, returns, transactions, or demo accounts.
  • Authentication uses Privy and visibly offers Phantom and Jupiter. A connected account is not a funded account; only confirmed chain data may update balances or deposit status.
  • Wallet actions retain their origin in navigation state and URLs. Funding, authentication, portfolio comparison, and browser Back must never restart onboarding implicitly. Show onboarding progress/Skip only inside the onboarding flow. Verify return paths after reload, authentication, and drawer dismissal.
  • Do not add decorative arrows to labels, links, cards, or account controls in Deep Dive. Use concise action names.
  • A company opens on /stock/<slug> with no mint: the page picks the default product (selectSolanaListing, lib/company-instruments.ts). A link that means one exact product (a wallet holding, an opportunity) adds ?mint=, and the page keeps a known mint in its URL instead of redirecting. From there the exact mint is preserved through quote, signature and holdings. A company research slug is not a tradable instrument identity.
  • For a commodity, the default product tracks the spot price (referenceTicker ending in .CMDTY) before an ETF share: gold priced as a GLD share read ~$390.
  • Before reporting a UI journey complete, click its entry, primary action, dismissal and return path on mobile and desktop. Distinguish read-only quotes from signed and settled transactions in verification reports.
  • Deep Dive uses the wallet as its single main page. Search opens from a floating magnifying-glass button; token details and funding open in overlays. Do not reintroduce a separate Explore destination or shift header controls between these contexts.
  • Stock search and browse use Syndicate's paginated Solana equity universe, canonical company identities and logos. Do not substitute Tokens.xyz search or infer company symbols by trimming token suffixes. Show ordinary company symbols in discovery; retain exact instrument identity internally and expose product details before purchase.

Code readability

  • All newly written or modified code must be readable and formatted with the repository Prettier configuration before delivery.

  • Use descriptive names and clear control flow. Do not compress JSX, nested conditions, request handling, or object definitions into dense single lines.

  • Run a formatting check on changed source files. Formatting does not replace reviewing the code for clarity.

  • Always leave a blank line between function declarations, including arrow functions assigned to variables, and between those functions and adjacent declarations. Prettier alone does not enforce this; check it explicitly.

  • Search remains a wallet modal. A company result opens /stock/<slug>; /asset/<mint> is for a token with no company (USDC, SOL, a pasted mint). Both pages are shareable and carry a visible Wallet link. This supersedes the earlier /asset/[mint]-for-stocks rule.