# DIY Transcriptomics — Instructor Admin & Analytics Guide A comprehensive manual for instructors, teaching assistants, and course directors to navigate, monitor, and manage the platform via the **Admin Dashboard** (`/admin/`). --- ## 1. Access & Instructor Permissions * **Route:** `/admin/` * **Security & Authentication:** * Access is strictly restricted to authenticated users whose emails are registered on the instructor allow-list in [`js/src/shared/config.js`](/js/src/shared/config.js) (`ADMIN_EMAILS`) and verified server-side in [`firestore.rules`](/firestore.rules) and Firebase Cloud Functions. * Unauthenticated users or non-instructor students navigating to `/admin/` are automatically blocked and redirected to the home page with an unauthorized notification. * Instructor sessions are exempt from student rate limits and are automatically excluded from learning analytics to avoid skewing class statistics. --- ## 2. Navigation Ribbon & Tab Architecture The Admin Dashboard organizes operational tooling into a single-row scroll ribbon with gradient masks, mouse chevrons, and touch gesture support: ``` [ 👥 Student Tracking ] [ ✉️ Contact Messages ] [ 💻 WebR Usage & Error Radar ] [ 🤖 Ask DIY Logs ] [ 🎯 Lab Critic Logs ] [ 📚 Knowledge Base ] [ 🗺️ Gap Analysis ] [ 🧪 Training Hub ] ``` --- ## 3. Tab Operations & Features ### Tab 1: Student Tracking * **Cohort Metrics:** Real-time summary cards displaying Total Enrolled Learners, Active Learners (30-day rolling window), Total Video Watch Time (hours), and Course Completions. * **Student Roster Table:** * Sortable columns: Name, Email, Enrollment Cohort (Virtual vs. In-Person), Joined Date, Progress %, Watch Time, and Last Active. * **Tags & Segmentation:** Assign custom tags (e.g. `TA`, `Honors`, `Audit`, `Lab-Leader`) for cohort filtering. * **Student Audit Drawer:** Clicking any student row opens a deep-dive drawer showing granular video completion timestamps, lab submission history, note counts, and certification review status. ### Tab 2: Contact Messages Inbox * **Student Helpdesk:** Displays all submissions from the public `/contact` form. * **Badge Alerts:** Real-time unread message counter badge on the tab ribbon. * **Defensive Sanitation:** HTML-escaped message body rendering protects against XSS injection. * **Duplicate Cleanup Engine:** One-click utility to detect and purge duplicate form submissions caused by multi-click retries. ### Tab 3: WebR Usage & Common R Error Radar * **Real-Time Telemetry Cards:** 1. *Total Step Completions:* Verified zero-error script executions across curriculum modules. 2. *Active Coding Students:* Number of unique students who executed at least one module. 3. *Custom Data Analyses:* Students importing and analyzing proprietary count matrices. 4. *R Errors Encountered:* Runtime exceptions trapped in the browser R environment. 5. *WebR AI Inquiries:* "Ask DIY" code queries initiated from within the WebR editor. * **Cohort Progress Matrix:** Real-time student-by-step matrix tracking milestone progress across Steps 0–9 plus a dedicated **My Data** column. Hover tooltips detail action counts, sample sizes, and timestamps. * **Common R Error Radar:** Ranked aggregation of top execution errors encountered across the class (e.g., missing objects, syntax issues, package loading problems), highlighting curriculum friction in real-time. * **WebR Ask DIY Query Feed:** Live feed of student questions asked directly inside the R editor, categorized by source trigger (`[Plot Vision]`, `[Error Diagnosis]`, `[Code Selection]`, `[Console Output]`). ### Tab 4: Ask DIY Logs & Semantic Explorer * **Query Auditing:** Complete searchable record of student queries, AI responses, timestamps, and model latency. * **Butterfly Divergence Vocabulary:** Semantic visualization showing lexical differences in student queries before vs. after milestone completion. * **2D Semantic Topic Clustering:** Visual clustering of student questions powered by dimensionality reduction on vector embeddings. * **Rating & RLHF Controls:** Review student 👍/👎 ratings and record instructor gold-standard overrides. ### Tab 5: Lab Critic Logs * **Multimodal Critique Auditing:** Log of all student submissions evaluated by the automated Figure and Repository Critic. * **Interactive Figure Viewer:** Side-by-side inspection of student draft figures against the rubric criteria and class average benchmarks. * **Human Calibration:** Instructors can adjust AI scores directly to build supervised fine-tuning (SFT) training datasets. ### Tab 6: Knowledge Base & Vector Indexing * **Cross-Curriculum Vector Embeddings:** Manages the 768-dimensional embedding index (`gemini-embedding-001`) stored in `/course_knowledge_embeddings`. * **One-Click Re-Indexing:** "⚡ Re-index All Course Materials" button regenerates embeddings across all lectures, transcripts, and canonical R scripts in 30–60 seconds. * **Global Course Knowledge:** Master script uploader allowing instructors to update the global R reference code used by the AI assistant. * **Gold Standard Reference Library:** Uploader and JSON spec editor for ideal patterns and anti-patterns used by the Figure Critic. ### Tab 7: Curriculum Gap Analysis (Friction Map) * **Heatmap Matrix:** Visual matrix where X-axis = course modules (chronological) and Y-axis = core concepts. Color intensity (Green $\to$ Yellow $\to$ Red) indicates question density. * **Canonical Friction Topics:** Instructors can promote raw AI question clusters into permanent, tracked **Canonical Topics** (marked with ). * **Multi-Topic Synthesis:** Select multiple emerging confusion topics and synthesize them into a single comprehensive topic using Gemini. ### Tab 8: Training Hub & Data Portability * **Triple-Loop RLHF Dashboard:** Review student feedback, group report diffs, and calibration data. * **One-Click Cloud Backup:** Export all user profiles and AI activity logs directly to timestamped JSON archives in Google Cloud Storage (`backups/training-data/` and `backups/user-data/`). * **Local Redundancy:** CLI instructions to sync cloud backups to local cold storage using `gcloud storage cp`. --- ## 4. Cohort Analytics & Resolution Diagnostics ### Cohort Lifespan & Engagement Decay Visualizes student question volume relative to signup date (in weeks or days), enabling instructors to monitor drop-off rates and identify when virtual learners lose momentum. ### Session-Level Resolution Diagnostics Measures whether student AI interactions successfully resolve obstacles or indicate disengagement: * **Active Sessions:** Student asked questions *before* completing the corresponding milestone. * **Unblocked (<24h):** Student achieved the milestone within 24 hours of their last query. * **Delayed (>24h):** Student achieved the milestone, but required >24 hours. * **Abandoned:** Student asked questions but never completed the milestone. * **Formula:** $$\text{Resolution Efficiency \%} = \frac{\text{Unblocked Sessions} + \text{Delayed Sessions}}{\text{Active Sessions}} \times 100$$ * **Bias Mitigation:** Operating at the unique student-task session level prevents power users with high query volumes from distorting class retention statistics. --- *Associated Guides:* [`docs/COURSE_MAINTENANCE_AND_CONTENT_GUIDE.md`](/docs/COURSE_MAINTENANCE_AND_CONTENT_GUIDE.html), [`docs/AI_ARCHITECTURE_AND_RLHF.md`](/docs/AI_ARCHITECTURE_AND_RLHF.html), [`docs/FIREBASE_BACKEND_SCHEMA.md`](/docs/FIREBASE_BACKEND_SCHEMA.html)