How dhirajb05/opensprint works
Purpose and Entry Points
GitHub Roast Machine is a React/Vite single-page application backed by Express serverless/API handlers. A user submits a GitHub username, receives an AI-generated roast, career score, developer archetype, meme content, and a downloadable/shareable card. Frontend bootstraps at Github-Roast/Profile_Analyser/src/main.jsx; routing and app composition begin in Github-Roast/Profile_Analyser/src/App.jsx. The local backend entry point is Github-Roast/Profile_Analyser/server/index.js; Vercel integration is represented by Github-Roast/Profile_Analyser/api/index.js and Github-Roast/Profile_Analyser/vercel.json.
Frontend Interaction Flow
The landing screen collects the target username and roast mode in Github-Roast/Profile_Analyser/src/pages/Landing.jsx. The app transitions through terminal-style progress UI in Github-Roast/Profile_Analyser/src/pages/Loading.jsx, then presents generated content in Github-Roast/Profile_Analyser/src/pages/Results.jsx. Client navigation is React Router-based, while shared retro visual styling is concentrated in Github-Roast/Profile_Analyser/src/index.css and Github-Roast/Profile_Analyser/src/App.css.
GitHub Profile Acquisition Boundary
The backend’s GitHub integration is isolated in Github-Roast/Profile_Analyser/server/routes/github.js. This route fetches and shapes public GitHub profile/repository activity into input suitable for analysis. It forms the external-data boundary: frontend requests backend data rather than directly relying on GitHub from browser code, allowing credentials, normalization, rate-limit behavior, and API failures to remain server-side.
AI Roast Generation and Caching
Github-Roast/Profile_Analyser/server/routes/roast.js owns the main analysis stage: it turns GitHub-derived facts plus the chosen tone (Friendly, Sarcastic, or Savage) into the roast, score, and archetype through Groq’s Llama 3.1 8B Instant API. This route also implements the stated 24-hour caching behavior, using in-memory cache by default and optionally Vercel KV/Redis in production. Required service credentials and deployment-time configuration are indicated by Github-Roast/Profile_Analyser/server/.env.example.
Meme Generation Stage
Github-Roast/Profile_Analyser/server/routes/meme.js is a separate generation boundary for selecting meme templates and producing roast-specific captions. Keeping memes outside the primary roast route allows the results experience to compose optional/generated visual content independently of profile acquisition and core roast analysis. Rendered meme editing is handled by Github-Roast/Profile_Analyser/src/pages/MemeEditor.jsx.
Results, Export, and Sharing
Github-Roast/Profile_Analyser/src/pages/Results.jsx composes roast output, score, archetype, and inline meme results for presentation and social sharing. Github-Roast/Profile_Analyser/src/pages/RoastCard.jsx provides the styled, downloadable roast-card representation. These are presentation/export boundaries: generated backend payloads become user-controlled visual artifacts without moving AI or GitHub API access into the client.
Runtime and Deployment Topology
The frontend runs as a Vite-built React 19 application (Github-Roast/Profile_Analyser/package.json). The backend runs on Node.js with Express (Github-Roast/Profile_Analyser/server/package.json) during local development, while Vercel routes deployment through Github-Roast/Profile_Analyser/api/index.js. Material external services are GitHub’s API for source profile data, Groq for LLM generation, and optional Vercel KV Redis for persistent production caching.
Main entry points: roast.js Roast analysis · Loading.jsx Analysis progress · Results.jsx Results experience · index.js Vercel API adapter
Components 17
React SPA
- Vite React bootstrap
Github-Roast/Profile_Analyser/src/main.jsx - App routing
Github-Roast/Profile_Analyser/src/App.jsx - Landing input
Github-Roast/Profile_Analyser/src/pages/Landing.jsx - Analysis progress
Github-Roast/Profile_Analyser/src/pages/Loading.jsx - Results experience · Presents roast, score, archetype, and meme output.
Github-Roast/Profile_Analyser/src/pages/Results.jsx - Meme editor
Github-Roast/Profile_Analyser/src/pages/MemeEditor.jsx - Roast card
Github-Roast/Profile_Analyser/src/pages/RoastCard.jsx
API Backend
- Local Express server
Github-Roast/Profile_Analyser/server/index.js - Vercel API adapter
Github-Roast/Profile_Analyser/api/index.js - GitHub acquisition · Fetches and normalizes public profile and repository activity.
Github-Roast/Profile_Analyser/server/routes/github.js - Roast analysis · Generates roast, career score, and archetype for the selected tone.
Github-Roast/Profile_Analyser/server/routes/roast.js - 24-hour cache · Uses memory locally and can use Vercel KV in production.
- Meme generation · Selects templates and creates roast-specific captions.
Github-Roast/Profile_Analyser/server/routes/meme.js
External Services
- GitHub API
- Groq Llama 3.1 8B
- Vercel KV Redis
- Vercel deployment
Github-Roast/Profile_Analyser/vercel.json
Connections 20
- Vite React bootstrap → App routing: mounts
- App routing → Landing input: starts at
- Landing input → Analysis progress: submits username and mode
- Analysis progress → Results experience: analysis complete
- Results experience → Meme editor: edits meme
- Results experience → Roast card: exports or shares
- Analysis progress → GitHub acquisition: requests profile facts
- Analysis progress → Roast analysis: requests roast analysis
- Results experience → Meme generation: requests meme content
- Local Express server → GitHub acquisition: serves
- Local Express server → Roast analysis: serves
- Local Express server → Meme generation: serves
- Vercel API adapter → GitHub acquisition: routes to
- Vercel API adapter → Roast analysis: routes to
- Vercel API adapter → Meme generation: routes to
- GitHub acquisition → GitHub API: fetches public activity
- Roast analysis → 24-hour cache: reads and writes
- Roast analysis → Groq Llama 3.1 8B: generates analysis
- 24-hour cache → Vercel KV Redis: persists in production
- Vercel deployment → Vercel API adapter: deploys