feat: added a roast/hype widget in the dashboard#2537
Open
madsysharma wants to merge 2 commits into
Open
Conversation
|
Thanks for your first PR on DevTrack! 🎉 A maintainer will review it within 48 hours. While you wait:
If you find DevTrack useful, a ⭐ star on the repo is always appreciated — it helps the project grow and attract more contributors! |
GSSoC Label Checklist 🏷️@Umbrella-io — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
Author
|
Hi @Priyanshu-byte-coder, please review this PR. Thanks. |
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.
Summary
This PR introduces the "Roast & Hype" interactive widget to the DevTrack dashboard to increase user engagement and drive organic social sharing. By utilizing the
gemini-1.5-flashmodel, the app can now analyze a user's coding stats (commits, merged PRs, failed goals, top languages) and generate either an uplifting hype message or a hilariously brutal (but SFW) roast.Fixes #2483
What Changed
RoastHypeWidget.tsx, a Tailwind-styled card with a mode toggle (Hype/Roast) and a click-to-copy feature formatted perfectly for sharing on platforms like LinkedIn or X./api/ai/roast/route.tsthat securely accepts aggregated dashboard stats and acts as a proxy to the Gemini API.@google/generative-aiwith strict prompt engineering ensuring outputs stay under 3 sentences and maintain the correct persona.Acceptance Criteria
/api/ai/roastNext.js serverless route to aggregate user stats.gemini-1.5-flashwith strict prompt engineering for safe, concise outputs.How to Test
GEMINI_API_KEY=your_key_hereto your.env.localfile.npm run dev) and navigate to the dashboard.Type of Change
Screenshots / Recordings
Screen.Recording.2026-06-17.091738.mp4
Checklist
console.log, debug code, or commented-out blocksnpm run lintpasses locallynpm run type-check)Accessibility (UI changes only)