Skip to content

jaferi/diney-back-test

Repository files navigation

CoreX - Next-Generation DeFi & Crypto Trading Platform

CoreX is a complete decentralized finance (DeFi) and cryptocurrency trading ecosystem built with React, TypeScript, and Node.js. Experience the power of DeFi with yield farming, staking, liquidity pools, and DEX trading, combined with professional spot trading tools, non-custodial wallet management, and real-time multi-chain market data.

CoreX Platform

🌟 DeFi + Trading Combined

CoreX bridges the gap between traditional crypto trading and decentralized finance, offering:

  • DeFi Protocols: Yield farming, staking, lending, and liquidity mining
  • DEX Trading: Decentralized exchange with AMM and liquidity pools
  • Spot Trading: Professional trading interface with advanced order types
  • Multi-Chain: Support for Ethereum, BSC, Polygon, Avalanche, and more
  • Non-Custodial: Your keys, your crypto - full asset control

πŸš€ Features

DeFi Ecosystem

  • Decentralized Exchange (DEX): Trade directly from your wallet with automated market makers (AMM)
  • Yield Farming: Maximize returns with automated yield farming strategies and liquidity mining rewards
  • Staking & Lending: Stake tokens to earn rewards or lend assets with transparent smart contracts
  • Liquidity Pools: Provide liquidity and earn trading fees from the pool
  • Cross-Chain Bridges: Seamlessly move assets between Ethereum, BSC, Polygon, Avalanche, and more
  • DAO Governance: Participate in protocol governance with voting rights on proposals and upgrades

Trading & Markets

  • Spot Trading: Professional trading interface with real-time order books and recent trades
  • Multiple Order Types: Market and limit orders with instant execution
  • Real-time Market Data: Live price updates, 24h volume, price changes, and TVL (Total Value Locked)
  • Market Overview: Top gainers, losers, DeFi protocols, and comprehensive market statistics
  • Favorites System: Save and track your favorite trading pairs and DeFi pools

Non-Custodial Wallet Management

  • Non-Custodial: Full control of your private keys and assets - your keys, your crypto
  • Multi-Chain Support: Manage assets across Ethereum, BSC, Polygon, and more
  • DeFi Integration: Direct access to staking, farming, and liquidity pools from your wallet
  • Secure Deposits & Withdrawals: Support for multiple blockchain networks and bridges
  • Transaction History: Complete on-chain transaction tracking with status updates
  • Portfolio Overview: Total portfolio value including staked assets, LP tokens, and rewards
  • Hide Balance Feature: Privacy option to hide sensitive information

User Experience

  • Professional Dashboard: Portfolio overview with quick stats and recent activities
  • Responsive Design: Works seamlessly on desktop, tablet, and mobile
  • Dark Mode: Eye-friendly dark theme optimized for trading
  • Modern UI: Built with Shadcn UI and Tailwind CSS
  • Real-time Updates: Automatic data refresh every 5-10 seconds

Security & Smart Contracts

  • Smart Contract Audited: All DeFi protocols audited by leading security firms
  • Non-Custodial Security: Assets remain in your wallet, never on centralized servers
  • Trustless Transactions: All DeFi operations through transparent smart contracts
  • Authentication System: Secure login and registration
  • Protected Routes: Authorization guards for sensitive pages
  • Two-Factor Authentication: Optional 2FA for enhanced security
  • Multi-Signature Support: Enterprise-grade security for large holdings

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js: Version 18.0.0 or higher
  • npm: Version 9.0.0 or higher
  • Web3 Wallet (Optional): MetaMask, WalletConnect, or similar for DeFi features

πŸš€ Quick Start

Get started in 3 simple steps:

# 1. Clone the repository
git clone <repository-url>
cd corex-arc

# 2. Install dependencies
npm install

# 3. Run the application (frontend + backend)
npm run dev

That's it!

πŸŽ‰

Additional Commands

# Run frontend only
npm run dev:client

# Run backend only
npm run dev:server

# Build for production
npm run build

# Preview production build
npm run preview

# Run linter
npm run lint

βš™οΈ Configuration (Optional)

Frontend Environment Variables

Create .env file in root (optional):

VITE_API_URL=http://localhost:3000/api
VITE_APP_NAME=CoreX
VITE_APP_VERSION=1.0.0

Backend Configuration

Update server/config/config.env (if running backend):

PORT=3000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret

πŸ“ Project Structure

corex-arc/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ layouts/         # Layout components
β”‚   β”‚   β”‚   └── MainLayout.tsx
β”‚   β”‚   β”œβ”€β”€ ui/              # Shadcn UI components
β”‚   β”‚   β”œβ”€β”€ Hero.tsx
β”‚   β”‚   β”œβ”€β”€ Navigation.tsx
β”‚   β”‚   β”œβ”€β”€ Features.tsx
β”‚   β”‚   β”œβ”€β”€ Stats.tsx
β”‚   β”‚   β”œβ”€β”€ Footer.tsx
β”‚   β”‚   └── ProtectedRoute.tsx
β”‚   β”œβ”€β”€ pages/               # Page components
β”‚   β”‚   β”œβ”€β”€ Index.tsx        # Landing page
β”‚   β”‚   β”œβ”€β”€ Login.tsx
β”‚   β”‚   β”œβ”€β”€ Register.tsx
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx
β”‚   β”‚   β”œβ”€β”€ Trading.tsx
β”‚   β”‚   β”œβ”€β”€ Markets.tsx
β”‚   β”‚   β”œβ”€β”€ Wallet.tsx
β”‚   β”‚   β”œβ”€β”€ Settings.tsx
β”‚   β”‚   └── NotFound.tsx
β”‚   β”œβ”€β”€ contexts/            # React contexts
β”‚   β”‚   └── AuthContext.tsx
β”‚   β”œβ”€β”€ services/            # API services
β”‚   β”‚   └── api.ts
β”‚   β”œβ”€β”€ hooks/               # Custom hooks
β”‚   β”œβ”€β”€ lib/                 # Utility functions
β”‚   β”œβ”€β”€ App.tsx              # Main app component
β”‚   └── main.tsx             # App entry point
β”œβ”€β”€ server/                  # Backend API
β”‚   β”œβ”€β”€ controllers/         # Route controllers
β”‚   β”œβ”€β”€ models/              # Database models
β”‚   β”œβ”€β”€ routes/              # API routes
β”‚   β”œβ”€β”€ middlewares/         # Custom middlewares
β”‚   └── config/              # Configuration files
β”œβ”€β”€ public/                  # Static assets
└── package.json

