Overview
The iOS app is integrated with the Python matching API deployed at:https://findu-matching-production.up.railway.app
Current Status
Setup Test Student
Using an Existing Student (Current Setup)
The app is configured to use an existing student ID for testing:- Student ID:
47f9c3d6-7c88-4eee-93ae-6d7ea78123f7 - Configuration:
TestConfiguration.swift
- Find another student ID in your Supabase students table
- Update
TestConfiguration.testStudentIdwith that ID
Alternative: Create a New Test Student
If you prefer to create a dedicated test student:- Use the
create_test_student_simple.sqlscript which clones an existing student - Or manually create a student in Supabase with valid constraint values
How It Works
- Test Users
- Real Users
For users with email containing “test”:
- Automatically uses the test student ID for API calls
- Shows “Test Mode” indicator but still gets personalized matches
- All matching algorithms work normally
Visual Indicators
Test Mode
- 🟠 Orange “Test Mode” badge appears in the top left
- Cards show ”🧪 Test mode” in explanations when using random fallback
- Clear error messages when student not found
API Mode
- No badge when using real API recommendations
- Match explanations show actual matching reasons
- Learning system adapts based on swipes
Troubleshooting
Student not found errors
Student not found errors
- Run the create_test_student.sql script
- Or create a student with the test ID in your database
- Make sure the API is deployed and healthy
Network errors
Network errors
- Check your internet connection
- Verify the API URL is accessible
- Check Railway deployment status
No recommendations
No recommendations
- Ensure colleges have vector data (run compute_vectors.py)
- Check that student preferences are reasonable
- Verify excluded school list isn’t too large
Next Steps
To complete the integration:- Run the test student creation script in Supabase
- Test the app with a test email address
- Verify personalized recommendations are loading
- Remove any remaining references to random school selection
API Endpoints Used
| Endpoint | Method | Purpose |
|---|---|---|
/recommendations | POST | Get personalized matches |
/swipe | POST | Record swipe interactions |
/health | GET | Check API status |
Configuration
The API URL is configured in:- File:
MatchingAPIClient.swift(Line 18) - Current URL:
https://findu-matching-production.up.railway.app
Changing the API URL
1
Update baseURL
Modify the baseURL in MatchingAPIClient.swift
2
Update AppConfig
Update AppConfig.swift if using environment-based URLs
3
Rebuild
Clean build folder and rebuild the app