Welcome to the CryptoTracker frontend! This is a modern cryptocurrency dashboard built with React, TypeScript, Vite, and Tailwind CSS.
- ✨ Features
- 🛠️ Tech Stack
- 🚦 Getting Started
- 📦 Available Scripts
- 🌳 Project Structure
- 🔌 API Integration
- 📝 Linting
- 📄 License
- 💸 Live cryptocurrency prices for Bitcoin, Monero, and Toncoin
- 🌗 Light/Dark theme toggle
- 📊 Interactive charts (Chart.js)
- 💶 European-style price formatting
- 📈 Market overview statistics
- 📱 Responsive design for all devices
- ⚛️ React 18 + TypeScript
- ⚡ Vite (fast dev/build)
- 🎨 Tailwind CSS (utility-first styling)
- 📉 Chart.js & react-chartjs-2
- 🖼️ Lucide React (icons)
# Clone the repository
git clone https://github.com/yourusername/cryptotracker.git
cd cryptotracker/frontend
# Install dependencies
npm installnpm run devOpen http://localhost:5173 in your browser.
npm run buildnpm run previewnpm run dev— Start development servernpm run build— Build for productionnpm run preview— Preview production buildnpm run lint— Check code for errors
frontend/
├── src/
│ ├── App.tsx
│ ├── main.tsx
│ ├── index.css
│ └── components/
│ ├── CryptoCard.tsx
│ ├── CryptoChart.tsx
│ ├── ThemeToggle.tsx
│ ├── fetchprices.tsx
│ ├── fetchchange.tsx
│ └── fetchchart.tsx
├── index.html
├── tailwind.config.js
├── postcss.config.js
├── vite.config.ts
├── tsconfig.json
├── package.json
└── README.md
- src/ — main source code
- components/ — reusable UI parts
- index.css — global styles
- vite.config.ts — Vite configuration
The frontend fetches cryptocurrency data from the backend API (see /backend).
By default, it expects the backend to be running at http://localhost:5174.
Endpoints used:
GET /bitcoin,/monero,/toncoin— current pricesGET /bitcoin/change,/monero/change,/toncoin/change— 24h price changesGET /bitcoin/chart,/monero/chart,/toncoin/chart— chart data
You can change the backend URL in the fetch functions if needed.
npm run lintMIT