Repository: sourcerer-app
Review Target: Staged changes for Multi-Slot Hall of Fame, Real-Time Sync Tracker, Responsive Mobile Navigation, Technology Library Expansion, and Catalog Enhancements.
The changes introduce major functional and UX enhancements to the Sourcerer platform:
- Multi-Slot Hall of Fame Widget & Avatar Badges: A modular 8-slot Hall of Fame widget algorithm (Top, Trending, New, and Legend/Empty slots) with individual SVG avatar badges, GitHub profile matching, token handling, and repository management endpoints.
- Framework & Library Catalog Expansion: Expansion of
technologies.jsonwith 22,000+ technology and library definitions across multiple languages (C++, Go, Python, Java, JavaScript, Rust, Solidity, etc.) and deep indexing for import token resolution. - Real-Time Repository Sync Tracker: Background sync progress tracking with in-flight deduplication, batch tracking (
SyncTracker), HTMX polling status partials (/dashboard/sync-status), and REST API (/api/sync-status). - Responsive Mobile Navigation & Slide-Out Drawer: A modern mobile navigation bar, hamburger toggle, and slide-out navigation drawer with authenticated user profiles, quick sync actions, and smooth animations.
- Enhanced Library Catalog & Detail UI: Language pill filters, smart token truncation with limiters, multi-tab contributor rankings (Top, Trending, New), and dual embed code generators (Avatar Row & Summary Card).
- Developer Tooling & Configuration: Docker Compose memory tuning for local development,
Makefileconvenience commands, and sample profile badge visual assets.
- Algorithm Quality: Correctly implements the slot distribution rules: up to 3 New contributors, up to 4 Trending contributors, and remaining slots filled by Top contributors with deduplication.
- SVG Generation: Generates standalone, pixel-perfect SVG contributor tiles with badge colors (
BadgeColorNew,BadgeColorTrending,BadgeColorTop), commit counts, and fallback initials when avatars are unavailable. - Privacy & Sanitization: Contributor emails are sanitized/masked; profile URLs prefer verified Sourcerer profile links before falling back to repository routes.
- Empty & Edge Cases: Fallback handling for repositories with 0 languages or missing statistics renders clean empty-state notices rather than broken SVG markup.
- Thread Safety:
SyncTrackerprotects the user status map with async.RWMutex, andinFlightReposdeduplicates jobs concurrently queued or executing withinFlightMu. - Database Fallback: If an in-memory session is not active,
GetStatusfalls back to querying the database for the most recentlast_synced_attimestamp. - HTMX Integration: Provides smooth outerHTML swaps every 2 seconds during active syncing and every 10 seconds during idle state.
3. Mobile Navigation & Responsive Design (backend/templates/_shell.html, backend/static/app.css, backend/seo.go)
- Accessibility & UX: Includes ARIA attributes (
aria-expanded,aria-label), keyboard navigation (Escape key dismissal), and backdrop blur overlays. - Navigation Context:
navFor()correctly extracts and provides authenticated user names and masked emails to the template context.
4. Technology Dataset & Catalog Filtering (backend/data/technologies.json, backend/templates/libraries.html, backend/templates/library_detail.html)
- Performance: Implemented
limitTokens,hasMoreTokens, andmoreTokenCounttemplate helper functions to prevent DOM bloat when rendering libraries with thousands of import symbols. - Client-Side Filtering: JavaScript functions utilize clean
for ... ofiteration over DOM node lists and dataset attributes without performance degradation.
We will commit these changes as atomic, logical feature commits following Conventional Commits format:
feat(data): expand technology and library database with 22,000+ definitions- Files:
backend/data/technologies.json
- Files:
feat(fame): implement multi-slot hall of fame widget, avatar badges, and management APIs- Files:
backend/fame.go,backend/fame_test.go,backend/main.go(fame routes & helpers),backend/seo.go
- Files:
feat(sync): add real-time repository sync tracker, HTMX status banner, and API- Files:
backend/worker.go,backend/sync_test.go,backend/templates/sync_status.html,backend/templates/repositories.html,backend/main.go(sync routes)
- Files:
feat(ui): add responsive mobile navigation header and slide-out drawer menu- Files:
backend/templates/_shell.html,backend/seo.go(NavMetauser fields),backend/static/app.css(mobile nav styles)
- Files:
feat(libraries): enhance library catalog with language filter pills, token limiting, and embed tabs- Files:
backend/templates/libraries.html,backend/templates/library_detail.html,backend/templates/repo.html,backend/templates/profile.html,backend/templates/repo_cards.html,backend/templates/index.html,backend/security_test.go,backend/main.go(template funcs & library handlers),backend/static/app.css(fame row & library styles)
- Files:
chore(dev): add Makefile, local docker compose resource limits, and sample assets- Files:
Makefile,docker-compose.local.yml,README.md,backend/static/sample.png,backend/static/sample.svg,code_review.md
- Files: