Skip to content

πŸ’« Real-time, accurate, and visually appealing crypto price tracker built with Nuxt 3.

License

Notifications You must be signed in to change notification settings

tcdtist/demo-crypto-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Crypto Chart Dashboard

A modern, responsive cryptocurrency price tracking dashboard built with Nuxt 3, featuring real-time price updates, interactive charts, and seamless currency conversion.

Crypto Chart Dashboard

Features

  • πŸ“ˆ Real-time cryptocurrency price tracking
  • 🎨 Modern UI with iPhone 15 Pro Max design
  • πŸŒ“ Light/Dark mode support
  • πŸ’± USD/VND currency conversion with live exchange rates
  • πŸ“Š Interactive charts with multiple timeframes
  • πŸ” Smart search with autocomplete
  • πŸ“± Mobile-first responsive design
  • πŸ”— Shareable URLs for specific cryptocurrencies

Tech Stack

Getting Started

Prerequisites

  • Node.js 20.x or higher
  • npm or yarn

Installation

  1. Clone the repository
git clone https://github.com/tcdtist/demo-crypto-chart.git
cd demo-crypto-chart
  1. Install dependencies
npm install
# or
yarn install
  1. Start development server
npm run dev
# or
yarn dev
  1. Build for production
npm run build
# or
yarn build

Environment Variables

Create a .env file in the root directory:

NUXT_PUBLIC_API_BASE_URL=https://benchmarks.pyth.network/v1
NUXT_PUBLIC_EXCHANGE_API_URL=https://api.exchangerate-api.com/v4/latest/USD

Project Structure

demo-crypto-chart/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   └── css/
β”‚   β”‚       └── main.css
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ CryptoChart.vue
β”‚   β”‚   β”œβ”€β”€ CurrencyToggle.vue
β”‚   β”‚   β”œβ”€β”€ SearchModal.vue
β”‚   β”‚   β”œβ”€β”€ ThemeToggle.vue
β”‚   β”‚   └── TimeRangeSelector.vue
β”‚   β”œβ”€β”€ composables/
β”‚   β”‚   β”œβ”€β”€ useApi.ts
β”‚   β”‚   └── useExchangeRate.ts
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   └── default.vue
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   └── index.vue
β”‚   β”œβ”€β”€ stores/
β”‚   β”‚   └── crypto.ts
β”‚   └── types/
β”‚       └── api.ts
β”œβ”€β”€ nuxt.config.ts
β”œβ”€β”€ tailwind.config.ts
β”œβ”€β”€ tsconfig.json
└── package.json

API Integration

Pyth Network API

The application uses Pyth Network's API for cryptocurrency price data:

  • Benchmark Data: /v1/shims/tradingview/history
  • Price Feeds: /v1/price_feeds

Exchange Rate API

Currency conversion is handled through the Exchange Rate API, providing real-time USD to VND conversion rates.

Features in Detail

Time Range Selection

Users can view price data across different timeframes:

  • 1 Day (1D)
  • 1 Month (1M)
  • 3 Months (3M)
  • 6 Months (6M)
  • 1 Year (1Y)

Currency Conversion

Supports two currencies:

  • USD (United States Dollar)
  • VND (Vietnamese Dong)

Live exchange rates are fetched and applied to all price displays.

Chart Features

  • Line chart with gradient fill
  • Interactive tooltip
  • Price indicators (High, Low, Volume)
  • Responsive design
  • Smooth animations

Search Functionality

  • Real-time search with debouncing
  • Autocomplete suggestions
  • Symbol and description search
  • URL sharing capability

Contributing

  1. Fork the repository
  2. Create your 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

Contact

Chi Thanh Dang (tist) - @tcdtist

Project Link: https://github.com/tcdtist/demo-crypto-chart


About

πŸ’« Real-time, accurate, and visually appealing crypto price tracker built with Nuxt 3.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published