Skip to content

audrbar/cryptoapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿช™ Cryptoverse - Cryptocurrency Tracking Application

A modern, feature-rich cryptocurrency tracking application built with React that provides real-time cryptocurrency data, market statistics, detailed coin information, exchange listings, and the latest crypto news.

Version React License

โœจ Features

๐Ÿ  Homepage

  • Global Crypto Statistics: View comprehensive market stats including total cryptocurrencies, exchanges, market cap, and 24h trading volume
  • Top 10 Cryptocurrencies: Quick overview of the top-performing cryptocurrencies
  • Latest News Feed: Stay updated with the most recent cryptocurrency news

๐Ÿ’ฐ Cryptocurrencies

  • Browse up to 100 cryptocurrencies with real-time data
  • Search Functionality: Quickly find specific cryptocurrencies by name
  • Display key metrics:
    • Current price
    • 24h price change percentage
    • Market capitalization
    • Rank
  • Interactive cards with cryptocurrency logos and symbols

๐Ÿ“Š Detailed Coin Information

  • Comprehensive cryptocurrency details including:
    • Current price and market statistics
    • All-time high prices
    • Supply information (circulating, total)
    • Number of markets and exchanges
    • Historical price data
  • Interactive Line Charts: Visualize price history across multiple timeframes:
    • 24 hours
    • 7 days
    • 30 days
    • 1 year
    • 5 years
  • Social links and official websites
  • Detailed descriptions and key information

๐Ÿ“ฐ Crypto News

  • Latest cryptocurrency news from multiple sources
  • Article cards with:
    • Thumbnails
    • Publication date
    • Source information
    • Direct links to full articles
  • Filter news by specific cryptocurrencies

๐Ÿข Exchanges

  • Comprehensive list of cryptocurrency exchanges
  • Exchange information and rankings

๐Ÿ› ๏ธ Technology Stack

Frontend Framework

  • React 18.3.1: Modern React with hooks
  • React Router DOM 6.30.2: Client-side routing
  • React Redux 9.2.0: State management
  • Redux Toolkit 2.11.2: Efficient Redux development

UI Components & Styling

  • Ant Design (antd) 5.23.4: Professional UI component library
  • Ant Design Icons 5.5.2: Icon system
  • Custom CSS: Additional styling

Data Visualization

  • Chart.js 4.5.1: Powerful charting library
  • React-Chartjs-2 5.3.1: React wrapper for Chart.js
  • chartjs-adapter-moment 1.0.1: Time scale support
  • Moment.js 2.30.1: Date and time formatting

Utilities

  • Axios 1.13.2: HTTP client for API requests
  • Millify 6.1.0: Number formatting (e.g., 1M, 1B)
  • html-react-parser 5.2.11: HTML string parsing

APIs

  • CoinGecko API v3: Free cryptocurrency data (no API key required)
  • CryptoCompare API: Cryptocurrency news feed

๐Ÿ“ Project Structure

cryptoapp/
โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ index.html                 # HTML template
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ App.js                     # Main application component
โ”‚   โ”œโ”€โ”€ App.css                    # Global styles
โ”‚   โ”œโ”€โ”€ index.js                   # Application entry point
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ””โ”€โ”€ store.js               # Redux store configuration
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.jsx             # Navigation component
โ”‚   โ”‚   โ”œโ”€โ”€ Homepage.jsx           # Homepage with stats
โ”‚   โ”‚   โ”œโ”€โ”€ Cryptocurrencies.jsx   # Crypto list with search
โ”‚   โ”‚   โ”œโ”€โ”€ CryptoDetails.jsx      # Detailed coin information
โ”‚   โ”‚   โ”œโ”€โ”€ LineChart.jsx          # Price chart component
โ”‚   โ”‚   โ”œโ”€โ”€ Exchanges.jsx          # Exchange listings
โ”‚   โ”‚   โ”œโ”€โ”€ News.jsx               # News feed component
โ”‚   โ”‚   โ”œโ”€โ”€ Loader.jsx             # Loading component
โ”‚   โ”‚   โ””โ”€โ”€ index.js               # Component exports
โ”‚   โ””โ”€โ”€ services/
โ”‚       โ”œโ”€โ”€ cryptoApi.js           # CoinGecko API integration
โ”‚       โ””โ”€โ”€ cryptoNewsApi.js       # CryptoCompare news API
โ”œโ”€โ”€ build/                         # Production build (generated)
โ”œโ”€โ”€ package.json                   # Dependencies and scripts
โ””โ”€โ”€ README.md                      # This file

