Skip to content

AhEsmaeili79/CryptoCurrency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

43 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Cryptocurrency Trading Platform

A modern, full-stack cryptocurrency trading platform built with React TypeScript frontend and Django REST API backend. This platform provides real-time cryptocurrency prices, trading capabilities, wallet management, and educational content for crypto enthusiasts.

โœจ Features

๐Ÿ  Home Dashboard

  • Real-time Crypto Market Cards - Live cryptocurrency price updates
  • Online Price Calculator - Convert between different cryptocurrencies
  • Educational Content - Learn about cryptocurrency trading
  • News Section - Latest crypto market news and updates
  • Digital Wallet Information - Secure wallet management details
  • FAQ Section - Frequently asked questions about crypto trading

๐Ÿ’ฐ Trading Features

  • Buy/Sell Cryptocurrencies - Execute trades with real-time pricing
  • Crypto Exchange - Convert between different cryptocurrencies
  • Wallet Management - Track your crypto holdings and balances
  • Transaction History - Complete record of all trading activities
  • Real-time Charts - Interactive price charts using Chart.js

๐Ÿ“Š Market Data

  • Live Price Updates - Real-time cryptocurrency prices
  • Market Cap Information - Comprehensive market data
  • Price Alerts - Stay informed about price movements
  • Historical Data - Track price performance over time

๐Ÿ” Security & Authentication

  • JWT Authentication - Secure user authentication
  • User Profiles - Manage personal information and preferences
  • Secure Transactions - Protected trading operations

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React 18 - Modern React with hooks and functional components
  • TypeScript - Type-safe JavaScript development
  • Vite - Fast build tool and development server
  • Tailwind CSS - Utility-first CSS framework
  • React Router - Client-side routing
  • Zustand - Lightweight state management
  • SWR - Data fetching and caching
  • Chart.js - Interactive charts and graphs
  • React Hook Form - Form handling and validation
  • React Hot Toast - User notifications
  • Axios - HTTP client for API requests

Backend

  • Django 4.x - Python web framework
  • Django REST Framework - API development
  • Django JWT - JSON Web Token authentication
  • Django Jalali - Persian calendar support
  • SQLite - Database (can be easily migrated to PostgreSQL/MySQL)
  • Pipenv - Python dependency management

Development Tools

  • ESLint - Code linting
  • Jest - Testing framework
  • TypeScript - Type checking
  • PostCSS - CSS processing

๐Ÿ“ Project Structure

CryptoCurrency/
โ”œโ”€โ”€ frontend/                 # React TypeScript frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ api/             # API integration
โ”‚   โ”‚   โ”œโ”€โ”€ assets/          # Static assets
โ”‚   โ”‚   โ”œโ”€โ”€ components/      # Reusable components
โ”‚   โ”‚   โ”œโ”€โ”€ config/          # Configuration files
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/           # Custom React hooks
โ”‚   โ”‚   โ”œโ”€โ”€ layout/          # Layout components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/           # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ routes/          # Routing configuration
โ”‚   โ”‚   โ”œโ”€โ”€ store/           # State management
โ”‚   โ”‚   โ”œโ”€โ”€ utils/           # Utility functions
โ”‚   โ”‚   โ””โ”€โ”€ __test__/        # Test files
โ”‚   โ”œโ”€โ”€ public/              # Public assets
โ”‚   โ””โ”€โ”€ package.json         # Frontend dependencies
โ”œโ”€โ”€ backend/                 # Django REST API
โ”‚   โ”œโ”€โ”€ apps/
โ”‚   โ”‚   โ”œโ”€โ”€ users/           # User management app
โ”‚   โ”‚   โ””โ”€โ”€ transactions/    # Trading functionality
โ”‚   โ”œโ”€โ”€ core/                # Django settings
โ”‚   โ”œโ”€โ”€ manage.py            # Django management
โ”‚   โ””โ”€โ”€ Pipfile              # Python dependencies
โ””โ”€โ”€ README.md               # This file

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • Python (3.12)
  • npm or yarn
  • pipenv

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install Python dependencies:

    pip install pipenv
    pipenv install --dev
  3. Activate the virtual environment:

    pipenv shell
  4. Run database migrations:

    pipenv run python manage.py migrate
  5. Create a superuser (optional):

    pipenv run python manage.py createsuperuser
  6. Start the Django development server:

    pipenv run python manage.py runserver

    The backend API will be available at http://localhost:8000

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install Node.js dependencies:

    npm install
  3. Start the development server:

    npm run dev

    The frontend application will be available at http://localhost:5173

๐Ÿ“š API Endpoints

Authentication

  • POST /api/auth/login/ - User login
  • POST /api/auth/register/ - User registration
  • POST /api/auth/refresh/ - Refresh JWT token

User Management

  • GET /api/users/profile/ - Get user profile
  • PUT /api/users/profile/ - Update user profile

Wallet & Transactions

  • GET /api/wallet/ - Get user wallet
  • POST /api/transactions/buy/ - Buy cryptocurrency
  • POST /api/transactions/sell/ - Sell cryptocurrency
  • POST /api/transactions/exchange/ - Exchange cryptocurrencies
  • GET /api/transactions/history/ - Get transaction history

Cryptocurrency Data

  • GET /api/cryptocurrencies/ - Get available cryptocurrencies
  • GET /api/prices/ - Get real-time prices

๐Ÿงช Testing

Frontend Testing

cd frontend
npm test

Backend Testing

cd backend
pipenv run python manage.py test

๐Ÿ—๏ธ Building for Production

Frontend Build

cd frontend
npm run build

Backend Deployment

The Django backend can be deployed using:

  • Docker (recommended)
  • Heroku
  • AWS
  • DigitalOcean

๐Ÿ”ง Configuration

Environment Variables

Create a .env file in the backend directory:

SECRET_KEY=your-secret-key
DEBUG=False
ALLOWED_HOSTS=your-domain.com
DATABASE_URL=your-database-url

Frontend Configuration

Update API endpoints in frontend/src/config/api.ts for production deployment.

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Contact the development team

๐Ÿ”ฎ Roadmap

  • Mobile app development
  • Advanced trading features (stop-loss, limit orders)
  • Social trading features
  • Multi-language support
  • Dark mode theme
  • Advanced analytics and reporting
  • Integration with more exchanges
  • DeFi protocol integration

Built with โค๏ธ using React, TypeScript, and Django

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published