Skip to content

Commit a2e90a7

Browse files
permaweb
1 parent bc6bb6e commit a2e90a7

3 files changed

Lines changed: 24 additions & 7 deletions

File tree

CLAUDE.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
55
## Development Commands
66

77
### Core Development
8+
89
- `bun run dev` - Start development server (runs prettier first, then Next.js dev)
910
- `bun run build` - Build production application
1011
- `bun run prettier` - Format code with Prettier
1112
- `next-sitemap` - Generate sitemap (runs post-build)
1213

1314
### Deployment
15+
1416
- `bun run permaweb-deploy` - Deploy to Permaweb (Arweave network)
1517

1618
### Package Management
19+
1720
- `bun link liquidops` - Link local liquidops package for development
1821

1922
## Architecture Overview
2023

2124
### Tech Stack
25+
2226
- **Framework**: Next.js 14 with App Router and static export
2327
- **Runtime**: Bun (preferred package manager)
2428
- **Styling**: Tailwind CSS with CSS Modules
@@ -27,6 +31,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
2731
- **UI Components**: Custom components with shadcn/ui configuration
2832

2933
### Key Integrations
34+
3035
- **LiquidOps SDK**: Core DeFi protocol integration (`liquidops` package)
3136
- **AO Connect**: Arweave blockchain interaction via `@permaweb/aoconnect`
3237
- **AOSync**: Wallet management via `@vela-ventures/aosync-sdk-react`
@@ -36,25 +41,29 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
3641
### Project Structure
3742

3843
#### Core Application (`src/app/`)
44+
3945
- **App Router structure** with page-based routing
4046
- **providers.tsx**: Global providers (React Query, AOSync, Notifications)
4147
- **layout.tsx**: Root layout with SEO metadata and font configuration
4248
- **Page components**: home, markets, strategies, [ticker] (dynamic routes)
4349

4450
#### Component Architecture (`src/components/`)
51+
4552
- **Modular components** with co-located CSS modules
4653
- **Activity tracking**: ActivityList with transaction history
4754
- **Wallet integration**: Connect component with wallet modal
4855
- **Notifications**: Custom notification system
4956
- **UI primitives**: InputBox, DropDown, Tooltip, etc.
5057

5158
#### Data Layer (`src/hooks/`)
59+
5260
- **LiquidOpsData/**: Protocol-specific data hooks (positions, balances, APR)
5361
- **actions/**: Transaction hooks (useLend, useBorrow)
5462
- **data/**: General data hooks (wallet, tokens, prices)
5563
- **strategies/**: DeFi strategy-related hooks
5664

5765
#### Utilities (`src/utils/`)
66+
5867
- **LiquidOps/**: Protocol client and token formatting
5968
- **caches/**: Custom caching system for blockchain data
6069
- **AO/**: Arweave blockchain utilities
@@ -63,47 +72,55 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6372
### Configuration Details
6473

6574
#### Build Configuration
75+
6676
- **Static export** configured in next.config.mjs
6777
- **Asset optimization disabled** for static deployment
6878
- **Webpack fallbacks** for Node.js modules
6979
- **Git hash injection** for build versioning
7080

7181
#### TypeScript Setup
82+
7283
- **Strict mode enabled** with ES2020 target
7384
- **Path aliases**: `@/*` maps to `src/*`
7485
- **Module resolution**: bundler mode for optimal tree-shaking
7586

7687
#### Blockchain Integration
88+
7789
- **Arweave wallet** integration via window.arweaveWallet
7890
- **AO testnet** connection (mu.ao-testnet.xyz)
7991
- **Custom signer** creation for transaction signing
8092

8193
### Development Patterns
8294

8395
#### State Management
96+
8497
- **React Query** for server state with 60s stale time
8598
- **Custom cache utilities** for blockchain data persistence
8699
- **Context providers** for wallet state and notifications
87100

88101
#### Error Handling
102+
89103
- **Transaction tracking** with success/failure states
90104
- **Custom error messages** from blockchain responses
91105
- **Notification system** for user feedback
92106

93107
#### Data Fetching
108+
94109
- **Optimistic updates** for transaction states
95110
- **Cache invalidation** on successful transactions
96111
- **Parallel query execution** for improved performance
97112

98113
### Key Dependencies to Note
114+
99115
- Uses **Bun** as package manager (not npm/yarn)
100116
- **LiquidOps SDK** is core dependency - check version compatibility
101117
- **AO ecosystem** packages for Arweave blockchain interaction
102118
- **Recharts** for data visualization components
103119
- **Framer Motion** for animations (version 11+)
104120

105121
### Deployment Notes
122+
106123
- **Static export** to `dist/` directory
107124
- **Permaweb deployment** via custom script
108125
- **SEO optimization** with Next.js metadata API
109-
- **Sitemap generation** for search engines
126+
- **Sitemap generation** for search engines

bun.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"@ar.io/sdk": "^3.10.1",
1515
"@irys/sdk": "^0.2.11",
16-
"@permaweb/aoconnect": "^0.0.84",
16+
"@permaweb/aoconnect": "^0.0.85",
1717
"@permaweb/aoprofile": "^0.0.9",
1818
"@tailwindcss/postcss": "^4.0.15",
1919
"@tanstack/react-query": "^5.62.11",
@@ -25,7 +25,7 @@
2525
"clsx": "^2.1.1",
2626
"dotenv": "^16.5.0",
2727
"framer-motion": "^11.15.0",
28-
"liquidops": "^1.2.5",
28+
"liquidops": "^1.2.8",
2929
"lucide-react": "^0.483.0",
3030
"next": "14.2.15",
3131
"next-sitemap": "^4.2.3",

0 commit comments

Comments
 (0)