Native iOS app for JNKS — the AI-powered basketball shooting form analyzer. Built with Capacitor wrapping the Next.js web app. Designed for continuous workout use: the camera keeps recording, TTS speaks coaching advice in your ear, and results accumulate in a history tab.
- Start the camera and shoot baskets
- Every 5 shots, the AI scores your form and speaks coaching advice via TTS
- Recording continues automatically for the next batch
- Check the Results tab anytime to review your workout history
- Capacitor (iOS native wrapper for the web app)
- Next.js 16 static export → loaded in WKWebView
- Same Python backend as JNKS (MediaPipe, YOLOv8, Gemini AI)
- macOS 12+
- Xcode 14+ (with iOS SDK)
- Node.js 18+
- Python 3.8+
- ngrok (the iOS app connects to your local backend via ngrok)
brew install ngrok ngrok config add-authtoken YOUR_TOKEN
- Physical iPhone recommended (simulator has no camera)
git clone https://github.com/JoshuaDowdCS/JNKS-IOS.git
cd JNKS-IOS
npm installLink the venv from the JNKS repo (or create your own):
# Option A: symlink from JNKS
ln -s ../JNKS/venv venv
# Option B: create fresh
python3 -m venv venv
source venv/bin/activate
pip install -r pipeline/requirements.txtCreate a .env file:
GEMINI_API_KEY=your_gemini_api_key
./start.shThis will:
- Start ngrok and get a public URL
- Build the Next.js static export with the ngrok URL baked in
- Sync web assets into the iOS project (
cap sync) - Start the Python backend
- Open Xcode
Then in Xcode: select your iPhone and hit Run.
# Build with your backend URL
NEXT_PUBLIC_API_URL="https://your-url.ngrok-free.app" \
NEXT_PUBLIC_WS_URL="wss://your-url.ngrok-free.app" \
npm run build
# Sync to iOS
npx cap sync
# Open Xcode
npx cap open ios
# Start backend separately
source venv/bin/activate
python3 -m pipeline.serversrc/ # Same as JNKS web app
app/analyze/ # Continuous recording + toast notifications
app/results/ # Workout history timeline (localStorage)
lib/workout-storage.ts # localStorage utility for result history
ios/ # Capacitor-generated iOS project
App/App/Info.plist # Camera + microphone permissions
capacitor.config.ts # Capacitor config (appId: com.jnks.ios)
pipeline/ # Python CV + AI backend (same as JNKS)
start.sh # One-command startup
- Safe area padding for the notch / Dynamic Island
- Continuous recording — camera doesn't stop between batches
- TTS coaching plays through phone speaker or earbuds during workout
- Workout history persisted in localStorage, viewable in Results tab
| Script | Description |
|---|---|
npm run build |
Build Next.js static export to out/ |
npm run cap:sync |
Copy web assets into the iOS project |
npm run cap:open |
Open Xcode workspace |
npm run build:ios |
Build + sync + open Xcode (all-in-one) |