📋 Table of Contents

🤖 Introduction

⚙️ Tech Stack

🔋 Features

🤸 Quick Start

🕸️ Snippets (Code to Copy)

🖇️ Links

📦 Assets

🚀 More

🚨 Tutorial

This repository contains the code corresponding to an in-depth tutorial available on our YouTube channel, JavaScript Mastery.


If you prefer visual learning, this is the perfect resource for you. Follow our tutorial to learn how to build projects like these step-by-step in a beginner-friendly manner!




🤖 Introduction

Built with React Native for handling the user interface, Google Maps for rendering maps with directions, stripe for handling payments, serverless Postgres for managing databases, and >


If you're getting started and need assistance or face any bugs, join our active Discord community with over 34k+ members. It's a place where people help each other out.




⚙️ Tech Stack

React Native

Expo

Stripe

PostgreSQL

Google Maps

zustand

Clerk

Tailwind CSS

🔋 Features

👉 Onboarding Flow: Seamless user registration and setup process.


👉 Email Password Authentication with Verification: Secure login with email verification.


👉 oAuth Using Google: Easy login using Google credentials.


👉 Authorization: Secure access control for different user roles.


👉 Home Screen with Live Location & Google Map: Real-time location tracking with markers on a map.


👉 Recent Rides: View a list of recent rides at a glance.


👉 Google Places Autocomplete: Search any place on Earth with autocomplete suggestions.


👉 Find Rides: Search for rides by entering 'From' and 'To' locations.


👉 Select Rides from Map: Choose available cars near your location from the map.


👉 Confirm Ride with Detailed Information: View complete ride details, including time and fare price.


👉 Pay for Ride Using Stripe: Make payments using multiple methods like cards and others.


👉 Create Rides After Successful Payment: Book a ride after confirming payment.


👉 Profile: Manage account details in the profile screen.


👉 History: Review all rides booked so far.


👉 Responsive on Android and iOS: Optimized for both Android and iOS devices.


and many more, including code architecture and reusability


🤸 Quick Start

Follow these steps to set up the project locally on your machine.


Prerequisites


Make sure you have the following installed on your machine:


Git

Node.js

npm (Node Package Manager)

Cloning the Repository


git clone

cd uber

Installation


Install the project dependencies using npm:


npm install

Set Up Environment Variables


Create a new file named .env in the root of your project and add the following content:


EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=


EXPO_PUBLIC_PLACES_API_KEY=

EXPO_PUBLIC_DIRECTIONS_API_KEY=


DATABASE_URL=



EXPO_PUBLIC_GEOAPIFY_API_KEY=


EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=

STRIPE_SECRET_KEY=

Replace the placeholder values with your actual Clerk, Stripe, NeonDB, Google Maps, andgeoapify credentials. You can obtain these credentials by signing up on the Clerk, Stripe, NeonDB, Google Maps and geoapify websites respectively.


Running the Project


npx expo start

Download the Expo Go app and Scan the QR code on your respective device to view the project.


🕸️ Snippets

Here are some code snippets from the project to help you get started quickly.


Setup

.vscode/settings.json

tailwind.config.js

types/type.d.ts

types/image.d.ts

constants/index.ts

Root Layout Fonts

Components

components/CustomButton

components/InputField

components/DriverCard.tsx

Utilities

lib/fetch.ts

lib/map.ts

lib/utils.ts

Queries

GET Rides SQL Query

SEED Drivers Query

Schema

CREATE Drivers Table SQL Query

CREATE Rides Table SQL Query

CREATE Users Table SQL

Mock Data

Mock Drivers

Mock Rides

API Endpoints

(api)/ride/create+api.ts

(api)/ride/[id]+api.ts

Screens

(root)/book-ride

(root)/(tabs)/profile

(root)/(tabs)/chat

Other

store/index.ts

🔗 Links

You can find important links mentioned in the YouTube video below:


Expo NativeWind Setup

TypeScript Support for NativeWind

Eslint and Prettier Setup

Download FREE WebStorm

Serverless NeonDB

Clerk Auth

Database Mastery Course

Clerk Expo Quickstart

Clerk Expo OAuth

Geoapify Map

Stripe React Native SDK

Stripe

📦 Assets

Assets used in the project can be found here


🚀 More

Advance your skills with Next.js Pro Course


Enjoyed creating this project? Dive deeper into our PRO courses for a richer learning experience. They're packed with detailed explanations, cool features, and exercises to boost your skills. Give it a go!