Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
cd332f4
copy: clarify reference code is one-time use
chip-peanut-bot[bot] Mar 9, 2026
0930436
Merge pull request #1718 from peanutprotocol/chip/reference-code-sing…
kushagrasarathe Mar 10, 2026
243e173
copy: update landing page — YOUR MONEY. YOUR RULES.
chip-peanut-bot[bot] Mar 10, 2026
332b35d
Merge pull request #1720 from peanutprotocol/chip/landing-copy-update-v2
Hugo0 Mar 10, 2026
fcd0aa6
fix: full-graph new users render green + debounce topNodes slider
Hugo0 Mar 10, 2026
241e2ca
fix: redirect docs.peanut.me to /en/help
Hugo0 Mar 10, 2026
1d04ee1
fix: remove broken SEO footer links, kill React fallbacks, update con…
Hugo0 Mar 10, 2026
3d42b95
fix: read activityDays from ref to avoid stale closure in fetch
Hugo0 Mar 10, 2026
efa9424
Merge pull request #1721 from peanutprotocol/fix/full-graph-new-users
Hugo0 Mar 10, 2026
9639521
fix: add Suspense fallback skeleton to help center page
Hugo0 Mar 10, 2026
3ae7332
fix: replace broken jail page with 3-step waitlist flow
Hugo0 Mar 10, 2026
9974347
fix: replace outbound docs.peanut.me links with internal /en/help paths
Hugo0 Mar 10, 2026
502861c
fix: add MDX guard to receive-money-from metadata, update content sub…
Hugo0 Mar 10, 2026
45c0938
📚 add CONTRIBUTING.md as single source of truth for dev rules
Hugo0 Mar 10, 2026
09902c8
style: fix prettier formatting
Hugo0 Mar 10, 2026
7e54825
fix: restore target="_blank" and deep links for contextual help links
Hugo0 Mar 10, 2026
bec7213
fix: revert SEOFooter to inlined data to avoid fs bundle error
Hugo0 Mar 10, 2026
ea852d5
📚 slim down README, point to CONTRIBUTING.md for dev rules
Hugo0 Mar 10, 2026
3fffe6e
Update commit guidelines in CONTRIBUTING.md
Hugo0 Mar 10, 2026
c98ae1f
Merge pull request #1727 from peanutprotocol/worktree-agent-a9014031
Hugo0 Mar 10, 2026
1d2e7d6
fix: remove ComparisonTable re-export from barrel file
Hugo0 Mar 10, 2026
94b1848
📚 track AI tool symlinks in git so all devs get them
Hugo0 Mar 10, 2026
271981c
Address CodeRabbit review: add try/finally guards and aria-label
Hugo0 Mar 10, 2026
f985c43
chore: update content submodule (prettier fix on workflow)
Hugo0 Mar 10, 2026
1b8247a
chore: update content submodule (prettier fix on workflow)
Hugo0 Mar 10, 2026
acaf94c
Update content submodule to latest main
github-actions[bot] Mar 10, 2026
edb10a2
Merge pull request #1728 from peanutprotocol/auto/update-content-2026…
Hugo0 Mar 10, 2026
9d39f7d
Merge pull request #1729 from peanutprotocol/fix/track-ai-symlinks
Hugo0 Mar 10, 2026
631020a
feat: rewrite waitlist page with nuqs URL-backed step state
Hugo0 Mar 10, 2026
61a2d1b
style: fix prettier formatting in LandingPage Footer
Hugo0 Mar 10, 2026
58b1913
fix: point "supported regions" links to /help/supported-geographies
Hugo0 Mar 10, 2026
e020fee
chore: resolve content submodule conflict with main
Hugo0 Mar 10, 2026
cc3a0c5
Merge pull request #1724 from peanutprotocol/fix/help-page-fouc
Hugo0 Mar 10, 2026
6d8040e
chore: update content submodule to main after merge
Hugo0 Mar 10, 2026
5624c72
feat: add PostHog product analytics with full funnel instrumentation
Hugo0 Mar 10, 2026
107bda1
fix: add missing deviceType dep, remove redundant window guard
Hugo0 Mar 10, 2026
00f1f87
refactor: use central ANALYTICS_EVENTS constants for all PostHog events
Hugo0 Mar 10, 2026
f11c810
fix: update pnpm lockfile and capture invalid username validation
Hugo0 Mar 10, 2026
2b632bc
style: fix prettier formatting in Signup.tsx
Hugo0 Mar 10, 2026
6aa8d91
fix: address review feedback — fetchUser, email util, border, back nav
Hugo0 Mar 10, 2026
4baa1de
fix: exclude content submodule from prettier checks
Hugo0 Mar 10, 2026
a520be6
fix: exclude content submodule from prettier checks
Hugo0 Mar 10, 2026
7bbea63
Merge pull request #1722 from peanutprotocol/feat/seo-audit-fixes
Hugo0 Mar 10, 2026
c05dec8
feat: add deposit rail routes (via-sepa, via-ach, etc.) and fix local…
Hugo0 Mar 10, 2026
5db52ff
refactor: simplify waitlist page — reuse BaseInput, dedupe email rege…
Hugo0 Mar 10, 2026
351ef02
fix: accept locale-less /help/ links in link validator
Hugo0 Mar 10, 2026
90fc525
Merge pull request #1725 from peanutprotocol/feat/posthog-analytics
Hugo0 Mar 10, 2026
ca98418
fix: make breadcrumb home link locale-aware across all marketing pages
Hugo0 Mar 10, 2026
57387bb
Merge pull request #1730 from peanutprotocol/feat/deposit-rails-and-l…
Hugo0 Mar 10, 2026
6ed0875
merge: resolve submodule conflict with main
Hugo0 Mar 10, 2026
2d05199
feat: clickable legend toggles + accurate colors in full-graph
Hugo0 Mar 10, 2026
932a9ab
fix: remove notification banner from jail screen
Hugo0 Mar 10, 2026
31feb5e
fix: pass hiddenStatuses to second renderOverlays call (build fix)
Hugo0 Mar 10, 2026
3a220bd
📚 archive SOP.md, inline chain-adding guide as code comment
Hugo0 Mar 10, 2026
3d34c13
chore: enforce PR-only workflow in CONTRIBUTING.md
Hugo0 Mar 10, 2026
9ef3cd0
📚 archive SOP.md, inline chain-adding guide as code comment
Hugo0 Mar 10, 2026
7ff3a88
Merge pull request #1731 from peanutprotocol/fix/graph-legend-build-fix
Hugo0 Mar 10, 2026
80e9f17
Merge pull request #1732 from peanutprotocol/chore/archive-sop-docs
Hugo0 Mar 10, 2026
42b4c36
feat: add PostHog reverse proxy to bypass ad blockers
Hugo0 Mar 10, 2026
9480e54
Merge pull request #1733 from peanutprotocol/feat/posthog-reverse-proxy
Hugo0 Mar 10, 2026
6066fbc
Merge remote-tracking branch 'origin/main' into feat/jail-fix-multist…
Hugo0 Mar 10, 2026
588f52b
fix: address PR review comments
Hugo0 Mar 10, 2026
8824d34
fix: guard handleEmailSubmit against duplicate calls
Hugo0 Mar 10, 2026
b20d69f
fix: add error handling and skip option to email step
Hugo0 Mar 10, 2026
77b68cd
fix: race condition between setStep and react-query user state
Hugo0 Mar 10, 2026
cc42b35
Merge pull request #1726 from peanutprotocol/feat/jail-fix-multistep-…
Hugo0 Mar 10, 2026
490713c
feat: instrument core money flows with PostHog analytics
Hugo0 Mar 10, 2026
2d679a6
feat: instrument invite/referral and points flows with PostHog analytics
Hugo0 Mar 10, 2026
2d98686
fix: address coderabbit review feedback on analytics events
Hugo0 Mar 10, 2026
03323d2
feat: add PostHog tracking to OneSignal notification flow
Hugo0 Mar 10, 2026
dd65613
Merge pull request #1734 from peanutprotocol/feat/posthog-money-flow-…
Hugo0 Mar 10, 2026
18bf292
feat: add modal fatigue tracking with unified MODAL_SHOWN/DISMISSED/C…
Hugo0 Mar 10, 2026
76394fc
Merge pull request #1735 from peanutprotocol/feat/posthog-money-flow-…
Hugo0 Mar 10, 2026
0f753d1
refactor: migrate InviteFriendsModal to generic modal tracking events
Hugo0 Mar 10, 2026
edf1fcc
Merge pull request #1736 from peanutprotocol/feat/posthog-money-flow-…
Hugo0 Mar 10, 2026
3ba73e1
feat: add email template assets for waitlist notifications
Hugo0 Mar 11, 2026
514b9d9
Merge pull request #1737 from peanutprotocol/feat/email-assets
Hugo0 Mar 11, 2026
6c7e506
feat: landing page audit — reorder, copy, sticky CTA, curate tweets
chip-peanut-bot[bot] Mar 11, 2026
bafcad6
style: fix prettier formatting
chip-peanut-bot[bot] Mar 11, 2026
e74c73e
feat: address Konrad feedback — hero knerd font, copy updates, more t…
chip-peanut-bot[bot] Mar 11, 2026
de61915
fix: reduce knerd font size to match original SVG proportions
chip-peanut-bot[bot] Mar 11, 2026
1ab7874
fix: further reduce knerd font to match original SVG height (~275px)
chip-peanut-bot[bot] Mar 11, 2026
947db54
fix: bump knerd font size up for more visual presence (3.5rem lg)
chip-peanut-bot[bot] Mar 11, 2026
df77fc0
fix: scale knerd font to match original SVG visual weight (9rem lg)
chip-peanut-bot[bot] Mar 11, 2026
35fd92f
revert: restore original hero SVG — knerd font needs design work
chip-peanut-bot[bot] Mar 11, 2026
cd0698e
feat: new hero asset + subtitle/cities copy per audit
chip-peanut-bot[bot] Mar 11, 2026
449ca88
fix: wrap hero image in aspect-ratio container matching original SVG …
chip-peanut-bot[bot] Mar 11, 2026
d997c3f
fix: use native PNG aspect ratio (915:306) instead of old SVG ratio
chip-peanut-bot[bot] Mar 11, 2026
886729a
revert: restore original GLOBAL MONEY hero — new asset to be tackled …
chip-peanut-bot[bot] Mar 11, 2026
9b34c17
fix: sticky CTA — rename to SIGN UP NOW, fix scroll-back bug at page …
chip-peanut-bot[bot] Mar 11, 2026
c9b7870
feat: new hero asset (GLOBAL CASH LOCAL FEEL) + subtitle copy
chip-peanut-bot[bot] Mar 11, 2026
51673dd
feat: swap hero PNG only — keep all original prod layout/copy
chip-peanut-bot[bot] Mar 11, 2026
97a89ed
feat: dynamic peanut positioning (3% overlap with h2) + new hero copy
chip-peanut-bot[bot] Mar 11, 2026
758512a
fix: use ref-based measurement for peanut positioning across all view…
chip-peanut-bot[bot] Mar 11, 2026
0933a44
fix: bump peanut overlap to 6%
chip-peanut-bot[bot] Mar 11, 2026
95e6e09
fix: stabilize sticky mobile CTA and cleanup PR
Hugo0 Mar 12, 2026
bbea123
fix: remove CTA overlap detection from sticky mobile bar
Hugo0 Mar 12, 2026
651f5ad
refactor: add visible field to tweets instead of deleting them
Hugo0 Mar 12, 2026
da9d331
Merge pull request #1738 from peanutprotocol/chip/lp-audit
Hugo0 Mar 12, 2026
a5d5287
Merge branch 'main' into sync/main-to-dev
kushagrasarathe Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 0 additions & 135 deletions .cursorrules

