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

# APEX Dispatch App

> Police and EMS dispatch app for lb-phone with live incident routing.

A full-featured police / EMS dispatch app for lb-phone. See active incidents, accept or decline calls, route to DGL, manage unit status, and post callouts — all from your phone. Built on a glassmorphic iPhone-native design system with live status indicators and color-coded severity.

## Features

* Native lb-phone app with iPhone-style frame and glass UI
* Live dispatch feed — open, accepted, declined, closed, DGL-routed
* Accept / decline / close directly from the feed
* DGL routing — police ↔ LSSD ↔ ambulance fan-out mapping (configurable)
* Per-player rate limiting + max active dispatches cap
* Auto-delete after configurable hours
* Server APIs — accept/decline/status-change hook for your MDT (e.g. APEX Polizeicomputer)

## Requirements

<Card title="Required" icon="circle-check">
  `es_extended`, `ox_lib`, `oxmysql`, `lb-phone`
</Card>

## Installation

1. Drop `apex-dispatch-app` into `resources/`
2. `ensure apex-dispatch-app` — DB tables auto-create

## Configuration

```lua config.lua theme={null}
Config.AppIdentifier       = 'bg-dispatch'
Config.RateLimitSeconds    = 60
Config.MaxOwnDispatches    = 5
Config.MaxAllDispatches    = 200
Config.AutoDeleteHours     = 4
Config.MaxActiveDispatches = 2
Config.DGLMapping          = { police = 'police', lssd = 'police', ambulance = 'md' }
```

Status labels are localized (Offen / In Bearbeitung / Abgelehnt / Geschlossen). The CSS exposes a full design token system (signal, pending, clear, alert).

## Resource info

<Note>
  Code accessible: `config.lua`, `dist/server/*.lua` are in `escrow_ignore`. Approximately 1000 lines of Lua + UI. German.
</Note>
