A modern Web3 dApp for the Centrifuge Investment application built with React, TypeScript, and Vite. It is a public application for investing in decentralized finance (DeFi) investment pools.
cfg- Core hooks, utilities, and business logic for SDK queries and CFG typescontexts- React contexts used for passing data within the appforms- Reusable custom react-hook-form components and validation utilitieshooks- Custom React hooksui- Design system and UI component library built with Chakra UIwallet- Wallet connection and Web3 integration utilities
- Node.js ≥ 18.0.0
- pnpm ≥ 8.0.0
# Install dependencies
pnpm install# Start the application
pnpm dev| Application | URL | Description |
|---|---|---|
| Invest App | http://localhost:3003 | Investment Application |
| Script | Description |
|---|---|
pnpm dev |
Start the application in development mode |
pnpm lint |
Run ESLint on all applications |
pnpm lint:fix |
Run ESLint with auto-fix on all applications |
pnpm format |
Run prettier formatter on project src files |
- React 19 - UI framework
- TypeScript 5.8 - Type safety
- Vite 6 - Build tool and dev server
- React Router v7 - Client-side routing
- Chakra UI 3 - Component library
- TanStack Query 5 - Data fetching and caching
- Recharts - Data visualization
- Centrifuge SDK - Core blockchain integration
- Wagmi 2 - React hooks for Web3
- Viem - TypeScript Ethereum library
- Reown AppKit - Wallet connection
- ESLint 9 - Code linting
- Prettier 3 - Code formatting
- TypeScript - Static type checking
This project uses pnpm for efficient dependency management and build optimization. The preinstall script ensures only pnpm is used for consistency.
# Add to workspace root
pnpm add <package>
# Add dev dependency
pnpm add -D <dev-dependency>- ESLint configuration
- TypeScript strict mode is enabled
- Prettier formatting is enforced
Default ports are configured but will automatically use the next available port if occupied:
- Invest App: 3003
This project is configured for deployment to Cloudflare Pages using Wrangler. The application supports multiple environments for different stages of development and release.