Cursor Agent
Fix AI models pages and add monitoring system
426ef14
|
raw
history blame
4.24 kB

⚑ QUICK START - For AI Developer

🎯 WHAT YOU NEED TO DO

UPDATE an existing HuggingFace Space to add 30+ comprehensive API endpoints for cryptocurrency data.

⚠️ THIS IS AN UPDATE, NOT A NEW PROJECT!


πŸ“– READING ORDER (MANDATORY)

Read files in this EXACT ORDER:

1️⃣ HF_DEPLOYMENT_SUMMARY.md (5 min)

  • Quick overview
  • What we're building
  • Why we need it

2️⃣ SEND_TO_HF_TEAM.md (10 min)

  • Official request letter
  • Priorities and scope
  • Success criteria

3️⃣ DATA_ARCHITECTURE_ANALYSIS_REPORT.md (30 min)

  • Current architecture
  • Problems we're solving
  • Proposed solution

4️⃣ HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md (2-3 hours) ⭐ MAIN REFERENCE

  • Complete API specifications
  • All 30+ endpoint details
  • Request/Response formats
  • Python/FastAPI code
  • Data source integration
  • Caching, AI, WebSocket
  • Deployment config
  • Testing procedures

5️⃣ ENGINEERING_GUIDE.md (optional, 1 hour)

  • Coding standards
  • Best practices

πŸš€ IMPLEMENTATION ORDER

Phase 1: Setup

  • Access existing HF Space
  • Install Python 3.9+ and Redis
  • Install dependencies

Phase 2: Core API

  • Set up FastAPI
  • Add CORS, Redis
  • Create health check

Phase 3-9: Implement Endpoints

  • Market data (4 endpoints)
  • News & sentiment (3 endpoints)
  • Trading (3 endpoints)
  • AI/ML (3 endpoints)
  • Blockchain (2 endpoints)
  • Statistics (3 endpoints)
  • Historical (1 endpoint)

Phase 10: WebSocket

  • Real-time ticker
  • Real-time trades

Phase 11-12: Performance

  • Caching
  • Rate limiting
  • Error handling

Phase 13: Testing

  • Test all endpoints
  • Load testing

Phase 14-15: Deploy

  • Docker build
  • Push to HF Space
  • Production testing

⚠️ CRITICAL REMINDERS

THIS IS AN UPDATE

βœ… Update existing HuggingFace Space
βœ… Add new endpoints
βœ… Enhance existing features
❌ Don't create new space
❌ Don't break existing functionality

PRIORITY

1. MUST HAVE:
   - GET /api/market
   - GET /api/ohlcv
   - GET /api/news/latest
   - GET /api/sentiment/global
   - GET /api/ai/signals

2. SHOULD HAVE:
   - All other REST endpoints
   - WebSocket /ws/ticker

3. NICE TO HAVE:
   - Advanced features

QUALITY

βœ… All endpoints return valid JSON
βœ… Standard error format
βœ… Caching on all endpoints
βœ… Async/await throughout
βœ… Fallback mechanisms
βœ… Rate limiting

πŸ“š QUICK REFERENCE

Need to find something? Check:

What Where
Endpoint specs HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md β†’ "API SPECIFICATIONS"
Code examples HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md β†’ "TECHNICAL REQUIREMENTS"
Data sources HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md β†’ "Data Sources Integration"
Caching HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md β†’ "Caching Strategy"
AI models HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md β†’ "AI/ML Models"
WebSocket HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md β†’ "WebSocket Implementation"
Deployment HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md β†’ "DEPLOYMENT CONFIGURATION"

βœ… SUCCESS CRITERIA

Done when:

  • βœ… All 30+ endpoints work
  • βœ… WebSocket stable
  • βœ… Caching improves performance
  • βœ… AI models generate predictions
  • βœ… /docs endpoint shows API docs
  • βœ… Health check works
  • βœ… No errors for 24 hours
  • βœ… Response times meet requirements

🎯 YOUR FIRST 3 ACTIONS

  1. Read HF_DEPLOYMENT_SUMMARY.md
  2. Read SEND_TO_HF_TEAM.md
  3. Read HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md (your main reference)

Then start Phase 1 implementation.


⏱️ TIME ESTIMATE

  • Reading: 3-4 hours
  • Implementation: 3-5 days
  • Testing: 1-2 days
  • Deployment: 1 day
  • Total: 5-8 days

🚨 REMEMBER

THIS IS AN UPDATE REQUEST! πŸ”„

Not creating new space ❌
UPDATING existing space βœ…


πŸš€ START NOW

Begin with: HF_DEPLOYMENT_SUMMARY.md

Main reference: HUGGINGFACE_SPACE_DEPLOYMENT_REQUEST.md

Good luck! 🎯