# Module — Dashboard

**Type**: Core (always enabled)

Provides the main dashboard with a configurable, per-user widget grid.

## Features

- Drag-and-drop widget reordering (saved per user in SQLite)
- Add and remove widgets via modal
- Widget layout persisted across sessions

## Widget Types

| Type | Description |
|------|-------------|
| `shortcut` | Clickable link card (icon + label + URL) |
| `lxc_status` | Live status of a specific LXC container |
| `metrics` | Host CPU/RAM/disk summary |

## API Endpoints

| Method | Path | Auth | Description |
|--------|------|------|-------------|
| GET | `/api/dashboard/widgets` | JWT | Get current user's widget layout |
| PUT | `/api/dashboard/widgets` | JWT | Save widget layout |

## Widget Layout Format

```json
[
  { "id": "w1", "type": "shortcut", "config": { "label": "Proxmox", "url": "https://proxmox.example.com", "icon": "server" } },
  { "id": "w2", "type": "lxc_status", "config": { "vmid": 100 } },
  { "id": "w3", "type": "metrics", "config": {} }
]
```

## Database

Layouts are stored in the `user_widgets` table, keyed by user ID.

## License

MIT — see [LICENSE](../../LICENSE)
