# The Flow

In this section we are going to understand how the application works.

## How does the Store Owner registers?

There are two ways a Store Owner registers to the platform.

1. Self Registration through the Sign-Up page.
2. Admin registers the Store Owner.

### Self Registration

In this process, any user can register for a role of Store Owner.\
The registration page is \*\*<https://yourwebsite.com/public/auth/login**\\>
After the registration, they will be able to login with the same URL as Admin Login.

### Admin Registers the Store Owner

Admin can add Store Owner from the Admin Dashboard.\
**Admin > Users > All Users > Add New User** and create a user with the role "**Store Owner**"

## How are Stores/Restaurant created and linked?

### Store owner creates their own stores

The store owner can link their store through the Store Dashboard.\
Login URL: \*\*<https://yourwebsite.com/public/auth/login**\\>
**Dashboard > Stores > Add New Store**

Created store will be automatically linked to the Store Owner.

Every new store added by the Store owner needs to be approved by the Admin before it is visible to the customers in the customer's application.\
\
Admin can view all the pending approval stores in **Admin > Stores > Pending Approval Stores**

### Admin creates stores and links them to the Store Owner

Admin can create Stores from Admin > Stores > Add New Store

Admin can link the newly created store to the Store Owner from **Admin > Users > Store Owners > Manage Owner's Stores** and assign stores/restaurants.

The Stores/Restaurants created by Admin are auto approved.

## How does a Delivery Guy registers?

There are two ways a Delivery Guy registers to the platform.

1. Self Registration through the Sign-Up page.
2. Admin registers the Delivery Guy.

### Self Registration

In this process, any user can register for a role of Delivery Guy\
The registration page is \*\*<https://yourwebsite.com/public/auth/login**\\>
After the registration, they will be able to login to the Delivery Application.

The Delivery Application URL is: **<https://yourwebsite.com/delivery>**

{% hint style="danger" %}
**IMPORTANT** The delivery application cannot be access through a desktop/laptop. It can only be accessed from a mobile device.
{% endhint %}

{% hint style="warning" %}
The newly created Delivery Guys will not shown any orders unless they are assigned to stores by the Admin.
{% endhint %}

### Admin Registers the Delivery Guy

Admin can add Delivery Guy from the Admin Dashboard.\
**Admin > Users > All Users > Add New User** and create a user with the role "**Delivery Guy**"

While creating a user with role of Delivery Guy there are some extra fields that are needed to be set like, the Delivery Guy Name, Age, Description, Photo, Vehicle Number etc. These extra details of the delivery guy are visible to the customer when their order is being processed.

## How are the Delivery Guys assigned/linked to the Stores?

Admin can link the Delivery Guys to a store/restaurant from **Admin > Users > Delivery Guys > Manage Delivery Stores** and assign stores/restaurants.

One Delivery Guy can be assigned to multiple of stores.

## The Application Flow (Happy Path)

1. The Customer Places an Order with a Store.
2. The Store Owner gets the new order on their Dashboard and accepts it.
3. The order is then visible to the preassigned Delivery Guy's Application.
4. The Delivery Guy accepts the order, picks-up the order and delivers the order to the Customer.

##


---

# 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://docs.foodomaa.com/the-flow.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.
