Skip to main content

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
To use a different student:
  1. Find another student ID in your Supabase students table
  2. Update TestConfiguration.testStudentId with that ID

Alternative: Create a New Test Student

If you prefer to create a dedicated test student:
  1. Use the create_test_student_simple.sql script which clones an existing student
  2. 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

  1. Run the create_test_student.sql script
  2. Or create a student with the test ID in your database
  3. Make sure the API is deployed and healthy
  1. Check your internet connection
  2. Verify the API URL is accessible
  3. Check Railway deployment status
  1. Ensure colleges have vector data (run compute_vectors.py)
  2. Check that student preferences are reasonable
  3. Verify excluded school list isn’t too large

Next Steps

To complete the integration:
  1. Run the test student creation script in Supabase
  2. Test the app with a test email address
  3. Verify personalized recommendations are loading
  4. Remove any remaining references to random school selection

API Endpoints Used

EndpointMethodPurpose
/recommendationsPOSTGet personalized matches
/swipePOSTRecord swipe interactions
/healthGETCheck 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
Always ensure test student IDs exist in the database before testing the API integration.