Things are looking good. Now have a tools and setting pop up thing.

This commit is contained in:
Scott Idem
2025-12-15 18:07:41 -05:00
parent e16a28cc29
commit a7bf03e449
2 changed files with 295 additions and 96 deletions

View File

@@ -99,3 +99,35 @@ This pattern isolates API logic from data shaping logic, making the code more mo
- The `static/idaa_novi_iframe_jitsi_meeting.html` file acts as a bridge, taking Novi-templated user variables (`<%=Novi.User.*%>`) and passing them as URL parameters to the Svelte application (`/idaa/video_conferences`).
- **User Feedback:** An attempt to simplify this bridge by removing a client-side `fetch` call for user details was reverted by the user. This indicates that the original, more complex logic (which constructs `full_name` from `FirstName` and `LastName`) is necessary. This is an important lesson in not over-simplifying third-party integration code without full context.
- The bridge was updated to include an interactive UI for setting Jitsi parameters (e.g., sound settings, moderator settings) and dynamically rebuilding the iframe `src`.
---
## Jitsi "God Mode" Live Stats Architecture (2025-12-15)
### Goal
For the IDAA client, create an administrative dashboard ("god mode") to monitor live Jitsi meetings—including meeting duration, participant lists, and moderator roles—without needing to join the meetings directly. This is primarily for ensuring meetings are running correctly and for data collection.
### Architectural Decision
A purely client-side approach using the Jitsi External API is not feasible, as it requires being a participant in the meeting. A server-side solution is necessary.
After considering a log-parsing approach, the following hybrid architecture was chosen as the most robust and scalable solution.
1. **Server-Side XMPP Bot (Stats Collector):**
* A new, lightweight backend service will be created (likely in Python or Node.js).
* This service will act as a bot, using special credentials to connect to the Jitsi instance's main XMPP server (Prosody).
* The bot will automatically and invisibly join the Multi-User Chat (MUC) for each active conference. It will not process any audio or video, only presence and metadata.
* By listening to real-time XMPP events, it will track participant joins, leaves, and role changes.
2. **Database Integration:**
* As the XMPP bot receives events, it will write structured data directly into the Aether system's database (e.g., a `jitsi_events` table).
* This provides two key benefits: a source for the live dashboard and a clean, persistent historical record for future analysis, avoiding the fragility of parsing raw text logs.
3. **API Endpoint:**
* A new, secure endpoint (e.g., `/api/jitsi/live-stats`) will be added to the FastAPI backend.
* This endpoint will query the database to get the current state of all active meetings.
4. **Frontend Admin Dashboard:**
* A new, access-controlled page (e.g., `/admin/jitsi-stats`) will be built in the Svelte application.
* This page will periodically fetch data from the new API endpoint to display a live overview of all ongoing meetings.
### Rationale
This approach was chosen over log-parsing because the XMPP protocol is a stable, official API for Jitsi, making the solution less likely to break on future Jitsi updates. It provides true real-time data for the live dashboard while simultaneously creating a valuable, structured dataset for historical reporting.