docs: Analytics feature documentation for all 3 phases - #29
Merged
Conversation
- docs/analytics/overview.md — master overview with architecture, data flow, API reference, and phase links - docs/analytics/phase1-backend-mongodb-models-api.md — MongoDB models, aggregation utils, 7 API endpoints, Supabase sync hooks - docs/analytics/phase2-frontend-analytics-page.md — AnalyticsPage, TemplateDetailAnalytics, CSS, routing & sidebar nav - docs/analytics/phase3-github-role-techstack-analysis.md — githubAnalyzer utility, role classification, tech stack extraction, API endpoint, frontend section, rate limiting
✅ Deploy Preview for leddger-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
… add Phase 4 docs Test suite (server/tests/analytics.test.js): - 6 TemplateData model tests (creation, unique constraints, enums, updatedAt) - 3 TemplateSubmission model tests (creation, unique, Mixed type storage) - 3 overview endpoint tests (empty stats, correct counts, user isolation) - 3 templates list tests (empty, with counts, user isolation) - 3 template detail tests (404, field stats, partial completion rates) - 3 submissions pagination tests (page 1, page 2, empty) - 2 field-analysis tests (stats, 404) - 2 trends tests (with data, zero counts) - 2 sync endpoint tests (Supabase sync, idempotency) - 11 githubAnalyzer unit tests (classifyRole x7, extractTechStack x4) - 3 GitHub analytics endpoint tests (no usernames, no submissions, non-existent) Bug fix: - TemplateData pre-save hook: removed next() callback for Mongoose 9.x compat Docs: - docs/analytics/phase4-testing-and-polish.md with full test catalog - Updated overview.md with Phase 4 in TOC and PR table
Conflicts resolved: - server/utils/githubAnalyzer.js: kept origin/main version (return cached directly) - server/index.js: kept both comment lines for GitHub analytics endpoint All 41 analytics tests pass after merge.
This was referenced Aug 15, 2026
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.
Analytics Feature Documentation
Adds comprehensive documentation for the analytics feature across all 3 phases implemented in PRs #26, #27, and #28.
Files Added
Coverage
Each phase doc includes: