Skip to main content

Local Development

This guide covers running FindU components on your local machine.

Running Components

Web Dashboard

cd ~/findu/web_app
npm install
npm run dev

iOS App

cd ~/findu/ios_app
pod install
open ios_app.xcodeproj
  • Simulator: iPhone 15 Pro recommended
  • Device: Requires developer certificate
  • Backend: Points to dev Supabase

ML Engine

cd ~/findu/matching-algorithm
source venv/bin/activate
python api_v2/main.py

Database Management

Access your Supabase project through the web dashboard:
  • Dashboard: https://supabase.com/dashboard
  • SQL Editor: Run queries and migrations
  • Table Editor: Visual data management
  • Auth: Manage users and permissions

Common Development Tasks

Managing Environments

Environment configuration is managed through .env files in each repository:
  • Development: Use development Supabase URL and keys
  • Production: Use production Supabase URL and keys
To switch environments, update your .env file with the appropriate credentials. Get these from your team lead or Supabase dashboard.

Running Tests

  • Web App
  • iOS App
  • ML Engine
cd ~/findu/web_app
npm test               # Unit tests
npm run test:e2e      # E2E tests
npm run lint          # Linting
npm run typecheck     # TypeScript

Database Tasks

Use the Supabase dashboard for database management:
  1. Create Migrations:
    • Go to SQL Editor in Supabase dashboard
    • Write your SQL migration
    • Save it in your repository for version control
  2. Apply Migrations:
    • Run SQL directly in the dashboard
    • Or include in PR for team review
  3. View Data:
    • Use Table Editor for visual inspection
    • SQL Editor for complex queries

Debugging

Web Dashboard

  1. Chrome DevTools: Best for React debugging
  2. React DevTools: Install browser extension
  3. Network Tab: Monitor Supabase calls

iOS App

  1. Xcode Debugger: Breakpoints and variable inspection
  2. Console Logs: View in Xcode console
  3. Network Debugging: Use Proxyman or Charles

Database

  1. Supabase Dashboard: SQL editor and logs
  2. Table Editor: Visual data inspection
  3. Logs Explorer: Real-time query logs

Tips & Tricks

Use Multiple Terminals

Run each service in its own terminal for easy monitoring

Watch the Logs

Keep logs visible to catch errors early

Test on Real Devices

iOS simulator doesn’t catch all issues

Use Dev Data

Never test with production data locally

Troubleshooting

Kill the process using the port:
# Find process
lsof -i :5173  # or :8000, :54321

# Kill it
kill -9 [PID]
Clear caches and reinstall:
# Web app
rm -rf node_modules package-lock.json
npm install

# Python
pip install -r requirements.txt --force-reinstall
  1. Verify credentials in your .env file
  2. Check Supabase dashboard status
  3. Ensure you’re using the correct environment keys
  4. Test with a simple query in the dashboard

Next Steps