🎯 Key Pages

Landing Page (/)

  • Hero section emphasizing DeFi ecosystem
  • DeFi feature highlights (DEX, Yield Farming, Staking, etc.)
  • TVL (Total Value Locked) statistics
  • Multi-chain support showcase
  • Footer with DeFi product links

Dashboard (/dashboard)

  • DeFi Portfolio overview with staked assets and LP tokens
  • Total balance, P/L, and yield earnings
  • Active DeFi positions (farms, pools, stakes)
  • Recent trades and transactions
  • Top performing DeFi protocols
  • Quick actions for trading and farming

Trading (/trading)

  • DEX and Spot Trading interface
  • Live order book with liquidity depth
  • Recent trades and volume
  • Buy/Sell forms with slippage protection
  • Market/Limit orders
  • Real-time price updates and APY rates

Markets (/markets)

  • All trading pairs and DeFi pools
  • Market search and filters
  • Top gainers/losers and highest APY farms
  • TVL rankings for liquidity pools
  • Favorites management
  • Quick access to trade or provide liquidity

Wallet (/wallet)

  • Multi-chain asset balances
  • Staked tokens and LP positions
  • DeFi rewards and yield tracking
  • Deposit/Withdrawal functionality
  • Cross-chain bridge integration
  • Transaction history (on-chain verified)
  • Portfolio value including all DeFi positions

Settings (/settings)

  • Profile management
  • Wallet connections (MetaMask, WalletConnect)
  • Password change and 2FA
  • DeFi notification preferences (yield alerts, pool updates)
  • Gas fee settings
  • Slippage tolerance configuration
  • Privacy controls

πŸ”§ API & Smart Contract Integration

The platform integrates with:

  • RESTful Backend API for trading and user management
  • Web3 Integration for DeFi smart contracts
  • Multi-Chain RPC Nodes for Ethereum, BSC, Polygon, etc.
  • DEX Aggregators for best swap rates
  • Yield Farming Protocols for automated strategies

Backend API Endpoints:

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • GET /api/auth/verify - Token verification
  • POST /api/auth/logout - User logout

Markets

  • GET /api/markets - Get all markets
  • GET /api/markets/:pair - Get specific market
  • GET /api/markets/top-gainers - Top performing markets
  • GET /api/markets/top-losers - Worst performing markets
  • GET /api/markets/:pair/history - Price history

Trading

  • GET /api/trading/orderbook/:pair - Get order book
  • GET /api/trading/trades/:pair - Get recent trades
  • POST /api/trading/orders - Place new order
  • GET /api/trading/orders - Get user orders
  • DELETE /api/trading/orders/:orderId - Cancel order

Wallet

  • GET /api/wallet/balances - Get user balances
  • GET /api/wallet/summary - Get wallet summary
  • GET /api/wallet/transactions - Get transaction history
  • POST /api/wallet/deposit - Create deposit
  • POST /api/wallet/withdraw - Create withdrawal

🎨 Styling & UI

  • Framework: Tailwind CSS
  • Components: Shadcn UI
  • Icons: Lucide React
  • Theme: Dark mode optimized for DeFi and trading
  • Colors: Blue and purple gradient theme representing DeFi innovation
  • Animations: Smooth transitions and hover effects
  • Responsive: Mobile-first design for DeFi on-the-go

πŸ” Security Features

Traditional Security

  • JWT token-based authentication
  • Password strength validation
  • Protected routes with auth guards
  • Automatic token refresh
  • Secure API communication
  • Input validation and sanitization

DeFi Security

  • Smart contract audits by leading firms
  • Non-custodial architecture (assets never leave your wallet)
  • Trustless smart contract execution
  • Multi-signature wallet support
  • Slippage protection on DEX trades
  • Gas price optimization
  • Front-running protection
  • Transparent on-chain transactions

πŸ“± Responsive Design

The platform is fully responsive and optimized for:

  • Desktop (1920px and above)
  • Laptop (1024px - 1919px)
  • Tablet (768px - 1023px)
  • Mobile (320px - 767px)

🚧 Development

# Run linter
npm run lint

# Build for production
npm run build

# Preview production build
npm run preview

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License.

🌐 Multi-Chain Support

CoreX supports DeFi protocols across multiple blockchains:

  • Ethereum - The original DeFi ecosystem
  • Binance Smart Chain (BSC) - Low-cost DeFi alternatives
  • Polygon - Fast and cheap transactions
  • Avalanche - High-performance DeFi protocols
  • Arbitrum - Ethereum Layer 2 scaling
  • Optimism - Fast Ethereum L2 transactions

πŸ™ Acknowledgments

πŸ“ž Support

For support, email [email protected] or join our Discord community.


CoreX - Decentralized Finance & Trading Platform πŸš€
Decentralized. Trustless. Permissionless.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published