A modern, user-friendly Solana wallet application built with React, TypeScript, and Vite. Features real-time balance tracking, SOL transfers, and crypto news integration.
-
🔐 Wallet Integration
- Multiple wallet support (Phantom, Solflare, Coinbase)
- Real-time balance updates
- Secure transaction handling
-
💸 Transaction Management
- Send SOL to any Solana address
- Input validation and error handling
- Transaction status notifications
-
📰 Crypto News Feed
- Real-time crypto news updates
- Clickable news cards
- Auto-refresh functionality
-
🎨 Modern UI/UX
- Responsive design
- Dark/light theme support
- Loading states and animations
- React + TypeScript
- Vite
- Tailwind CSS
- Solana Web3.js
- Solana Wallet Adapter
- Lucide React Icons
src/
├── components/ # React components
│ ├── wallet/ # Wallet-related components
│ │ ├── AirdropButton.tsx
│ │ ├── WalletBalance.tsx
│ │ └── WalletProvider.tsx
│ ├── transaction/ # Transaction components
│ │ └── TransactionForm.tsx
│ └── news/ # News components
│ ├── NewsCard.tsx
│ └── NewsFeed.tsx
├── utils/ # Utility functions
│ ├── api.ts # API integration
│ └── validation.ts # Input validation
└── main.tsx # App entry point
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Create small, focused components
- Extract reusable logic into utility functions
- Keep components under 200 lines
- Use TypeScript for type safety
-
Component Structure
- One component per file
- Clear component responsibilities
- Props interface definitions
-
State Management
- Use React hooks appropriately
- Keep state close to where it's used
- Avoid prop drilling
-
Error Handling
- Proper error boundaries
- User-friendly error messages
- Graceful fallbacks
-
Performance
- Memoize expensive calculations
- Lazy load components
- Optimize re-renders
- Use Tailwind CSS classes
- Follow mobile-first approach
- Maintain consistent spacing
- Use design tokens
// Example wallet connection
const { publicKey, sendTransaction } = useWallet();
- Handles wallet connection
- Manages wallet state
- Provides transaction methods
// Example transaction
const transaction = new Transaction().add(
SystemProgram.transfer({
fromPubkey: publicKey,
toPubkey: recipientPubKey,
lamports: amount * LAMPORTS_PER_SOL,
})
);
- Transaction building
- Fee calculation
- Confirmation handling
// Example news fetch
const news = await fetch(
'https://min-api.cryptocompare.com/data/v2/news/'
);
- Real-time news updates
- Error handling
- Data transformation
- Input validation for all user inputs
- Secure wallet connection handling
- Transaction confirmation checks
- Error handling and user feedback
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License - feel free to use this project for your own purposes.