Skip to content

danilobatson/crypto-alert-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Crypto Alert System

A production-ready cryptocurrency alert system with real-time price monitoring, browser notifications, and professional UI. Built with React + LunarCrush API for modern portfolio demonstration.

React Vite Mantine LunarCrush Live Demo

🎯 Portfolio Highlights

Perfect for demonstrating modern frontend and real-time system skills:

  • πŸ”” Real-Time Alerts: Browser notifications with 11 alert types
  • πŸ“Š Live Crypto Data: Bitcoin and Ethereum market metrics via LunarCrush API
  • 🎨 Professional UI: Mantine 8.2.1 with glassmorphism design and dark theme
  • πŸ“± Mobile-First: Responsive design optimized for all devices
  • ⚑ Performance: Zustand + React Query for optimal state management
  • πŸ—οΈ Production-Ready: Professional dependency management and error handling

πŸš€ Live Demo

Try it now: Crypto Alert System

Features to test:

  • View live Bitcoin and Ethereum metrics
  • Create price alerts with browser notifications
  • Experience professional glassmorphism UI
  • Test mobile responsive design

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Modern hooks and concurrent features
  • Vite 5 - Lightning-fast development and optimized builds
  • Mantine 8.2.1 - Professional component library with consistent theming
  • Zustand 4.4.7 - Lightweight state management with persistence

Data & APIs

  • LunarCrush API - Real-time cryptocurrency and social sentiment data
  • React Query 5 - Smart data fetching with caching and background updates
  • Cloudflare Workers - Serverless backend with global edge deployment

UI & UX

  • Tabler Icons - Comprehensive icon system
  • Recharts - Professional data visualization
  • Browser Notifications - Native OS integration
  • Glassmorphism - Modern backdrop blur effects

🎯 Key Features

πŸ”₯ Real-Time Price Monitoring

  • Live Bitcoin, Ethereum, and cryptocurrency prices
  • 30-second polling with pause/resume functionality
  • Connection status monitoring with automatic reconnection

🚨 Smart Alert System

  • 11 Alert Types: Price thresholds, volume spikes, sentiment changes
  • Browser Notifications: Native OS notifications with sound
  • Persistent Storage: Alerts survive browser restarts
  • Real-time Monitoring: Continuous price comparison with smart triggering

πŸ“Š Professional Dashboard

  • Live Price Cards: Bitcoin and Ethereum with 24h changes
  • Market Metrics: Volume, market cap, percentage changes
  • Alert Management: Create, view, disable, and delete alerts
  • Error Recovery: Production-ready error boundaries and user feedback

🎨 Modern User Experience

  • Glassmorphism Design: Backdrop blur effects and gradient backgrounds
  • Dark Theme: Cohesive professional dark mode throughout
  • Mobile Responsive: Touch-optimized for all device sizes
  • Smooth Animations: Loading states, transitions, and micro-interactions

πŸ—οΈ Architecture

β”Œβ”€ Frontend (React + Vite) ───┐    β”Œβ”€ Real-Time Data ─┐
β”‚                             β”‚    β”‚                  β”‚
β”‚  HeroSection                │◄──►│  LunarCrush API  β”‚
β”‚  β”œβ”€ Live Bitcoin Price     β”‚    β”‚  Crypto Data     β”‚
β”‚  β”œβ”€ Ethereum Updates       β”‚    β”‚                  β”‚
β”‚  └─ Alert Counter          β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚                             β”‚              β–²
β”‚  DashboardGrid             β”‚              β”‚
β”‚  β”œβ”€ Crypto Cards           β”‚              β”‚
β”‚  β”œβ”€ Real-time Updates      β”‚              β”‚
β”‚  └─ Connection Status      β”‚              β”‚
β”‚                             β”‚              β”‚
β”‚  AlertModal                β”‚              β”‚
β”‚  β”œβ”€ 11 Alert Types         β”‚              β”‚
β”‚  β”œβ”€ Notification Setup     β”‚              β”‚
β”‚  └─ Persistent Storage     β”‚              β”‚
β”‚                             β”‚              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
              β”‚                              β”‚
              β–Ό                              β”‚
