How atharvananavate/gfg-to-github works
GfG to GitHub is a Chrome extension that links a GitHub account and repository, then watches GeeksForGeeks submissions and commits successful solutions. The workflow captures problem metadata and code, writes organized README and language-specific files, and updates difficulty statistics shown in the popup. Onboarding supports creating or linking a repository; the homepage and popup also provide navigation and theme controls. The sampled scripts show the core message, storage, and API interactions; README-described capabilities are included where wiring was not sampled.
Main entry points: geeksForGeeks.js Submission detection · background.js Extension message handler · popup.js Popup dashboard logic · index.html Homepage
Components 16
Onboarding
- Repository onboarding
scripts/index.js - OAuth launch
scripts/githubAuthentication.js - OAuth callback
scripts/localSetup.js
Submission workflow
- Submission detection
scripts/geeksForGeeks.js - Code extraction
scripts/extractCode.js - Injected-node cleanup
scripts/nodeDeletion.js
Extension interface
- Popup UI
popup.html - Popup dashboard logic
popup.js - Homepage
index.html - Theme toggle
scripts/darkmode.js - Interactive background
scripts/particle.js
Browser and services
- Extension message handler
scripts/background.js - Extension local storage
Other components
- Extension user
- GeeksForGeeks site
- GitHub API
Connections 29
- Extension user → Popup UI: opens
- Popup UI → Popup dashboard logic: runs
- Popup dashboard logic → Extension local storage: reads state
- Popup dashboard logic → GitHub API: validates token
- Extension user → OAuth launch: starts login
- OAuth launch → GitHub API: opens authorization
- GitHub API → OAuth callback: redirects
- OAuth callback → GitHub API: exchanges code
- OAuth callback → Extension message handler: sends credentials
- Extension message handler → Extension local storage: saves credentials
- Extension message handler → Homepage: opens after login
- Extension user → Homepage: configures repository
- Homepage → Repository onboarding: runs
- Repository onboarding → GitHub API: creates or checks repository
- Repository onboarding → Extension local storage: saves repository link
- Extension user → GeeksForGeeks site: solves problem
- GeeksForGeeks site → Submission detection: reports submission
- Submission detection → Extension message handler: requests code extraction
- Extension message handler → Code extraction: injects script
- Code extraction → Submission detection: exposes solution
- Submission detection → GitHub API: commits solution and README
- Submission detection → Extension local storage: reads upload state
- Submission detection → Extension local storage: updates statistics
- Submission detection → Extension message handler: requests cleanup
- Extension message handler → Injected-node cleanup: injects script
- Popup dashboard logic → Theme toggle: initializes theme
- Theme toggle → Extension local storage: persists preference
- Homepage → Interactive background: renders canvas
- Popup dashboard logic → Homepage: links to