fishing-lure-classifier

🎣 Fishing Lure Identifier App

AI-powered fishing lure identification app with cloud sync, subscription management, and catch tracking.


πŸš€ Features


πŸ“± Tech Stack

Mobile App

Backend


πŸ› οΈ Setup

Prerequisites

1. Clone & Install

git clone <your-repo-url>
cd "Fishing Lure"

# Backend (Flask) β€” from repo root
cd backend
pip install -r requirements.txt

# Mobile app (Expo) β€” from repo root
cd ../frontend
npm install

2. Configure Environment

3. Set Up Supabase Database

Run these SQL files from the database/ folder in the Supabase SQL Editor (in order):

1. database/supabase_schema.sql
2. database/supabase_subscriptions_schema.sql
3. database/supabase_security_patch.sql
4. database/supabase_add_favorites.sql
5. database/supabase_soft_delete.sql

4. Run Backend

cd backend
python app.py
# Server runs on http://localhost:5000 (or FLASK_PORT from .env)

5. Run Mobile App

cd frontend
npx expo start

# Press 'a' for Android, 'i' for iOS

πŸ’° Subscription Setup (For App Store Launch)

1. Developer Accounts

2. RevenueCat Setup (FREE)

  1. Sign up at https://app.revenuecat.com/signup
  2. Create project
  3. Get API keys for iOS and Android
  4. Configure RevenueCat keys via frontend/.env (EXPO_PUBLIC_RC_*) and frontend/src/services/subscriptionService.js as needed:
const REVENUECAT_API_KEY_IOS = 'your-ios-key';
const REVENUECAT_API_KEY_ANDROID = 'your-android-key';

3. Create Subscription Products

Product IDs (same for both stores): monthly_pro, yearly_pro (no lifetime).

Early adoption pricing β€” locked in for our first wave of users.

iOS: Create in App Store Connect β†’ In-App Purchases Android: Create in Google Play Console β†’ Monetization β†’ Subscriptions

4. Configure RevenueCat

  1. Dashboard β†’ Entitlements β†’ Create β€œpro”
  2. Attach monthly and yearly products to β€œpro” entitlement
  3. Connect Apple App Store & Google Play Store

Full guide: See frontend/SUBSCRIPTION_SETUP.md


πŸ“Š Pricing Model

Tier Price Features
Free $0 10 scans/month, basic features
PRO Monthly $4.99/mo Unlimited scans, catches, advanced features
PRO Yearly $39.99/yr Save 33%, all PRO features

Current PRO prices are early adoption pricing and stay for our first wave of users.

Cost per scan: ~$0.001 (GPT-4o-mini) Profit margin: ~90% on PRO subscriptions


πŸ—‚οΈ Project Structure

Fishing Lure/
β”œβ”€β”€ frontend/                    # Expo React Native app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ screens/
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── contexts/
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/                     # Flask API
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ mobile_lure_classifier.py
β”‚   β”œβ”€β”€ supabase_client.py
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── templates/
β”‚
β”œβ”€β”€ database/                    # Supabase SQL migrations
β”œβ”€β”€ docs/                        # Guides and legal copy
└── render.yaml                  # Render Blueprint (rootDir: backend)

πŸ” Security

Security patches applied:


πŸ§ͺ Testing

Test Subscriptions

iOS (Sandbox):

  1. Create sandbox tester in App Store Connect
  2. Sign out of App Store on device
  3. Run app and make test purchase
  4. Sign in with sandbox account (no real charge)

Android (Internal Testing):

  1. Add test accounts in Google Play Console
  2. Upload internal test build
  3. Install and test purchases

Test Backend

cd backend
python test_production.py
python test_supabase_connection.py
# Unit tests (install once: pip install pytest)
pytest tests/

πŸ“± Build & Deploy

Mobile App (Expo EAS)

cd frontend

# Build for iOS
eas build --platform ios --profile production

# Build for Android
eas build --platform android --profile production

# Submit to stores
eas submit --platform ios
eas submit --platform android

Backend (Render)

Set environment variables on the web service. Root Directory in Render should be backend (or use the repo-root render.yaml Blueprint with rootDir: backend).

Environment Variables to Set:

Start command: gunicorn --bind 0.0.0.0:$PORT app:app


πŸ› Troubleshooting

β€œSupabase credentials not found”

β€œFailed to save to Supabase”

β€œNo packages found” (RevenueCat)

App won’t build

cd frontend
rm -rf node_modules
npm install
npx expo start -c

πŸ“Š Analytics & Monitoring

Track via Supabase

-- Get subscription stats
SELECT * FROM subscription_stats;

-- Most scanned lure types
SELECT lure_type, COUNT(*) as scans
FROM lure_analyses
GROUP BY lure_type
ORDER BY scans DESC;

-- PRO conversion rate
SELECT 
  COUNT(*) FILTER (WHERE is_pro) * 100.0 / COUNT(*) as conversion_rate
FROM user_subscriptions;

RevenueCat Dashboard


πŸš€ Launch Checklist


πŸ’‘ Tips


πŸ“ž Support & Resources


πŸ“„ License

[Your License Here]


🀝 Contributing

[Your contribution guidelines]


Built with ❀️ for fishermen everywhere 🎣