Skip to content

TheGreatPratyush/CF_problem_analysis_using_ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 CF AI Analyzer – Chrome Extension

A Chrome Extension that analyzes accepted Codeforces submissions and generates structured insights such as:

Editorial Concept

Concept Used in Your Code

Time Complexity

Optimization Suggestions

The extension demonstrates Chrome Extension MV3 architecture and AI integration flow.

🧠 How It Works

Detects accepted submission page on Codeforces.

Extracts:

Problem name

Source code

Language

Sends extracted data to background service worker.

Background processes and stores structured analysis.

Popup displays analysis in a clean UI.

Architecture flow:

content.js → background.js → chrome.storage → popup (script.js)

🛠 Tech Stack

JavaScript

Chrome Extensions (Manifest V3)

Service Workers

DOM Manipulation

chrome.runtime Messaging API

chrome.storage API

📂 Demo Version

The demo-version/ folder contains a working version using simulated AI responses.

This version:

Does NOT require an OpenAI API key.

Demonstrates full architecture flow.

Safe to run without any external API setup.

🔐 OpenAI Integration Version

The openai-version/ folder contains a version that supports real OpenAI API integration.

To enable real AI:

Open config.js

Add your OpenAI API key:

const OPENAI_API_KEY = "your-openai-key-here";

Reload the extension.

📦 Installation

Download or clone the repository.

Open Chrome and go to:

chrome://extensions

Enable Developer Mode.

Click “Load unpacked”.

Select either:

demo-version/

OR openai-version/

Open any accepted submission on Codeforces. "...............IMPORTANT TO PAY ATTENTION...................." ("HERE SUBMISSION PAGE MEASN GO ON CODEFORES CLICK ON YOUR PROFILE GO TO SUBMISSIONS THEN CLICK ON ANY SUBMITTED SOLUTION THEN SEE THERE IS ONE "#" SIGN JUST BEFORE COPY OPTION CLICK ON THAT THAT WILL LAND YOU ON A PAGE WHERE THIS EXTENSION WORKS ")

Click “Analyze Solution”.

Open extension popup to view analysis.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors