A modern, user-friendly decentralized exchange built specifically for the Indian market, enabling seamless cryptocurrency transactions with just a Google account.
- 🔐 One-Click Wallet Creation: Sign in with Google to instantly create a secure Solana wallet
- 💱 Token Swapping: Swap between SOL, USDC, and USDT using Jupiter Protocol
- 📤 Send & Receive: Transfer tokens to any Solana wallet address
- 💰 INR Integration: Add funds using Indian payment methods (UPI, Net Banking, Cards)
- 📊 Portfolio Overview: Real-time balance tracking with USD valuations
- 📜 Transaction History: Complete history of all your transactions
- 🔒 Secure Key Management: Private keys are encrypted and stored securely
- ⚡ Real-time Price Updates: Live token prices from Jupiter API
- 📱 Mobile Responsive: Fully responsive design for all devices
- 🎨 Modern UI/UX: Clean, intuitive interface with smooth animations
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- NextAuth.js - Authentication with Google OAuth
- Solana Web3.js - Blockchain interactions
- SPL Token - Token program integration
- Jupiter Protocol - Token swapping and pricing
- PostgreSQL - User and wallet data storage
- Prisma ORM - Type-safe database access
- Next.js API Routes - Serverless backend functions
- Alchemy - Solana RPC provider
- Jupiter APIs - Token prices and swap quotes
- Node.js 18+ and npm
- PostgreSQL database
- Google OAuth credentials
- Alchemy API key (for Solana RPC)
git clone https://github.com/yourusername/dcex-frontend.git
cd dcex-frontendnpm installCreate a .env.local file in the root directory:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/dcex"
# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key"
# Google OAuth
GOOGLE_ID="your-google-client-id"
GOOGLE_SECRET="your-google-client-secret"
# Solana RPC (optional - defaults to public endpoint)
SOLANA_RPC_URL="https://solana-mainnet.g.alchemy.com/v2/your-api-key"npx prisma migrate devnpm run devOpen http://localhost:3000 to see the application.
frontend/
├── app/
│ ├── api/ # API routes
│ │ ├── auth/ # NextAuth configuration
│ │ ├── send/ # Token transfer endpoint
│ │ ├── swap/ # Token swap endpoint
│ │ ├── tokens/ # Balance fetching
│ │ └── transactions/ # Transaction history
│ ├── components/ # React components
│ │ ├── AddFunds.tsx
│ │ ├── Hero.tsx
│ │ ├── ProfileCard.tsx
│ │ ├── Send.tsx
│ │ ├── Swap.tsx
│ │ └── TransactionHistory.tsx
│ ├── lib/ # Utilities
│ │ ├── auth.ts # Auth configuration
│ │ ├── constants.ts # App constants
│ │ └── tokens.ts # Token definitions
│ └── dashboard/ # Dashboard page
├── prisma/ # Database schema
└── public/ # Static assets
- User clicks "Login with Google"
- Google OAuth authentication
- On first login, system generates a Solana keypair
- Wallet data encrypted and stored in PostgreSQL
- User selects tokens and enters amount
- Real-time quote fetched from Jupiter
- Transaction built and signed with user's private key
- Transaction submitted to Solana blockchain
- Private keys are encrypted before storage
- All API routes require authentication
- Sensitive operations use server-side signing
| Endpoint | Method | Description |
|---|---|---|
/api/auth |
GET/POST | NextAuth endpoints |
/api/tokens |
GET | Fetch token balances |
/api/swap |
POST | Execute token swap |
/api/send |
POST | Send tokens |
/api/transactions |
GET | Get transaction history |
- Real fiat on/off ramp integration
- Support for more tokens
- Advanced trading features (limit orders, DCA)
- Mobile app (React Native)
- Multi-chain support
- Staking functionality
- Yield farming integration
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Solana for the blockchain infrastructure
- Jupiter for swap aggregation
- Next.js for the amazing framework
- The open-source community for various libraries used
For any queries or suggestions, please reach out to:
- Email: contact@dcex.exchange
- Twitter: @dcex_india
Built with ❤️ for the Indian crypto community