This file was deleted.

1 change: 1 addition & 0 deletions .cursorrules
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export NODE_ENV="development"
export NEXT_PUBLIC_PEANUT_ACCESS_CODE=""
export NEXT_PUBLIC_NOTIFY_API_SECRET=""
export NEXT_PUBLIC_GA_KEY=""
export NEXT_PUBLIC_POSTHOG_KEY=""
export NEXT_PUBLIC_POSTHOG_HOST="https://eu.i.posthog.com"
export NEXT_PUBLIC_WC_PROJECT_ID=""
export NEXT_PUBLIC_SENTRY_DSN=""
export NEXT_PUBLIC_RECAPTCHA_SITE_KEY=""
Expand Down
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ public/swe-worker*
# mobile POC
android/
.claude/

# AI tool worktrees
.claude/worktrees/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules/
pnpm-lock.yaml
**.md
src/assets/
src/content/
1 change: 1 addition & 0 deletions .windsurfrules
1 change: 1 addition & 0 deletions AGENTS.md
1 change: 1 addition & 0 deletions CLAUDE.md
137 changes: 137 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# peanut-ui Development Rules

**Version:** 1.0.0 | **Updated:** 2026-03-10

Single source of truth for developer and AI assistant rules. Tool-specific files (`.cursorrules`, `CLAUDE.md`, `AGENTS.md`, `.windsurfrules`) are symlinks to this file.

