Documentation site for the SmoothSend SDK. Built with Next.js 14 (App Router), Tailwind CSS, and highlight.js. Covers chain-neutral platform docs plus Aptos integration and Avalanche ERC-4337 (AVAX bundler + paymaster) guides.
Live at: https://docs.smoothsend.xyz
| Layer | Choice |
|---|---|
| Framework | Next.js 14 — App Router |
| Styling | Tailwind CSS 3 + custom CSS utilities |
| Syntax highlighting | highlight.js (Dracula+ theme) |
| Icons | lucide-react |
| UI primitives | Radix UI via shadcn/ui |
| Theme | Dark-only — Deep Space palette |
npm install
npm run dev # http://localhost:3000
npm run build # production build
npm run lint # eslintdocs-site/
├── app/
│ ├── page.tsx # Landing page — hero, features, gas calculator, quick start
│ ├── getting-started/page.tsx # Chain selection + first integration steps
│ ├── architecture/page.tsx # Gateway/relayer/bundler/control-plane overview
│ ├── layout.tsx # Root layout — Navigation + Footer
│ ├── globals.css # Tailwind base, hljs Dracula+ tokens, glass utilities, animations
│ ├── aptos/
│ │ ├── installation/page.tsx # npm install + verification
│ │ ├── quickstart/page.tsx # Method comparison table, both integration methods with code
│ │ ├── api-reference/page.tsx # SDK classes, methods, supported tokens table
│ │ └── examples/page.tsx # Annotated real-world code examples
│ ├── avax/
│ │ ├── page.tsx # Redirect to AVAX quickstart
│ │ ├── quickstart/page.tsx # ERC-4337 integration via @smoothsend/sdk/avax
│ │ ├── api-reference/page.tsx # AVAX submitter/hook/helper API docs
│ │ └── examples/page.tsx # End-to-end AVAX integration examples
│ └── billing/page.tsx # Credit packages, pricing table, gas calculator, FAQ
├── components/
│ ├── navigation.tsx # Sticky nav — glassmorphism backdrop, active link highlight
│ ├── footer.tsx # 4-column footer
│ ├── gas-calculator.tsx # Interactive gas/credit estimator (client component)
│ ├── latency-test.tsx # On-demand gateway latency ping (client component)
│ ├── theme-provider.tsx
│ └── ui/
│ ├── code-block.tsx # Syntax-highlighted code blocks — hljs, line numbers, copy button
│ ├── card.tsx
│ ├── button.tsx
│ └── ... # shadcn/ui primitives
└── lib/
└── utils.ts
Syntax-highlighted code display using highlight.js. Supports TypeScript, JavaScript, Bash, JSON.
<CodeBlock
language="typescript"
filename="App.tsx"
showLineNumbers
highlightLines={[1, 5, 6]}
code={`your code here`}
/>Props:
language—typescript|javascript|bash|shell|jsonfilename— shown in the macOS-style header barshowLineNumbers— renders line number gutterhighlightLines— array of 1-indexed line numbers to highlight in purple
Client-side interactive calculator. Two input modes:
- From Explorer — paste
gas_used+gas_unit_pricefrom any Aptos Explorer transaction - VM Breakdown — enter
instruction_gas,storage_gas,payload_bytesdirectly
APT price is fetched live from the CoinGecko free API on mount and refreshed every 60 seconds. Manual override supported.
Outputs: per-transaction network fee, SmoothSend credit fee, monthly cost at a given volume, and monthly gas savings for users.
On-demand gateway latency measurement. Pings proxy.smoothsend.xyz/health five times (first ping discarded as cold-start), shows min / avg / p95 from the user's actual location. 30-second client-side cooldown between tests to prevent abuse.
| Token | Hex | Usage |
|---|---|---|
smoothsend-primary |
#7595FF |
Primary blue-purple — CTAs, highlights, accents |
smoothsend-primary-dark |
#5B7ADD |
Button hover states |
smoothsend-cyan |
#06b6d4 |
Script Composer accent, secondary highlights |
--background |
#0B0C15 |
Page background (Deep Space) |
--card |
#13141F |
Card backgrounds |
--border |
#2D3142 |
Borders and dividers |
See tailwind.config.ts for the full palette and app/globals.css for CSS variable definitions.
Three glassmorphism classes are available globally (globals.css):
.glass /* subtle — bg-white/3%, blur-xl, border-white/7% */
.glass-card /* medium — bg-white/4%, blur-2xl, deep shadow */
.glass-strong /* strong — bg-white/6%, blur-3xl, inner glow */Animation utilities:
.animate-pulse-glow /* ambient orb breathing effect — 4s ease-in-out */
.animate-float /* gentle vertical float — 7s ease-in-out */
.animate-shimmer /* gradient shimmer sweep */The Dracula+ token color palette is defined in app/globals.css under the /* Syntax Highlighting */ section. Tokens:
| Token | Color | Examples |
|---|---|---|
| keyword | #ff79c6 (pink) |
import, const, await, return |
| built_in / type | #8be9fd (cyan) |
string, Promise, console |
| function | #50fa7b (green) |
function names |
| string | #f1fa8c (yellow) |
string literals |
| number / literal | #bd93f9 (purple) |
numbers, true, null |
| comment | #6272a4 (muted blue) |
// comments |
| params | #ffb86c (orange) |
function parameters |
To add documentation for a new chain (EVM, Stellar, Solana):
- Create
app/<chain>/with the same page structure:
app/evm/
├── installation/page.tsx
├── quickstart/page.tsx
├── api-reference/page.tsx
└── examples/page.tsx
- Add nav items to
components/navigation.tsx— thenavItemsarray. - Update
components/footer.tsx— Documentation links section. - Follow the existing Aptos pages as templates. Use
<CodeBlock>for all code,<GasCalculator>if the chain has a fee model to expose.
Designed for Vercel (zero config for Next.js 14). Push to main → auto-deploys.
# Preview locally before pushing
npm run build && npm startTarget domain: docs.smoothsend.xyz
Install it using npm install @smoothsend/mcp