๐Ÿš€ Getting Started

Prerequisites

Before running this application, make sure you have:

  • Node.js (version 14 or higher)
  • npm (comes with Node.js)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd cryptoapp
  2. Install dependencies

    npm install
  3. Start the development server

    npm start

    The application will open automatically in your browser at http://localhost:3000

Available Scripts

npm start

Runs the app in development mode with hot reloading.

  • Open http://localhost:3000 to view it in your browser
  • The page reloads automatically when you make changes
  • Lint errors appear in the console

npm test

Launches the test runner in interactive watch mode.

npm run build

Builds the app for production to the build folder:

  • Optimizes React for best performance
  • Minifies code and includes hashes in filenames
  • Ready for deployment

npm run eject

โš ๏ธ Warning: This is a one-way operation!

Ejects from Create React App, giving you full control over webpack, Babel, and ESLint configurations.

๐Ÿ”Œ API Integration

CoinGecko API

The application uses the free CoinGecko API v3 for cryptocurrency data:

  • Base URL: https://api.coingecko.com/api/v3
  • No API key required
  • Provides:
    • Cryptocurrency prices and market data
    • Historical price data
    • Coin details and statistics
    • Market rankings

CryptoCompare API

Used for cryptocurrency news:

  • Base URL: https://min-api.cryptocompare.com/data/v2
  • No API key required
  • Provides latest news articles from various sources

๐ŸŽจ Key Components

Homepage Component

  • Displays global statistics
  • Shows top 10 cryptocurrencies
  • Presents latest news
  • Uses useGetCryptosQuery RTK Query hook for data fetching

Cryptocurrencies Component

  • Lists cryptocurrencies with pagination
  • Real-time search filtering
  • Responsive card layout
  • Links to detailed coin pages

CryptoDetails Component

  • Comprehensive coin information
  • Interactive price charts with multiple timeframes
  • Supply and market statistics
  • Links to exchanges and resources

LineChart Component

  • Built with Chart.js and React-Chartjs-2
  • Responsive design
  • Multiple timeframe support
  • Formatted axes with price and time data

News Component

  • Displays latest crypto news
  • Filter by cryptocurrency
  • Article cards with images
  • External links to full articles

๐ŸŽฏ Features Highlight

Redux Toolkit Query (RTK Query)

Efficient data fetching and caching:

  • Automatic re-fetching
  • Built-in loading and error states
  • Optimistic updates
  • Cache management

Responsive Design

  • Mobile-first approach
  • Ant Design's responsive grid system
  • Adaptive layouts for all screen sizes

State Management

  • Redux Toolkit for global state
  • RTK Query for server state
  • React hooks for local state

๐Ÿ“ฆ Build and Deployment

Building for Production

npm run build

This creates an optimized production build in the build folder:

  • Minified and optimized code
  • Static files ready for deployment
  • Performance optimizations applied

Deployment Options

The build folder can be deployed to:

  • Vercel: Zero-config deployment for React apps
  • Netlify: Drag-and-drop or Git-based deployment
  • GitHub Pages: Free hosting for static sites
  • AWS S3: Cloud storage with CloudFront CDN
  • Firebase Hosting: Google's hosting solution

๐Ÿ”ง Configuration

Environment Variables (Optional)

Create a .env file in the root directory for custom configuration:

REACT_APP_API_URL=https://api.coingecko.com/api/v3
REACT_APP_NEWS_API_URL=https://min-api.cryptocompare.com/data/v2

๐Ÿค Contributing

Contributions are welcome! To contribute:

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

๐Ÿ“ License

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

๐Ÿ™ Acknowledgments

  • CoinGecko for providing free cryptocurrency data API
  • CryptoCompare for the news API
  • Ant Design for the beautiful UI components
  • Chart.js for powerful data visualization
  • Create React App for the build configuration

๐Ÿ“ง Contact & Support

For questions, issues, or suggestions:

  • Open an issue on GitHub
  • Check existing issues before creating new ones

๐Ÿ”ฎ Future Enhancements

Potential features for future versions:

  • Portfolio tracking
  • Price alerts and notifications
  • User authentication
  • Favorite cryptocurrencies
  • Advanced filtering and sorting
  • Dark/light theme toggle
  • Multi-currency support
  • Historical data comparison
  • Mobile app version
  • Real-time WebSocket price updates

About

A Single Page Crypto App build on React, hosted on Netlify

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published