β”Œβ”€ State Management (Zustand) ┐              β”‚
β”‚                             β”‚              β”‚
β”‚  useCryptoStore             β”‚β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚  β”œβ”€ Real-time Data         β”‚
β”‚  β”œβ”€ Connection Status      β”‚
β”‚  └─ Error Handling         β”‚
β”‚                             β”‚
β”‚  useAlertStore             β”‚
β”‚  β”œβ”€ Alert Management       β”‚
β”‚  β”œβ”€ Browser Notifications  β”‚
β”‚  └─ Local Storage          β”‚
β”‚                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Modern browser with notification support
  • Basic React knowledge

Installation

# Clone the repository
git clone https://github.com/danilobatson/crypto-alert-system.git
cd crypto-alert-system

# Install dependencies
npm install

# Start development server
npm run dev

# Open browser
open http://localhost:3000

Environment Variables

# .env.local (Demo configuration included)
VITE_API_BASE_URL=https://cryptoguard-api.cryptoguard-api.workers.dev
VITE_API_KEY=demo_tutorial_001
VITE_MODE=production

Production Build

# Build for production
npm run build

# Preview production build
npm run preview

πŸ“ Project Structure

crypto-alert-system/
β”œβ”€β”€ πŸ“„ README.md
β”œβ”€β”€ πŸ“¦ package.json
β”œβ”€β”€ βš™οΈ vite.config.js
β”œβ”€β”€ πŸ” .env.local
β”‚
β”œβ”€β”€ πŸ“ src/
β”‚   β”œβ”€β”€ 🏠 App.jsx                  # Main application component
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“ components/
β”‚   β”‚   β”œβ”€β”€ πŸ“ layout/
β”‚   β”‚   β”‚   β”œβ”€β”€ 🎯 HeroSection.jsx  # Professional hero with live prices
β”‚   β”‚   β”‚   └── 🦢 Footer.jsx       # App footer with credits
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“ dashboard/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“Š DashboardGrid.jsx # Main crypto dashboard
β”‚   β”‚   β”‚   └── πŸ’° CryptoCard.jsx    # Individual crypto price cards
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“ alerts/
β”‚   β”‚   β”‚   β”œβ”€β”€ 🚨 AlertModal.jsx    # Alert creation modal
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‹ AlertsList.jsx    # Alert management interface
β”‚   β”‚   β”‚   └── πŸ”” AlertForm.jsx     # Alert configuration form
β”‚   β”‚   β”‚
β”‚   β”‚   └── πŸ“ ui/
β”‚   β”‚       β”œβ”€β”€ πŸ“’ NotificationBanner.jsx
β”‚   β”‚       └── πŸ›‘οΈ ErrorBoundary.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“ stores/
β”‚   β”‚   β”œβ”€β”€ πŸ’Ž useCryptoStore.js     # Cryptocurrency data state
β”‚   β”‚   └── 🚨 useAlertStore.js      # Alert system state
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“ hooks/
β”‚   β”‚   β”œβ”€β”€ πŸ“Š useCryptoData.js      # Real-time data fetching
β”‚   β”‚   β”œβ”€β”€ πŸ”” useNotifications.js   # Browser notification handling
β”‚   β”‚   └── ⚑ useAlertInitialization.js # Alert persistence
β”‚   β”‚
β”‚   └── πŸ“ api/
β”‚       └── 🌐 cryptoApi.js          # LunarCrush API integration
β”‚
└── πŸ“ public/
    β”œβ”€β”€ πŸ–ΌοΈ favicon.ico
    └── πŸ“‹ index.html

🎨 Features Showcase

Real-Time Alert Creation

// Alert configuration with 11 types
const alertTypes = {
  'price_above': 'Price Above Threshold',
  'price_below': 'Price Below Threshold',
  'volume_spike': 'Volume Spike Alert',
  'sentiment_high': 'Positive Sentiment',
  'sentiment_low': 'Negative Sentiment',
  'galaxy_score': 'Galaxy Score Alert',
  'altrank_rising': 'AltRank Rising',
  'market_cap': 'Market Cap Threshold',
  'social_volume': 'Social Volume Spike',
  'price_change': 'Price Change Alert',
  'custom': 'Custom Conditions'
};

