A collection of Uber clone apps build with Supabase and different frameworks.
- flutter: Uber clone app build with Flutter
- android: [WIP] Uber clone app build with Android Jetpack Compsoe
- script: Contains scripts that simulates the Uber driver
Follow the video guide to build the app: https://youtu.be/cL4pVpaOH9o
Run supabase link
to link the project to a remote Supabase project.
Run supabase db push
to push the migrations to the Supabase database.
Copy the supabase/functions/.env.example
file to supabase/functions/.env
and paste your own Google Cloud Platform API key. Make sure the Routes API is enabled for the key. Run supabase secrets set --env-file ./supabase/functions/.env
to set the environment variables.
- Open
flutter/lib/main.dart
and replace theSUPABASE_URL
andSUPABASE_ANON_KEY
in theSupabase.initialize()
call with your own Supabase URL and anon key. - Opne
flutter/android/app/src/main/AndroidManifest.xml
and replaceYOUR_GOOGLE_MAP_API_KEY
with your own Google Maps API key. - Open
flutter/ios/Runner/AppDelegate.swift
and replaceYOUR_GOOGLE_MAP_API_KEY
with your own Google Maps API key.
- Open
scripts/dart/lib/main.dart
and replaceYOUR_SUPABASE_URL
andYOUR_SERVICE_ROLE_KEY
with your own Supabase URL and service role key. - In the same file, replace
YOUR_GOOGLE_ROUTES_API_KEY
with your own Google Cloud Platform API key with the routes API enabled. - Also once the user finds a driver and a ride is created, update the
TARGET_RIDE_ID
to the target ride ID to simulate a driver picking up the customer and driving to the destination.
In order for the app to find an available driver, there needs to be a driver in the database. You can add a driver to the database by running the following SQL query:
insert into public.drivers (id, model, number, location, is_available)
values
('a040ae05-3928-4cbf-8577-bbad6125c3fe', 'Ford Focus', 'GHI-789', ST_GeographyFromText('SRID=4326;POINT(-122.0854 37.4223983)'), true);