---

## 🚫 Agent Safety

- **Never open SVG files** — crashes AI agents. Only read jpeg, png, gif, or webp.
- **Never run `jq`** — crashes AI agents.
- **Never run `sleep`** from command line — hibernates the PC.
- **Never add AI co-author to commits** — no "Co-Authored-By" lines for AI assistants.
- **Do not generate .md files** unless explicitly told to.

## 🔀 Git Workflow

- **NEVER commit or push directly to main** — all changes must go through a pull request. No exceptions.
- **Always work from a feature branch** — create a branch, push it, open a PR, wait for CI to pass, then merge.
- **Use git worktrees** for parallel work (`claude --worktree <name>` or `git worktree add`).
- Multiple agents/sessions must use separate worktrees to avoid collisions.

## 💻 Code Quality

- **Boy scout rule** — leave code better than you found it.
- **DRY** — reuse existing code and shared constants (e.g. `src/constants`). Less code is better code.
- **Separate business logic from UI** — important for readability, debugging, and testability.
- **Use explicit imports** — no wildcard imports, import from specific files.
- **Reuse existing components and functions** — don't hardcode hacky solutions.
- **Warn about breaking changes** — if there's risk, explicitly WARN. Flag if frontend changes require backend action (or vice versa).
- **Mention refactor opportunities** — if you spot one, mention it. DO NOT make changes unless explicitly told to.
- **Error messages** — user-facing errors should be friendly and clear. Console/Sentry errors should be descriptive for debugging.

