# Client

First, we will proceed with the necessary updates for both the Android and iOS apps.

### Android

To begin, we need to create release keystores for signing the APKs or aab bundles. You can use the command provided below, replacing \[key\_alias\_name] with the desired alias name of your choice:

```
keytool -genkey -v -keystore keystore.jks -alias [your_alias_name] -keyalg RSA -keysize 2048 -validity 10000
```

Ensure you have copied this file to the driver's and rider's frontend folders. Then, open the `key.properties` file located in the `android` folder and enter the alias name and password you have chosen for the keystore in the appropriate fields.

Now, execute the following command to display the signature of both your system's debug keystore and the release keystore. Take a copy of the SHA-1 and SHA-256 values, as we will need them later.

```bash
../gradlew signingreport
```

Next, open the `build.gradle` file located in the app folder. Inside this file, you will find the line that specifies the `applicationId`. Update this line to match the application identifier of your own brand.

<pre class="language-diff" data-overflow="wrap"><code class="lang-diff">android {
    compileSdkVersion 33

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID 
<strong>-       applicationId com.ridy.taxi.rider
</strong>+       applicationId com.yourCompanyName.taxi.driver
</code></pre>

### iOS

Next, we will do the same for iOS apps. Please open the `Runner.xcworkspace` in either rider-frontend/driver-frontend's ios folder. Next click on the Runner project in the left panel so the project settings would appear. Then under the Signing and Capabilities tab, you can change the bundle identifier:

<figure><img src="/files/-MQkqkgNz_70Cl1Pwa4X" alt=""><figcaption></figcaption></figure>

### Firebase

You can now head to the Firebase console and create a Flutter Firebase app on the project created during the first Firebase setup.

<figure><img src="/files/WIRHD2jeUFt8mOmif7GB" alt=""><figcaption></figcaption></figure>

During the flutter application creation, you will be instructed on how to install `Firebase CLI` & `FlutterFire` tool:

<figure><img src="/files/HPv9XAkFhFFvpdB0eKZj" alt=""><figcaption></figcaption></figure>

Once you have installed those tools, Firebase will prompt you to connect your apps to the Firebase project. This process is seamless and can be accomplished by executing a command similar to the one provided below by Firebase:

<figure><img src="/files/UBzDublb597ZwTJQV60f" alt=""><figcaption></figcaption></figure>

<pre class="language-bash"><code class="lang-bash">f<a data-footnote-ref href="#user-content-fn-1">lutterfire configure --project=something</a>
</code></pre>

When you run this command, you will be presented with the option to configure which apps you want to connect with Firebase. You can uncheck macOS since ridy does not support macOS client officially.

Here's a clear and concise documentation section you can use:

***

### 🔧 Configure API Base URL

Before running the **Rider** and **Driver** apps, you must set the correct API endpoints in the environment files.

#### Step 1: Locate the `.env` files

Each of the following folders contains two environment files:

* `apps/rider-frontend`
* `apps/driver-frontend`

Inside each, you'll find:

* `.env.dev`
* `.env.prod`

#### Step 2: Set the `BASE_URL` variable

Edit both `.env.dev` and `.env.prod` files in each app.

Set the `BASE_URL` variable as follows:

* For the **Rider app** (`apps/rider-frontend`):

  ```env
  BASE_URL=http://your-server-ip/rider-api/
  ```
* For the **Driver app** (`apps/driver-frontend`):

  ```env
  BASE_URL=http://your-server-ip/driver-api/
  ```

> 💡 You can find your `your-server-ip` by taking the URL you used to access the admin panel and removing the `/admin` suffix.

For example, if you accessed the admin panel at:

```
http://127.0.0.1/admin
```

Then:

* Rider BASE\_URL → `http://127.0.0.1/rider-api/`
* Driver BASE\_URL → `http://127.0.0.1/driver-api/`

Make sure each URL ends with a trailing slash (`/`) to avoid request issues.

***

Let me know if you want a table or script snippet to automatically fill in these values.

With the above steps completed, you can now compile either the driver or rider app using Flutter's standard build commands.

{% tabs %}
{% tab title="Android" %}

```bash
// Build with debug keystore
flutter build apk
flutter build appbundle

// Build with release keystore
flutter build apk --release
flutter build appbundle --release
```

{% endtab %}

{% tab title="iOS" %}

```bash
flutter build ipa
```

{% endtab %}
{% endtabs %}

[^1]: This is just an example command. Instead, make sure you enter the command provided by Firebase, which includes your project's name in it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://flutter-docs.taxi.ridy.io/installation/client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
