DevPrep
  • Interview Prep
  • Projects
  • Resources
  • Pricing
  • About Us
Submit Question
DevPrep
  • Pricing
  • About Us
Submit Question
← From Beginner to Expert in Fundamentals of Frontend
  • Project 1: The Performance-First Dashboard
  • Project 2: Accessible Video Player
  • Project 3: Markdown Blog Engine
  • Project 4: Browser-Based Code Editor
  • Project 5: Multi-Tab Whiteboard
  • Project 6: Infinite Scroll Image Gallery
  • Project 7: Recipe Optimizer & Converter
  • Project 8: Budget Tracker with Charts
  • Project 9: Typing Speed Test
  • Project 10: Weather App with Time-Travel
  • Project 11: CSS Grid Layout Builder
  • Project 12: Password Vault (Frontend Only)
  • Project 13: Kanban Board (Trello Clone)
  • Project 14: Quiz App with Leaderboard
  • Project 15: Habit Tracker (GitHub Style)
  • Project 16: E-commerce Product Page
  • Project 17: Unit Converter (Expert Mode)
  • Project 18: Music Visualizer
  • Project 19: Flashcard Learning App
  • Project 20: Custom Form Validator
  • Project 21: Virtual Terminal
  • Project 22: Pomodoro Timer (Focus Pro)
  • Project 23: SVG Path Editor
  • Project 24: Movie Database Matchmaker
  • Project 25: Interactive Resume / Portfolio
  • Project 26: Recipe Scraper UI
  • Project 27: Crypto Tracker (Real-Time)
  • Project 28: Find My Pet (PWA)
  • Project 29: Markdown-to-Slide Tool
  • Project 30: Browser Health Dashboard
← From Beginner to Expert in Fundamentals of Frontend

Project 27: Crypto Tracker (Real-Time)

45 min read
WebSocketsReal-Time DataFlash AnimationsPortfolio MathPrice AlertsSparkline Charts

📋 Project Brief

Build a real-time cryptocurrency tracker using WebSocket connections for live price updates. Features include flash feedback on price changes, a portfolio calculator, price alerts, and sparkline mini-charts.

✅ Feature Requirements

Feature 1: WebSocket Integration

Acceptance Criteria:

  • Connect to a public crypto WebSocket (e.g., Binance, CoinCap)
  • Prices update in real-time without page refresh
  • Handle WebSocket disconnection with exponential backoff reconnection
  • Show connection status indicator (🟢 Connected / 🔴 Disconnected)

Feature 2: Flash Feedback

Acceptance Criteria:

  • When a price increases, the row briefly flashes green
  • When a price decreases, the row briefly flashes red
  • Flash duration: ~500ms with fade-out
  • Price change arrow: ▲ for up, ▼ for down

Feature 3: Portfolio Calculator

Acceptance Criteria:

  • Users input their holdings (e.g., "0.5 BTC, 10 ETH")
  • Total portfolio value updates in real-time with live prices
  • Show profit/loss based on a user-entered purchase price
  • Holdings persist in localStorage

Feature 4: Price Alerts

Acceptance Criteria:

  • Users set a target price for any coin (above or below current)
  • When the price crosses the threshold, trigger a browser notification + sound
  • Alert can be one-time or recurring
  • Active alerts listed in a sidebar panel

Feature 5: Sparkline Charts

Acceptance Criteria:

  • Each coin row has a mini line chart showing 24h price history
  • Charts are 80×30px, no axes or labels — just the trend line
  • Green line if price is up over 24h; red if down
  • Built with SVG <polyline> or Canvas

🧪 Testing Checklist

  • Unit test portfolio value calculation
  • Unit test price alert threshold logic
  • Unit test sparkline data point normalization
  • Integration test: WebSocket message updates the UI
  • Test reconnection logic after simulated disconnect

Practice

  • JavaScript
  • DSA
  • Machine Coding
  • System Design

Resources

  • Learning Tracks
  • Articles
  • Roadmaps
  • Compare Concepts
  • Glossary
  • Developer Tools
  • All Questions

Company

  • About
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service
DevPrep

© 2026 DevPrep. All rights reserved.