docs: move dev quick-reference to Instructions.md
This commit is contained in:
@@ -226,3 +226,34 @@ Verify against [Architekture.md](Architekture.md) and the project structure rule
|
||||
- **Never** push directly to `main` — always use feature branches.
|
||||
- **Never** skip the review step — sloppy code compounds over time.
|
||||
- **Never** leave a task half-done — finish it or revert it.
|
||||
|
||||
---
|
||||
|
||||
## 7. Dev Quick-Reference
|
||||
|
||||
### Start / stop the stack
|
||||
|
||||
```bash
|
||||
make up # start all containers (from repo root)
|
||||
make down # stop all containers
|
||||
make logs # tail logs
|
||||
```
|
||||
|
||||
Backend: `http://127.0.0.1:8000` · Frontend (Vite proxy): `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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user