Skip to content

Repository files navigation

Paddle Impact Pro - Backend API

AI-powered paddle impact analysis backend for mobile app.

🚀 Deploy to Railway.app (FREE)

Quick Start

  1. Initialize Git

    cd ~/paddle-impact-api
    git init
    git add .
    git commit -m "Initial commit: Paddle Impact API"
  2. Create GitHub Repo

    • Go to https://github.com/new
    • Name: paddle-impact-api
    • Don't initialize with README (we have one)
    • Click "Create repository"
  3. Push to GitHub

    git remote add origin https://github.com/YOUR_USERNAME/paddle-impact-api.git
    git branch -M main
    git push -u origin main
  4. Deploy to Railway

    • Go to https://railway.app/
    • Sign up (FREE - no credit card needed)
    • Click "New Project" → "Deploy from GitHub"
    • Select paddle-impact-api repo
    • Railway auto-detects Python and uses Procfile
    • Wait 5-10 minutes for deployment
    • Click "Settings" → "Generate Domain" to get public URL
  5. Test Your API

    curl https://YOUR-APP.up.railway.app/health
    # Should return: {"status":"healthy","message":"API is running"}

📁 What's Included

paddle-impact-api/
├── api.py                  # FastAPI backend
├── requirements-api.txt    # Python dependencies  
├── Procfile               # Railway start command
├── railway.json           # Railway configuration
├── .gitignore            # Git ignore rules
├── API_README.md         # API documentation
├── core/
│   ├── image_processing.py          # Computer Vision
│   ├── recommendation_engine_ml.py  # ML recommendations
│   ├── hit_validation_model.pkl     # Trained model
│   └── recommendation_model.pkl     # Trained model
└── datasets/
    └── *.jpeg            # Training images

🔌 API Endpoints

GET /

API information

GET /health

Health check

POST /analyze

Analyze paddle image

Request:

curl -X POST https://YOUR-APP.railway.app/analyze \
  -F "image=@paddle.jpg" \
  -F "bat_weight=8.0"

Response:

{
  "success": true,
  "data": {
    "impact_count": 43,
    "stats": {
      "sweet_spot_percentage": 45.2,
      "accuracy": 75.3,
      "consistency": 82.1
    },
    "recommendations": [...]
  }
}

See API_README.md for full documentation.

🛠️ Local Development

# Install dependencies
pip install -r requirements-api.txt

# Run server
uvicorn api:app --reload --port 8000

# Test
curl http://localhost:8000/health

📦 Tech Stack

  • FastAPI (web framework)
  • OpenCV (image processing)
  • scikit-learn (ML models)
  • rembg (AI background removal)
  • NumPy, SciPy (numerical computing)

🆓 Free Tier Limits

Railway.app Free Tier:

  • ✅ 500 hours/month (enough for development/testing)
  • ✅ 512MB RAM
  • ✅ 1GB disk
  • ✅ Public HTTPS URL included

Perfect for this project! 🎉

📞 Support

For mobile app integration, see the main project documentation.


Ready to deploy? Follow the Quick Start steps above! 🚀

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages