AI-powered paddle impact analysis backend for mobile app.
-
Initialize Git
cd ~/paddle-impact-api git init git add . git commit -m "Initial commit: Paddle Impact API"
-
Create GitHub Repo
- Go to https://github.com/new
- Name:
paddle-impact-api - Don't initialize with README (we have one)
- Click "Create repository"
-
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
-
Deploy to Railway
- Go to https://railway.app/
- Sign up (FREE - no credit card needed)
- Click "New Project" → "Deploy from GitHub"
- Select
paddle-impact-apirepo - Railway auto-detects Python and uses
Procfile - Wait 5-10 minutes for deployment
- Click "Settings" → "Generate Domain" to get public URL
-
Test Your API
curl https://YOUR-APP.up.railway.app/health # Should return: {"status":"healthy","message":"API is running"}
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 information
Health check
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.
# Install dependencies
pip install -r requirements-api.txt
# Run server
uvicorn api:app --reload --port 8000
# Test
curl http://localhost:8000/health- FastAPI (web framework)
- OpenCV (image processing)
- scikit-learn (ML models)
- rembg (AI background removal)
- NumPy, SciPy (numerical computing)
Railway.app Free Tier:
- ✅ 500 hours/month (enough for development/testing)
- ✅ 512MB RAM
- ✅ 1GB disk
- ✅ Public HTTPS URL included
Perfect for this project! 🎉
For mobile app integration, see the main project documentation.
Ready to deploy? Follow the Quick Start steps above! 🚀