Skip to content

cxcgeek/defaults.com

Repository files navigation

DeFi Platform

A comprehensive decentralized finance (DeFi) platform built with Next.js, featuring real-time crypto data, trading interfaces, portfolio tracking, and DODO exchange integration.

Features

  • Real-time Crypto Data: Powered by CoinMarketCap API for accurate market information
  • Trading Interface: Advanced trading tools with charts, order books, and market analysis
  • Portfolio Tracking: Comprehensive portfolio management with performance analytics
  • DeFi Analytics: Protocol analysis, yield farming opportunities, and liquidity pool management
  • DODO Integration: Direct integration with DODO exchange for seamless swapping
  • Market Overview: Live cryptocurrency prices, trending coins, and global market metrics

Environment Variables

To run this project, you'll need to add the following environment variables:

Required

  • REACT_APP_CRYPTO_KEY: Your DODO API key (default: 2597ea4c0d5cabf1a2)

Optional (for enhanced features)

  • REACT_APP_CMC_API_KEY: Your CoinMarketCap API key for real-time data

API Integration

CoinMarketCap API

The platform integrates with CoinMarketCap's professional API to provide:

  • Real-time cryptocurrency prices and market data
  • Global market metrics (total market cap, 24h volume, dominance)
  • Trending coins and gainers/losers
  • Market capitalization and ranking data

DODO Exchange API

Integration with DODO's decentralized exchange for:

  • Token swapping with real-time quotes
  • Liquidity pool information and management
  • Yield farming opportunities
  • Transaction execution and tracking

Getting Started

  1. Clone the repository
  2. Install dependencies: npm install
  3. Set up your environment variables in .env.local
  4. Run the development server: npm run dev
  5. Open http://localhost:3000 in your browser

Project Structure

``` ├── app/ # Next.js app router pages │ ├── analytics/ # DeFi analytics dashboard │ ├── dodo/ # DODO exchange interface │ ├── market/ # Market overview and crypto prices │ ├── portfolio/ # Portfolio tracking and management │ └── trading/ # Trading interface and tools ├── components/ # Reusable React components │ ├── ui/ # Base UI components (shadcn/ui) │ └── ... # Feature-specific components └── lib/ # Utility functions and API integrations └── crypto-api.ts # Crypto data service layer ```

Technology Stack

  • Framework: Next.js 14 with App Router
  • Styling: Tailwind CSS v4 with shadcn/ui components
  • Charts: Recharts for data visualization
  • API Integration: CoinMarketCap Pro API, DODO Exchange API
  • TypeScript: Full type safety throughout the application

Features Overview

Dashboard

  • Portfolio overview with real-time values
  • Global market statistics from CoinMarketCap
  • Quick access to trading and DeFi opportunities
  • Live crypto price widgets

Trading

  • Advanced trading interface with real-time charts
  • Order book and recent trades display
  • Market and limit order execution
  • Slippage and gas estimation

Portfolio

  • Comprehensive asset tracking and analytics
  • Performance metrics and historical data
  • Asset allocation visualization
  • Transaction history and P&L tracking

Market

  • Live cryptocurrency prices and market data
  • Trending coins and market movers
  • Global market statistics and dominance charts
  • Market sentiment indicators

Analytics

  • DeFi protocol analysis and comparison
  • Yield farming opportunities and APY tracking
  • Liquidity pool management and rewards
  • Risk analysis and portfolio optimization

DODO Integration

  • Direct token swapping interface
  • Liquidity pool participation
  • Reward tracking and claiming
  • Real-time quote and execution

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License. ```