## 🚫 Import Rules (critical for build performance)

- **No barrel imports** — never `import * as X from '@/constants'` or create index.ts barrel files. Import from specific files (e.g. `import { PEANUT_API_URL } from '@/constants/general.consts'`).
- **No circular dependencies** — check if target file imports from current file before adding imports. Move shared types to `interfaces.ts` if needed.
- **No Node.js packages in client components** — `web-push`, `fs`, `crypto` (node) can't be used in `'use client'` files. Use server actions or API routes instead.
- **Check for legacy code** — before importing, check for TODO comments marking code as legacy/deprecated. Prefer newer implementations.

## 🚫 Export Rules

- **One component per file** — never export multiple components from the same file.
- **Separate types** — never export types from a component or hook file. Use a separate file if types need to be reused.
- **Separate utils** — utility/helper functions go in a separate utils file.

## 🔗 URL as State (Critical for UX)

- **URL is source of truth** — use query parameters for user-facing state that should survive navigation, refresh, or sharing (step indicators, amounts, filters, view modes, selected items).
- **Use nuqs library** — always use `useQueryStates` for type-safe URL state management. Never manually parse/set query params with `router.push` or `URLSearchParams`.
- **Enable deep-linking** — users should be able to share or bookmark URLs mid-flow (e.g. `?step=inputAmount&amount=500&currency=ARS`).
- **Multi-step flows** — URL should always reflect current step and relevant data. Proper back/forward browser button behavior.
- **Reserve `useState` for ephemeral UI only** — loading spinners, modal open/close, form validation errors, hover/focus states, temporary animations.
- **Don't URL-ify everything** — API responses, auth state, and internal component state generally don't belong in the URL.
- **Type safety** — define parsers for query params (`parseAsInteger`, `parseAsStringEnum`).

## 🎨 Design System

- **Live showcase**: visit `/dev/components` to see all components rendered with all variants.
- **Three layers**: Bruddle primitives (`src/components/0_Bruddle/`), Global shared (`src/components/Global/`), Tailwind custom classes (`tailwind.config.js`).

### Color Names (misleading!)

- `purple-1` / `primary-1` = `#FF90E8` (PINK, not purple)
- `primary-3` = `#EFE4FF` (lavender)
- `yellow-1` / `secondary-1` = `#FFC900`
- `green-1` = `#98E9AB`

### Key Rules