Browser Notification Integration

// Native browser notification system
const triggerNotification = (alert, currentPrice) => {
  if (Notification.permission === 'granted') {
    new Notification(`🚨 ${alert.title}`, {
      body: `${alert.symbol.toUpperCase()} hit $${currentPrice.toLocaleString()}`,
      icon: '/favicon.ico',
      tag: `alert-${alert.id}`
    });
  }
};

Real-Time Data Management

// Zustand store with React Query integration
const useCryptoStore = create((set, get) => ({
  cryptoData: {},
  isPolling: true,
  connectionStatus: 'connected',

  updateCryptoData: (data) => set(state => ({
    cryptoData: { ...state.cryptoData, ...data }
  })),

  togglePolling: () => set(state => ({
    isPolling: !state.isPolling
  }))
}));

πŸš€ Deployment

Cloudflare Pages (Current)

# Already deployed at:
# https://crypto-alert-system.pages.dev/

# Deployment configuration:
Framework: Vite
Build command: npm run build
Output directory: dist
Node.js version: 18

Environment Variables for Production

VITE_API_BASE_URL=https://cryptoguard-api.cryptoguard-api.workers.dev
VITE_API_KEY=demo_tutorial_001
VITE_MODE=production

Alternative Deployment Options

  • Vercel: One-click deployment with GitHub integration
  • Netlify: Drag-and-drop build folder deployment
  • Railway: Full-stack deployment with environment variables

πŸ’Ό Portfolio Value

Technical Achievements

  • βœ… Real-Time Systems: 30-second polling with connection management
  • βœ… State Management: Complex Zustand + React Query architecture
  • βœ… Browser APIs: Native notification integration with permission handling
  • βœ… Error Recovery: Production-ready error boundaries and user feedback
  • βœ… Responsive Design: Mobile-first approach with glassmorphism effects
  • βœ… Dependency Management: Professional Mantine 8.2.1 upgrade and resolution

Business Value

  • 🎯 Real-World Application: Solves actual cryptocurrency monitoring needs
  • πŸ“Š Financial Data: Integration with live market data and social sentiment
  • πŸ”” User Engagement: Browser notifications increase user retention
  • πŸ“± Mobile Experience: Touch-optimized for mobile crypto traders
  • ⚑ Performance: Optimized bundle size and loading times

Interview Talking Points

  • Real-time Data: Implemented polling strategy with pause/resume functionality
  • State Management: Chose Zustand over Redux for performance and simplicity
  • Error Handling: Comprehensive error boundaries with user-friendly recovery
  • Performance: Bundle optimization and efficient re-rendering strategies
  • User Experience: Progressive enhancement with notification permissions

πŸ§ͺ Testing

Manual Testing Checklist

# Live Demo Testing
βœ… Visit: https://crypto-alert-system.pages.dev/
βœ… Verify Bitcoin price shows ~$119,000+
βœ… Create a price alert above current price
βœ… Enable browser notifications
βœ… Test mobile responsive design
βœ… Verify connection status indicator
βœ… Test auto-refresh toggle functionality

Development Testing

# Local development testing
npm run dev

# Production build testing
npm run build
npm run preview

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  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

Danilo Jamaal - Software Engineer πŸ“§ djbatson19@gmail.com πŸ”— LinkedIn 🌐 Portfolio


⭐ Star this repo if you found it helpful!

GitHub stars

πŸš€ Ready to build your own? Fork this repository and deploy to Cloudflare Pages in minutes!

About

Production-ready cryptocurrency alert system with real-time price monitoring, browser notifications, and professional UI. Built with React 18, Mantine 8.2.1, Zustand, and LunarCrush API. Features 11 alert types, glassmorphism design, mobile-first responsive layout, and live deployment on Cloudflare Pages.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors