feat(analytics): add analytics pipeline, LLM insights, and analytics dashboard UI - #50
Merged
Conversation
…ights and analytics dashboard UI
…roved heatmap visualization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a basic analytics ingestion pipeline (Mongo collections), a background aggregation worker, LLM-backed insights generator (OpenAI optional), and a minimal React analytics dashboard with heatmap and collaboration graph placeholders.\n\nFiles added/modified:\n- backend/services/analytics_service.py (ingest + anonymize)\n- backend/services/insights_generator.py (LLM fallback)\n- backend/routes/analytics.py (API endpoints)\n- backend/workers/analytics_aggregation_worker.py (aggregator)\n- backend/config.py (analytics/OPENAI config)\n- backend/services/db.py (analytics collections)\n- backend/routes/socketio_handlers.py (emit join/leave events)\n- backend/routes/submit_room_line.py (emit stroke_created events)\n- frontend/src/pages/Analytics.jsx (dashboard page)\n- frontend/src/components/Analytics/* (InsightCard, Heatmap, CollaborationGraph)\n\nNotes:\n- OpenAI integration is optional; set OPENAI_API_KEY in env to enable.\n- Aggregation worker is simplistic; for high-volume use convert to incremental batch processing.\n- Tests in CI may require additional dev deps (locust, aiohttp, bson) not installed in this environment.\n\nPlease review and let me know if you want richer visualizations (D3), CSV/PDF export, or unit tests added.