A comprehensive crypto portfolio tracker with Hyperliquid integration, built with TypeScript, React, and Express.
- 📊 Real-time Portfolio Tracking - Monitor your crypto assets across multiple chains
- 🔥 Hyperliquid Integration - Track perpetual positions and balances
- 💼 Multi-Protocol Support - Ready for IBKR, Aster, and more DeFi protocols
- 🎨 Modern UI - Beautiful dashboard built with React, TailwindCSS, and shadcn/ui
- 🔐 Secure Wallet Management - BIP39 mnemonic-based wallet with HD derivation
- 📈 PnL Tracking - Monitor your 24h, 7d, and 30d performance
portfolio-tracker/
├── src/ # Backend (Node.js + Express)
│ ├── server.ts # API server
│ ├── wallet-core.ts # Wallet management
│ ├── defi/ # DeFi protocol adapters
│ │ └── hyperliquid.ts
│ └── types/ # TypeScript types
└── client/ # Frontend (React + Vite)
└── src/
├── components/ # UI components
├── pages/ # Page components
└── hooks/ # React hooks
- Node.js >= 18.0.0
- npm or yarn
-
Clone the repository
cd /Users/martinolialexandre/CascadeProjects/portfolio-tracker -
Install backend dependencies
npm install
-
Install frontend dependencies
cd client npm install cd ..
-
Configure environment variables
cp .env.example .env
Edit
.envand add your mnemonic:MNEMONIC="your twelve or twenty four word mnemonic phrase" PORT=4000
Terminal 1 - Backend API Server:
npm run serverThe API server will start on http://localhost:4000
Terminal 2 - Frontend Dev Server:
cd client
npm run devThe frontend will start on http://localhost:3000
# Build backend
npm run build
# Build frontend
cd client
npm run build
cd ..
# Start production server
npm start- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:4000
- API Health Check: http://localhost:4000/api/health
- Portfolio Data: http://localhost:4000/api/portfolio
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/portfolio |
Get portfolio summary with balances and positions |
| GET | /api/wallet/address |
Get wallet address |
The wallet core uses BIP44 derivation paths:
- Ethereum (chainId: 60)
- Hyperliquid (chainId: 1337)
- Add more chains as needed
- Create a new adapter in
src/defi/ - Implement the balance and position fetching methods
- Add the adapter to
src/server.ts
- TypeScript - Type-safe development
- Express - Web server framework
- ethers.js - Ethereum library
- bip39 - Mnemonic generation and validation
- @hyperliquid/sdk - Hyperliquid integration
- React 18 - UI library
- Vite - Build tool
- TailwindCSS - Styling
- shadcn/ui - UI components
- Lucide React - Icons
- TanStack Query - Data fetching
- Recharts - Charts (ready to use)
- Never commit your
.envfile - Keep your mnemonic phrase secure
- Use environment variables for sensitive data
- Consider using hardware wallets for production
# Backend
npm run dev # Run backend in development mode
npm run server # Run API server
npm run build # Build backend
npm run lint # Lint code
npm run format # Format code
# Frontend (in client/ directory)
npm run dev # Run frontend dev server
npm run build # Build for production
npm run preview # Preview production build- Add more DeFi protocol integrations (Aster, GMX, etc.)
- NFT portfolio tracking
- Historical price charts
- Transaction history
- Multi-wallet support
- Mobile responsive design improvements
- Dark/Light theme toggle
- Export portfolio data (CSV, PDF)
- Price alerts and notifications
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
Built with ❤️ for the crypto community