# Admin Dashboard

## Mark a user as admin

In PostgreSQL:

```sql
UPDATE app_user SET is_admin = true WHERE username = 'you@example.com';
```

## Run migrations

```powershell
Get-Content db_migrations\20260118_admin_rbac_views.sql | docker exec -i trading_postgres psql -U trader -d trading_db
```

## Run backend

```powershell
cd backend
.\.venv\Scripts\python -m uvicorn app.main:app --reload --port 8000
```

## Run frontend

```powershell
cd frontend
npm install
npm run dev
```

## Open admin

Visit:

```
http://localhost:3000/admin
```

Non-admin users will see Not Found.
