π View Live Demo
- Overview
- Features
- Tech Stack
- Authentication
- Machine Learning
- Installation
- Environment Variables
- Deployment
- API Endpoints
- Screenshots
- Contributing
- License
CryptoX is a full-stack cryptocurrency trading platform that combines real-time market data, advanced machine learning predictions, and secure user authentication. Built with modern React and TypeScript, it provides traders with comprehensive tools for cryptocurrency analysis and portfolio management.
- π Enterprise-grade authentication with Clerk
- π Real-time cryptocurrency prices and market data
- π€ AI-powered price predictions using machine learning models
- π Advanced trading analytics and portfolio tracking
- π Responsive design for all devices
- β‘ Lightning-fast performance with Vite
- π Beautiful UI/UX with Tailwind CSS and shadcn/ui
- Secure Sign Up/Sign In with email verification
- Social Authentication (Google OAuth integration)
- Protected Routes for authenticated users only
- User Profile Management with avatar and settings
- Session Management with automatic token refresh
- Password Reset functionality
Crypto-X leverages multiple machine learning approaches for cryptocurrency analytics and prediction:
| Purpose | Model Types Used |
|---|---|
| Price Prediction | Random Forest, Gradient Boosting, Linear Regression, LSTM Neural Net |
| Market Sentiment | Random Forest, Custom Sentiment Analyzer |
| Trading Signals | Random Forest, LSTM (details vary by implementation) |
Model Details:
- Random Forest Regressor: Used for time series price prediction and sentiment analysis.
- Gradient Boosting Regressor: Available as an alternative for price prediction.
- Linear Regression: Serves as a simple baseline.
- LSTM Neural Network: Deep learning approach for advanced time series forecasting.
- Custom Sentiment Analyzer: Combines news and social data for market sentiment scoring.
See ml-service/models/simple_ml_model.py, ml-service/models/market_sentiment_model.py, and the AI Models section for architecture details.
- Live Cryptocurrency Prices for major coins (BTC, ETH, ADA, SOL, MATIC)
- 24h Price Changes with percentage indicators
- Market Volume and market cap tracking
- Price Charts with interactive visualizations
- Historical Data analysis and trends
- Price Prediction Models using LSTM neural networks
- Market Sentiment Analysis for informed decision making
- Trading Signal Generation (Buy/Hold/Sell recommendations)
- Technical Analysis with multiple indicators
- Risk Assessment algorithms
- Portfolio Overview with performance metrics
- Spending Analytics with monthly tracking
- Market Activity monitoring
- Personalized Recommendations based on user behavior
- Real-time Notifications for price alerts
- Latest News from reliable cryptocurrency sources
- Market Analysis articles and insights
- Price Impact correlation with news events
- Categorized Content (Bitcoin, Ethereum, DeFi, etc.)
- βοΈ React 18.3.1 - Modern UI library
- π TypeScript 5.8.3 - Type-safe development
- β‘ Vite 5.4.19 - Lightning-fast build tool
- π¨ Tailwind CSS - Utility-first styling
- π shadcn/ui - Beautiful component library
- π§© Radix UI - Accessible component primitives
- π Recharts - Interactive chart library
- π React Query - Data fetching and caching
- π£οΈ React Router DOM - Client-side routing
- π Python Flask - ML model API server
- π€ scikit-learn - Machine learning models
- π pandas & numpy - Data processing
- π Clerk - Authentication and user management
- βοΈ Vercel - Deployment and hosting
- π¦ npm/Node.js - Package management
- π§ ESLint - Code linting
- π― TypeScript - Type checking
- π¨ PostCSS - CSS processing
- π± Mobile-first responsive design
CryptoX uses Clerk for enterprise-grade authentication:
// Protected route example
<ProtectedRoute>
<Dashboard />
</ProtectedRoute>
// User profile access
const { user, isSignedIn } = useUser();Authentication Features:
- β Email/Password authentication
- β Google OAuth integration
- β Email verification
- β Password reset
- β Session management
- β User profile management
# LSTM Neural Network for price prediction
class CryptoPriceLSTM:
def __init__(self, sequence_length=60):
self.model = Sequential([
LSTM(50, return_sequences=True),
LSTM(50, return_sequences=True),
LSTM(50),
Dense(25),
Dense(1)
])# Sentiment analysis for market trends
def analyze_market_sentiment(news_data, social_data):
sentiment_score = sentiment_analyzer.predict(combined_data)
return {"sentiment": sentiment_score, "confidence": confidence_level}# Technical analysis for trading signals
def generate_trading_signals(price_data, volume_data):
signals = technical_analyzer.analyze(price_data, volume_data)
return {"signal": "BUY/HOLD/SELL", "strength": confidence}ML Features:
- π§ LSTM Neural Networks for price prediction
- π Sentiment Analysis using NLP
- π Technical Indicators (RSI, MACD, Bollinger Bands)
- π― Trading Signals with confidence scores
- π Risk Assessment algorithms
- Node.js 18+
- Python 3.8+ (for ML service)
- Git
# Clone the repository
git clone https://github.com/shr8769/Crypto-X.git
cd Crypto-X
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Add your Clerk keys to .env
# Start development server
npm run dev# Navigate to ML service
cd ml-service
# Create virtual environment
python -m venv ml_env
source ml_env/bin/activate # On Windows: ml_env\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Train models
python train_all_models.py
# Start ML API server
python api_server.pyCreate a .env file in the root directory:
# Clerk Authentication
VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_key_here
CLERK_SECRET_KEY=sk_test_your_secret_key_here
# Optional: Custom URLs
VITE_CLERK_SIGN_IN_URL=/sign-in
VITE_CLERK_SIGN_UP_URL=/sign-up
VITE_CLERK_AFTER_SIGN_IN_URL=/dashboard
VITE_CLERK_AFTER_SIGN_UP_URL=/dashboardGetting Clerk Keys:
- Go to dashboard.clerk.com
- Create a new application
- Copy your publishable key and secret key
- Add them to your
.envfile
# Build the project
npm run build
# Deploy to Vercel
npx vercel --prod
# Or use Vercel dashboard:
# 1. Connect your GitHub repository
# 2. Add environment variables
# 3. Deploy automatically- Netlify: Drag and drop
distfolder - GitHub Pages: Static site deployment
- AWS S3: Static website hosting
- Docker: Containerized deployment
# Health check
GET /health
# Get price prediction
POST /predict
{
"symbol": "BTC",
"days": 7
}
# Get trading signals
POST /signals
{
"symbol": "ETH",
"timeframe": "1h"
}
# Market sentiment
GET /sentiment/{symbol}- CoinGecko API: Real-time cryptocurrency data
- News APIs: Latest crypto news and analysis
- Technical Analysis APIs: Chart data and indicators
Crypto-X/
βββ src/
β βββ components/ # Reusable UI components
β β βββ ui/ # shadcn/ui components
β β βββ AuthModal.tsx # Authentication modal
β β βββ CryptoTicker.tsx # Price ticker
β β βββ Dashboard.tsx # Main dashboard
β β βββ Navigation.tsx # Navigation bar
β βββ contexts/ # React contexts
β β βββ AuthContext.tsx # Authentication context
β βββ hooks/ # Custom React hooks
β β βββ useCryptoPrices.ts
β β βββ useMLService.ts
β β βββ useScrollToSection.ts
β βββ pages/ # Route components
β β βββ Auth.tsx # Authentication page
β β βββ Dashboard.tsx # User dashboard
β β βββ Index.tsx # Homepage
β βββ services/ # API services
β β βββ aiPrediction.ts
β βββ types/ # TypeScript type definitions
βββ ml-service/ # Python ML backend
β βββ models/ # Trained ML models
β βββ data/ # Historical crypto data
β βββ api_server.py # Flask API server
β βββ train_models.py # Model training scripts
βββ public/ # Static assets
βββ docs/ # Documentation
Contributions are welcome! Here's how you can help:
- Use the issue template
- Provide detailed reproduction steps
- Include screenshots if applicable
- Check existing issues first
- Provide clear use cases
- Explain the expected behavior
# Fork the repository
# Create a feature branch
git checkout -b feature/amazing-feature
# Make your changes
git commit -m "Add amazing feature"
# Push to the branch
git push origin feature/amazing-feature
# Open a Pull RequestThis project is licensed under the MIT License - see the LICENSE file for details.
- π Live Demo: CryptoX Platform
- π§ Email: Contact via GitHub
- πΌ Portfolio: GitHub Profile
- Clerk for authentication services
- Vercel for hosting and deployment
- CoinGecko for cryptocurrency data
- shadcn/ui for beautiful components
- React Team for the amazing framework
- Open Source Community for inspiration and tools
If you found this project helpful, please consider:
- β Starring the repository
- π΄ Forking for your own projects
- π Reporting issues and bugs
- π‘ Suggesting new features
- π’ Sharing with others
π Launch CryptoX Platform π
Built with β€οΈ by shr8769