Your AI-Powered Competitive Programming Companion
ELYSIUM makes tracking your competitive programming journey completely seamless. The moment you submit a solution on GeeksforGeeks and it gets accepted, the Elysium Chrome Extension captures the solution, prompts Google's Gemini AI to analyze the logic and complexity, formats it into premium markdown, and uploads the code along with the analysis directly to your private or public GitHub profile.
- 🖥️ Chrome Extension Integration: Built on Manifest V3, using a background
MutationObserverto monitor DOM changes on problem pages and catch the exact moment your solution gets accepted. - 🧠 Google Gemini API Power: Integrates the state-of-the-art Generative AI model to clean source code formatting, estimate time & space complexities (
$O(N)$ ,$O(1)$ , etc.), and write clear logic breakdowns. - 📁 Structured GitHub Repo Syncing: Automatically creates and syncs solutions to a repository named
Elysium-Submissionsunder folders organized by problem title (e.g.Indexes_of_Subarray_Sum/). - 📂 Local Archive Backups: Saves local
.txtcopies of all your correct code submissions in a dedicatedserver/submissions/folder. - 🔐 Secure OAuth Flow: Includes a native, built-in GitHub OAuth authentication route (
/auth/github) to securely connect and save tokens toserver/token.json.
ELYSIUM/
│
├── elysium-extension/ # Chrome Extension (Manifest V3)
│ ├── manifest.json # Extension config & permissions
│ └── content.js # Observers click actions, extracts code, posts to server
│
├── server/ # Backend Server (Node.js & Express)
│ ├── routes/
│ │ ├── auth.js # GitHub OAuth setup & callback
│ │ └── upload.js # Connected account status checking
│ ├── utils/
│ │ └── github.js # File & repo interaction with GitHub APIs
│ ├── gemini.js # Gemini SDK client with custom parsing safety
│ ├── server.js # Main Express server entrypoint
│ ├── .env # Local keys and secrets (git-ignored)
│ └── token.json # Cached GitHub login token (git-ignored)
│
├── assets/ # Graphic assets & animated flow diagrams
│ ├── elysium_banner.png
│ └── elysium_flow.svg
│
└── README.md # Main DocumentationMake sure you have Node.js (version 18+) installed.
-
Clone this repository and navigate to the
server/directory:cd server -
Install the necessary Node packages:
npm install
-
Create a
.envfile insideserver/with the following variables:GEMINI_API_KEY=your_gemini_api_key GITHUB_CLIENT_ID=your_github_client_id GITHUB_CLIENT_SECRET=your_github_client_secret
[!NOTE] You can get your Gemini API Key from Google AI Studio. The GitHub Client ID/Secret can be generated by creating a New OAuth Application in your GitHub Developer settings.
-
Start the server using Nodemon (auto-reloading dev mode):
npm run dev
- Open Google Chrome and go to
chrome://extensions/. - Toggle on Developer mode in the top-right corner.
- Click on the Load unpacked button in the top-left.
- Select the
elysium-extensionfolder in your ELYSIUM project directory.
- Open your browser and navigate to:
http://localhost:3000/auth/github
- Authorize the application on GitHub. Once connected, your authorization credentials will be cached in
server/token.jsonsafely.
When you click the Submit button on a GeeksforGeeks page, a click listener triggers a MutationObserver. It scans the DOM until it detects the message "Problem Solved Successfully".
Once found, it extracts:
- Code contents from Monaco or Ace editors.
- Problem title and URL.
- Metadata (Difficulty, Accuracy, Average Solve Time).
- Prepares a payload and POSTs it to
http://localhost:3000/submission.
The backend passes the payload to Gemini using a strict competitive programming tutor prompt. The AI parses the submission and responds with structured JSON containing:
cleaned_code: Source code with neat whitespace and indentation.metadata: Sub-object containing complexities and topics.explanation_markdown: A highly readable logic guide.
The server validates the local token:
- If a repo named
Elysium-Submissionsdoes not exist on your profile, it creates it programmatically. - It pushes the source code to a dedicated subfolder (
Title/Title.ext). - It generates a detailed
README.mdfor the problem containing the AI complexity breakdown and logic explanation, and commits it alongside the code. - A local
.txtbackup of your code is also saved inside theserver/submissions/folder.