# Chapter-2 Sign Up

### Splash screen

Currently, it is a image that is not responsive and dimensions are messed up. We are working on a GIF.

<img src="https://3898150257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrjNYs8KmxBlZvBKyEb2T%2Fuploads%2FoGUY7ZgxXndCsUMKtwFt%2FScreenshot%202024-02-26%20at%2011.18.00%20PM.png?alt=media&#x26;token=d5f9870a-087b-4e3a-8958-eb44e1b7eb38" alt="" data-size="original">

### App Narrative Posters

After the splash screen in the sign up journey, a user is shown two  posters that explains the crux of the app.

<figure><img src="https://3898150257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrjNYs8KmxBlZvBKyEb2T%2Fuploads%2FzLyBYXSD8merrF1wAreb%2FScreenshot%202024-06-11%20at%209.49.48%E2%80%AFAM.png?alt=media&#x26;token=30c48d48-0124-4e69-88ee-f8fb4f703cb4" alt=""><figcaption></figcaption></figure>

### Sign up

After one has installed the application, a user can login using an Indian phone number. They will receive a code in the message that the user has to submit to prove that they own the mobile number. Currently, this is the only way to sign-up. Sending message to international numbers is not integrated. Any phone number entered is automatically assumed to be an Indian phone number with default country code of +91.

<figure><img src="https://3898150257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrjNYs8KmxBlZvBKyEb2T%2Fuploads%2FA6W2ByKMLL26aXOno9Nj%2FScreenshot%202024-06-11%20at%2010.53.38%E2%80%AFAM.png?alt=media&#x26;token=4e1d0ebd-bb1e-4583-aabd-0acf1afee85e" alt=""><figcaption></figcaption></figure>

#### Phone number verification code

The phone number verification code is sent via [Msg 91](docId:EYz_UoS0HYgTVEHjdFhq-) platform. Current template id is: `6650bcb1d6fc050a493cfad2`&#x20;

#### Code message that user receives

{% code overflow="wrap" %}

```
16988 कोड का इस्तेमाल करके बोलभाव में रजिस्टर करें। धन्यवाद, बोलभाव! ["jDkpQ9vqnhq"]
```

{% endcode %}

1. The first number is the code.
2. The alphanumeric code in the end is the user's device id that is used to auto-fetch the code.

**Triggering and verifying code API**

For this, the `login` API is called to request a code on SMS. In the backend a request is sent to Msg91 to send the message on the user's phone number. We currently do not store the code sent via Msg91 in our database.

```html
Submit Phone Number

{
    "mobile_number": "918340541175",
    "action": "send_otp"
}

Submit verification code

{
    "mobile_number": "918340541175",
    "action": "submit_otp",
    "otp": "08582",
    "referrer": {
        "~channel": "whatsApp",
        "~referring_link": "https://0vx58.app.link/P0dFJoVA9Gb",
        "+is_first_session": false,
        "+clicked_branch_link": true,
        "$canonical_url": "https://app.bolbhav.com",
        "$canonical_identifier": "329",
        "$desktop_url": "https://app.bolbhav.com",
        "~id": "1285899126730720773",
        "+click_timestamp": 1711865035,
        "+match_guaranteed": false,
        "~feature": "referral",
        "~campaign": "Bolbhav referrals",
        "custom": "data",
        "$og_title": "Bolbhav",
        "$android_passive_deepview": "branch_passive_default",
        "+rn_cached_initial_event": true,
        "referrer_id": "69"
    }
}
```

#### New User&#x20;

1. When code is verified, it is checked that the phone exists in the [person\_table](https://gramhal.gitbook.io/bolbhav/chapter-1-database/user-data/person_table). If not, then a new entry is made.
2. Parallely, a new entry is made for the user in the user\_meta table, where the field bolbhav\_plus\_last\_login\_at is updated with the current timestamp.&#x20;
3. Upon login each users is provided an fcm\_token (registeration token) that expires after 6 months. Upon expiry, the user is auto-logged out and the user has to login again.

#### Exisiting User

1. Upon login a new fcm\_token (registeration token) is allocated to the existing user.&#x20;
2. The user\_meta table was added on 20th Jan 2024, whereas the person table exists since Feb 2022. So it is possible that users are already present in the person table but do not have an entry in the user\_meta table. Hence, when a new user sign up, it is checked whether, an entry exists in the user\_meta table. If yes, the field bolbhav\_plus\_last\_login\_at is updated with the current timestamp. If no, a new entry is made for the user in the user\_meta table, where the field bolbhav\_plus\_last\_login\_at is updated with the current timestamp.&#x20;

### Posthog events

On the sign up journey, following posthog\_events have been added.

1. splash\_screen
2. signUp\_phone\_number\_screen\_open
3.   signUp\_phone\_number\_submit
4. otp\_resend\_request
5.   otp\_screen\_open
6.   otp\_submit  
7. signUp\_change\_mobile\_number

### Important data to track

#### Sign up drop off rate

How many people drop off in the sign up journey? Below graph show the data for the May 2024 and 30% drop off at the phone number screen. We need to think about removing the sign up journey.

<figure><img src="https://3898150257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrjNYs8KmxBlZvBKyEb2T%2Fuploads%2F8cEJxR9WBDru1w5O08WG%2FScreenshot%202024-06-10%20at%203.08.45%E2%80%AFPM.png?alt=media&#x26;token=e6cbc4bf-8bf4-4ae8-a47c-95232b3bbec8" alt=""><figcaption></figcaption></figure>
