summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CLAUDE.md4
-rw-r--r--devel-phases-next.md4
-rw-r--r--docs/meshbay-draft-v4.md23
3 files changed, 25 insertions, 6 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 518dcea..18e4b7e 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -173,6 +173,10 @@ SFR residential Fedora 44 → meshbay.org OVH VPS:
| Web SPA | `static/app.js` | Phase 9.6 — Preact + preact-router |
| File download (large) | `static/app.js` | File System Access API (`showSaveFilePicker`) — stream to disk |
| i18n (browser) | `static/i18n.js` | `t()` lookup, ESM, localStorage lang selection |
+| Admin API (hub) | `meshbay_hub.api.admin` | Phase 10.2 — user/group mgmt, audit logs, stats |
+| Admin UI (browser) | `static/app.js` | Phase 10.3–10.4 — AdminPage component, 5 tabs |
+| Auth dependencies | `meshbay_hub.api.deps` | `require_admin`, `require_moderator`, `get_current_user` |
+| Site overlay | `site/` | Phase 10.1 — landing, about, downloads (meshbay.org-specific) |
| Demo scripts | — | `QE/demo-v1/*.py`, `QE/demo-v2/*.py`, `QE/demo-v3/*.py` (not versioned) |
## meshbay.org server (état cible)
diff --git a/devel-phases-next.md b/devel-phases-next.md
index f54d0bf..aa6608d 100644
--- a/devel-phases-next.md
+++ b/devel-phases-next.md
@@ -1,6 +1,6 @@
# MeshBay — Next Implementation Phases
-> Base: Phases 1–9 complete. 132 tests. Web SPA live on meshbay.org.
+> Base: Phases 1–10.4 complete. 147 tests. Web SPA + admin panel live on meshbay.org.
> Architecture reference: docs/meshbay-draft-v4.md
> First security review: first-review.md (2026-08-10)
@@ -202,7 +202,7 @@ ICE/STUN handles all tested NAT types automatically.
## Phase 10 — meshbay.org site + admin/moderation UI
-Commit: TBD — X files, +Y/−Z lines, 147 tests.
+Commit: 8fa298e — 15 files, +1646/−34 lines, 147 tests.
**Objective:** meshbay.org becomes both a production hub and the project's public
website, with admin/moderation interfaces and user-facing features.
diff --git a/docs/meshbay-draft-v4.md b/docs/meshbay-draft-v4.md
index 343fd26..45b6381 100644
--- a/docs/meshbay-draft-v4.md
+++ b/docs/meshbay-draft-v4.md
@@ -1,7 +1,7 @@
# MeshBay — Architecture Draft v4
-> Status: active development — Phases 1–8 complete, Phase 9.1–9.5 validated, 123 tests.
-> Changes from v3: web client transport (WebRTC DataChannel), web UI architecture, hub roles (admin/moderator), hub mirror design, browser-specific NAT traversal, chat storage clarified, Phase 8 security items resolved.
+> Status: active development — Phases 1–10.4 complete, 147 tests.
+> Changes from v3: web client transport (WebRTC DataChannel), web UI architecture, hub roles (admin/moderator), hub mirror design, browser-specific NAT traversal, chat storage clarified, Phase 8 security items resolved, Phase 10 site overlay + admin/moderation UI.
---
@@ -233,10 +233,25 @@ Complete table of validated and planned hub REST API endpoints. Endpoints marked
| Method | Path | Auth | Description | Status |
|---|---|---|---|---|
-| POST | `/v1/revoke/user/{user_id}` | Access token (admin) | Revoke a user account | [TBD] |
-| POST | `/v1/revoke/group/{group_id}` | Access token (admin) | Revoke a group | [TBD] |
+| POST | `/v1/admin/revoke` | Access token (admin) | Revoke a user or group | ✓ Phase 8 |
| GET | `/v1/revoke/denylist` | None | Current `jti` denylist for active access tokens | [TBD] |
+**Admin / moderation:**
+
+| Method | Path | Auth | Description | Status |
+|---|---|---|---|---|
+| GET | `/v1/users/me` | Access token | Current user info (id, username, role, status) | ✓ Phase 10 |
+| GET | `/v1/admin/stats` | Moderator+ | Hub stats (user/group/node counts, online nodes) | ✓ Phase 10 |
+| GET | `/v1/admin/users` | Moderator+ | List users (paginated, searchable by username) | ✓ Phase 10 |
+| GET | `/v1/admin/users/{user_id}` | Moderator+ | User detail (email, role, status, group count) | ✓ Phase 10 |
+| PATCH | `/v1/admin/users/{user_id}` | Moderator+ | Update user role or status | ✓ Phase 10 |
+| GET | `/v1/admin/groups` | Moderator+ | List all groups with member count | ✓ Phase 10 |
+| PATCH | `/v1/admin/groups/{group_id}` | Moderator+ | Update group status | ✓ Phase 10 |
+| GET | `/v1/admin/logs` | Moderator+ | IP audit logs (filterable by event, user_id) | ✓ Phase 10 |
+| GET | `/v1/admin/blocklist` | Admin | List blocked content hashes | ✓ Phase 8 |
+| POST | `/v1/admin/blocklist` | Admin | Manually block a content hash | ✓ Phase 8 |
+| DELETE | `/v1/admin/blocklist/{hash}` | Admin | Unblock a content hash | ✓ Phase 8 |
+
### 4.2 Mesh Node
A local program running on the host user's machine. The node is the actual host of all content.