Starting the dashboard
The dashboard starts automatically alongside the bot when you runsafia start. You do not need to launch it separately.
Setting up authentication
The dashboard uses HTTP Basic Auth. Set your credentials in.env before starting:
ADMIN_USERNAME defaults to admin if not set — only ADMIN_PASSWORD is required to enable authentication.
Dashboard metrics
When you open the dashboard at/, you see four summary cards reflecting activity for the current day:
Total Users
The total number of registered Telegram accounts, plus how many were active in the last 24 hours and the average message count per user.
Messages Today
The number of messages SAFIA has processed since midnight UTC.
Tokens Today
The total LLM tokens consumed today across all user conversations.
New Today
New user registrations recorded on the most recent day.
- Active vs New Users — a line chart comparing daily active users against new registrations over the past 30 days.
- Daily Token Usage — a bar chart showing token consumption per day over the past 30 days.
Navigation
The sidebar links to all four sections of the admin dashboard:| Section | Path | Purpose |
|---|---|---|
| Overview | / | Usage metrics and 30-day activity charts |
| Users | /users | View all registered users and their activity |
| Settings | /settings | Access control, allowlist, and .env editor |
| Knowledge | /knowledge | Upload and manage knowledge base documents |
All dashboard sections share the same HTTP Basic Auth session. You authenticate once per browser session and stay logged in until you close the browser or clear credentials.