> ## Documentation Index
> Fetch the complete documentation index at: https://brokeros.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 14 Role-Specific Mobile Workspaces

> How the BrokerOS mobile application dynamically adapts its navigation, bottom tabs, and features based on the authenticated employee role.

## One Application, 14 Dedicated Workspaces

Real estate operations encompass multiple distinct field and office roles: telecallers dialing cold leads, sales executives meeting clients at construction sites, sourcing managers recruiting independent brokers, and post-sales agents collecting milestone payments.

Rather than fragmenting into multiple applications, BrokerOS runs a **single unified mobile application**. Upon login, the dashboard shell (`apps/mobile/app/(dashboard)/_layout.tsx`) reads the employee's role from their server session and dynamically generates an optimized bottom tab bar and screen hierarchy.

***

## Dynamic Navigation Engine

The mobile navigation engine relies on two central constants defined in [`apps/mobile/constants/navigation.tsx`](https://github.com/trybrokeros/BrokerOS/blob/main/apps/mobile/constants/navigation.tsx):

1. **`ALL_POSSIBLE_SCREENS`**: Declares every registered screen route, title, icon, and authorized roles.
2. **`getNavLinksForRole(userRole)`**: A pure mapping function that returns the exact tab items allowed for the authenticated role.

```tsx theme={null}
// Inside apps/mobile/app/(dashboard)/_layout.tsx
const userRole = roleCode || 'UNKNOWN';
const navLinks = getNavLinksForRole(userRole);

return (
  <Tabs ...>
    {ALL_POSSIBLE_SCREENS.map((link) => {
      const isVisible = navLinks.some((nl) => nl.name === link.name);
      return (
        <Tabs.Screen
          key={link.name}
          name={link.name}
          options={{
            title: link.title,
            tabBarLabel: link.title,
            // Hides unauthorized routes completely from deep linking
            href: isVisible ? undefined : null,
            tabBarItemStyle: { display: isVisible ? 'flex' : 'none' },
            tabBarIcon: ({ color, size }) => renderTabIcon(link.icon, color, size),
          }}
        />
      );
    })}
  </Tabs>
);
```

Unauthorized tabs receive `href: null` and `display: 'none'`, preventing unauthorized users from accessing or deep linking into prohibited routes.

***

## Role-by-Role Workspace Directory

### 1. Pre-Sales Telecaller (`PRE_SALES`)

Focused entirely on high-throughput phone outreach, queue execution, and disposition logging.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Dashboard** | `pre-sales/index` | Daily call queue, auto-dialer launcher, progress against daily call target. |
| **Leads** | `pre-sales/lead-management` | Lead catalog with stage, temperature (HOT/WARM/COLD), and search filters. |
| **Analytics** | `pre-sales/analytics` | Personal connect rate, total call minutes, and completed follow-ups. |
| **Settings** | `pre-sales/settings` | Recording folder picker (SAF), audio sync status, and account settings. |

***

### 2. Pre-Sales Manager (`PRE_SALES_MANAGER`)

Provides operational supervision over telecaller teams without personal call queues.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Overview** | `pre-sales-manager/index` | Live team KPI overview, connect rates, and aggregated lead volume. |
| **Leads** | `pre-sales-manager/lead-management` | Team-wide lead pipeline with reassignment actions. |
| **Employees** | `pre-sales-manager/employees/index` | Real-time agent status cards (On Call dot, Idle, Offline) and call targets. |
| **New Leads** | `pre-sales-manager/new-leads` | Unassigned lead pool for round-robin or manual distribution. |
| **Analytics** | `pre-sales-manager/analytics` | Comparative performance charts and missed follow-up tracking. |
| **Settings** | `pre-sales-manager/settings` | Team-wide calling thresholds and script guidelines. |

***

### 3. Sales Executive (`SALES_EXECUTIVE`)

Field-oriented workspace centered on physical site visits, inventory matrices, and bookings.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Dashboard** | `sales-executive/index` | Today's scheduled visits, task reminders, and personal sales leaderboard. |
| **Leads** | `sales-executive/lead-management` | Qualified prospects assigned for site visits and negotiations. |
| **Approval** | `sales-executive/approval` | Status of submitted price discount requests and executive waivers. |
| **Booking** | `sales-executive/booking` | Unit booking creation form and payment token confirmation. |
| **Inventory** | `sales-executive/inventory/index` | Real-time project unit matrix (Available, Reserved, Sold). |
| **More** | `sales-executive/more` | GPS site visit verification launcher and performance summaries. |

***

### 4. Sales Manager (`SALES_MANAGER`)

Oversees closing velocity, reviews discount negotiations, and tracks field teams.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Overview** | `sales-manager/index` | Project revenue velocity, site visit conversion rates, and monthly targets. |
| **Employees** | `sales-manager/employees/index` | Live field agent map showing GPS location and on-call statuses. |
| **Leads** | `sales-manager/lead-management/index` | High-value negotiation pipelines and escalated prospect records. |
| **Approval** | `sales-manager/approval` | Inbox to approve or reject discount requests within delegation limits. |
| **Inventory** | `sales-manager/inventory/index` | Master inventory availability across towers and configurations. |
| **Booking** | `sales-manager/booking` | Finalized booking records and payment schedule reviews. |

***

### 5. Sourcing Manager (`SOURCING_MANAGER`)

Manages the external Channel Partner (CP) network and broker recruitment.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Overview** | `sourcing-manager/index` | Total recruited brokers, active CP leads, and commission volumes. |
| **Brokers** | `sourcing-manager/broker-management/index` | Directory of external brokers with RERA, GST, and PAN status flags. |
| **Commissions** | `sourcing-manager/commissions` | Brokerage settlement records and payout milestone tracker. |
| **Inventory** | `sourcing-manager/inventory/index` | CP-flagged inventory projects (`isCpProject = true`). |
| **Analytics** | `sourcing-manager/analytics` | Top performing brokers and sourcing conversion ratios. |

***

### 6. Closing Manager (`CLOSING_MANAGER`)

Dedicated on-site closing role assisting external brokers with visiting prospects.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Overview** | `closing-manager/index` | Today's expected broker-client visits arriving at project site offices. |
| **Inventory** | `closing-manager/inventory/index` | Real-time unit availability for on-the-spot booking locks. |
| **Leads** | `closing-manager/lead-management/index` | Prospects referred by external channel partners. |
| **Brokers** | `closing-manager/broker-management/index` | Directory of active brokers linked to on-site prospects. |
| **Handover** | `closing-manager/handover` | Client onboarding records transition to post-sales departments. |

***

### 7. Channel Partner (`CHANNEL_PARTNER`)

Restricted external portal view for registered agency heads and partner brokers.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Overview** | `channel-partner/index` | Partner agency summary, active clients, and accrued commissions. |
| **Customers** | `channel-partner/customer-management/index` | Prospective buyers referred by this agency. |
| **Employees** | `channel-partner/employees/index` | Sub-agents and team members within the partner brokerage. |
| **Inventory** | `channel-partner/inventory/index` | Authorized CP inventory projects with downloadable marketing brochures. |
| **Analytics** | `channel-partner/analytics` | Partner commission ledger and payment verification history. |

***

### 8. Post-Sales Executive (`POST_SALES`)

Handles the post-booking client relationship through possession handover.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Overview** | `post-sales/index` | Milestone collection progress, pending demand notes, and document status. |
| **Leads / Clients** | `post-sales/lead-management` | Customer accounts converted from confirmed bookings. |
| **Inventory** | `post-sales/inventory/index` | Unit specifications, parking allocation, and floor plan sheets. |
| **Commissions** | `post-sales/commissions` | Builder inbound commission collection tracking. |
| **Handover** | `post-sales/handover` | Snag lists, possession verification, and key handover signatures. |

***

### 9. Post-Sales Manager (`POST_SALES_MANAGER`)

Manages collection schedules, legal document verification, and builder inbound payouts.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Overview** | `post-sales-manager/index` | Department collection KPIs, overdue demands, and escrow balances. |
| **Employees** | `post-sales-manager/employees/index` | Executive workload, document verification queues, and audit trails. |
| **Leads / Clients** | `post-sales-manager/lead-management` | Client portfolio across projects and unit categories. |
| **Commissions** | `post-sales-manager/commissions` | Inbound commission settlements due from real estate builders. |
| **Analytics** | `post-sales-manager/analytics` | Collection aging analysis and milestone completion forecasts. |

***

### 10. Finance Executive (`FINANCE`)

Monitors customer payments, receipts, and commission disbursements.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Finance** | `finance/index` | Payment verification requests, ledger audits, and settlement batches. |

***

### 11. Business Manager (`BUSINESS_MANAGER`)

Operational management tracking cross-department velocity and multi-project KPIs.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Business Mgr** | `business-manager/index` | Cross-project sales velocity, inventory burn rates, and revenue aggregates. |

***

### 12. Director (`DIRECTOR`)

Executive dashboard for brokerage owners and executive partners.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Director** | `director/index` | High-level brokerage valuation, top performers, and escrow balances. |

***

### 13. System Administrator (`ADMIN`)

System configuration and operational monitoring.

| Bottom Tab | Route | Functionality |
| :- | :- | :- |
| **Admin** | `admin/index` | User management, role provisioning, and system diagnostics. |

***

### 14. Global Header Utilities

Available in the top header regardless of the active role:

* **Notifications Center** (`notifications.tsx`): Real-time FCM and Socket.IO alerts with interactive deep links.
* **Team Chat** (`chat/index.tsx`, `chat/[id].tsx`): Real-time team messaging and lead profile sharing.
* **Sign Out**: Clears hardware-backed tokens, halts background location services, and unregisters telephony listeners.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.