docs: add dev quick-reference with API login command to Tasks.md

This commit is contained in:
2026-03-06 18:58:47 +01:00
parent 2eb032ecd4
commit 224a95a85f

View File

@@ -2,6 +2,39 @@
This document breaks the entire BanGUI project into development stages, ordered so that each stage builds on the previous one. Every task is described in prose with enough detail for a developer to begin work. References point to the relevant documentation.
---
## Dev Quick-Reference
### Environment
Start / stop the dev stack (from repo root):
```bash
make up # start all containers
make down # stop all containers
make logs # tail logs
```
Backend is reachable at `http://127.0.0.1:8000` (direct) or via the Vite proxy at `http://127.0.0.1:5173`.
### API Login (dev)
The frontend SHA256-hashes the password before sending it to the API.
The session cookie is named `bangui_session`.
```bash
# Dev master password: Hallo123!
HASHED=$(echo -n "Hallo123!" | sha256sum | awk '{print $1}')
TOKEN=$(curl -s -X POST http://127.0.0.1:8000/api/auth/login \
-H 'Content-Type: application/json' \
-d "{\"password\":\"$HASHED\"}" \
| python3 -c 'import sys,json; print(json.load(sys.stdin)["token"])')
# Use token in subsequent requests:
curl -H "Cookie: bangui_session=$TOKEN" http://127.0.0.1:8000/api/dashboard/status
```
---
1. ✅ DONE — fix ban list 500 error
**Root cause:** `compose.debug.yml` mounted `fail2ban-dev-config` as a named Docker volume