- **Button sizing trap**: `size="large"` is `h-10` (40px) — SHORTER than default `h-13` (52px). Never use for primary CTAs.
- **Primary CTA**: `<Button variant="purple" shadowSize="4" className="w-full">` — no size prop.
- **Secondary CTA**: `<Button variant="stroke" className="w-full">`
- **Shadows**: always black `#000000`. Use `shadowSize="4"` for action buttons.
- **Border radius**: always `rounded-sm` (not rounded-lg or rounded-md).
- **Border stroke**: `border border-n-1` (1px black).
- **Links**: `text-black underline` — never `text-purple-1` (that's pink).
- **Text hierarchy**: `text-n-1` primary, `text-grey-1` secondary.
- **Two Card components**: `0_Bruddle/Card` (standalone containers, named export) vs `Global/Card` (stacked list items, default export).
- **Backgrounds**: `bg-peanut-repeat-normal` for waving peanut pattern.
- **Messaging**: use "starter balance" for card deposits — never "card balance" or "Peanut rewards".

### Bruddle Primitives (`0_Bruddle/`)

Button, Card (named export), BaseInput, BaseSelect, Checkbox, Divider, Title, Toast, PageContainer, CloudsBackground

### Global Shared Components (`Global/`)

- **Navigation**: NavHeader (back button + title), TopNavbar, Footer
- **Modals**: Modal (base @headlessui Dialog), ActionModal (with buttons/checkboxes/icons), Drawer (vaul bottom sheet)
- **Loading**: Loading (spinner), PeanutLoading (branded), PeanutFactsLoading (with fun facts)
- **Cards**: Card (with position prop for stacked lists), InfoCard, PeanutActionCard
- **Status**: StatusPill, StatusBadge, ErrorAlert, ProgressBar
- **Icons**: Icon component with 50+ icons — `<Icon name="check" size={20} />`
- **Inputs**: AmountInput, ValidatedInput, CopyField, GeneralRecipientInput, TokenSelector
- **Utilities**: CopyToClipboard, AddressLink, ExternalWalletButton, ShareButton, Banner, MarqueeWrapper

### Page Layouts

- **Outer shell**: `flex min-h-[inherit] flex-col gap-8` — NavHeader is first child.
- **Centered content + CTA** (default): wrap content AND CTA in `<div className="my-auto flex flex-col gap-6">`. CTA must be INSIDE this div, never a sibling.
- **Pinned footer CTA**: add `justify-between` to outer div, CTA as last child outside content.
- **Never** use `space-y-*` on the outer flex div (conflicts with centering) — use `gap-*` instead.

## 🚀 Performance

- **Cache where possible** — avoid unnecessary re-renders and data fetching.
- **Fire simultaneous requests** — if multiple awaits are independent, fire them in parallel.
- **Service Worker cache version** — only bump `NEXT_PUBLIC_API_VERSION` for breaking API changes (see JSDoc in `src/app/sw.ts`).
- **Gate heavy features in dev** — prefetching, precompiling, eager loading can add 5-10s to dev cold starts. Wrap with `process.env.NODE_ENV !== 'development'`.

## 🧪 Testing

- **Jest** — tests placed in `__tests__` directories next to code, named `*.test.ts` or `*.test.tsx`.
- **Run**: `npm test` (fast, ~5s) — all suites must pass.
- **Test new code** where tests make sense, especially with fast unit tests.

## 📁 Documentation

- **All docs go in `docs/`** (except root `README.md` and `CONTRIBUTING.md`).
- **Keep it concise** — AI tends to be verbose. No one reads that.
- **Check existing docs** before creating new ones — merge instead of duplicate.
- **Delete or edit outdated docs** instead of creating new ones.
- **Maintain PR.md for PRs** — concise `docs/PR.md` with: summary, risks, QA guidelines.

## ✅ Before Pushing

1. **Format**: `pnpm prettier --write <changed-files>` then `pnpm prettier --check .`
2. **Typecheck**: `npm run typecheck` — catches type errors tests miss
3. **Test**: `npm test` (~5s) — all suites must pass
4. **Build** (if touching imports/types): `npm run build`

## 📝 Commits

- **Be descriptive** — focus on the "why", not the "what".
- follow conventional commits.
45 changes: 2 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,50 +35,9 @@ pnpm dev

Then open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Code Formatting
## Contributing

This project uses Prettier for code formatting. To ensure consistent code style:

1. Install the VSCode Prettier extension
2. Enable "Format on Save" in VSCode
3. Prettier will automatically format your code when you save

The CI pipeline will check formatting on all PRs. Unformatted code will block merging.

## Testing

This project uses Jest for testing. Tests are located next to their source files in `__tests__` directories.

To run tests:

```bash
# Run all tests
pnpm test

# Run tests in watch mode during development
pnpm test:watch

# Run tests with coverage report
pnpm test:coverage
```

### Test Structure

- Tests are placed in `__tests__` directories next to the code they test
- Test files should be named `*.test.ts` or `*.test.tsx`
- Use descriptive test names that explain the expected behavior

Example:

```typescript
describe('Bank Account Formatting', () => {
it('should format IBAN with spaces every 4 characters', () => {
// test code
})
})
```

The CI pipeline runs tests on all PRs. Failed tests will block merging.
See [CONTRIBUTING.md](CONTRIBUTING.md) for coding standards, design system reference, and development rules.

## Archived Branches

Expand Down
File renamed without changes.
Loading
Loading