Version: 1.1 Author: Shyam Jaiswal Status: Draft Target Platform: Chrome (Manifest V3), Firefox (Future) Repository Visibility: Public License: MIT
CommitCode is a privacy-first browser extension that automatically syncs accepted coding problem submissions from coding platforms like LeetCode to GitHub.
Unlike existing solutions, CommitCode prioritizes:
- Minimal permissions
- Transparent security
- Reliability
- Customization
- Open-source architecture
- Zero telemetry
The goal is to become the most trusted and feature-rich coding sync extension available.
Current solutions suffer from several issues:
- GitHub OAuth requests access to ALL repositories.
- Private repositories become accessible.
- Organization repositories may also become accessible.
- Users cannot limit permissions.
LeetCode frequently updates its UI.
Existing extensions often break whenever:
- DOM changes
- CSS selectors change
- Submission page changes
Users lose weeks or months of submissions.
Current solutions offer very few options.
Users cannot easily customize:
- Folder structure
- Commit messages
- Repository organization
- Version history
- README generation
Primary Goals
✅ Privacy-first ✅ Reliable syncing ✅ Open Source ✅ One-click setup ✅ Minimal GitHub permissions
Secondary Goals
- Multi-platform support
- Beautiful UI
- Analytics dashboard
- Study companion
- Backend server
- Cloud storage
- User accounts
- Paid plans
- AI code generation
- Mobile application
- Formal accessibility audit (standard semantic HTML / keyboard-operable popup is table stakes, not a tracked feature)
The extension should never request permissions it does not need.
All processing happens inside the browser. No external server.
Every line of code should be auditable.
Every coding platform should be implemented as a plugin.
Needs
- GitHub portfolio, consistent contribution history
- Organized repository
- Automatic uploads without needing to know Git
Pain Points
- Forgets to upload solutions
- Doesn't know Git
Needs
- Version history, multiple languages, tags, notes
- No OAuth, no tracking, fine-grained GitHub access
Detect accepted submissions. Automatically upload solution.
User selects repository once. No repository creation required.
Instead of OAuth, use:
- Repository Access: Only Selected Repository
- Permissions: Contents — Read & Write. Nothing else.
Automatically update README after every solve. Include:
- Total solved
- Difficulty counts
- Language
- Date solved
- Table of problems
Default:
Solved: Two Sum
Difficulty: Easy
Language: Java
Runtime: 0ms
Users can customize templates.
Users choose one organizing scheme:
| Scheme | Example |
|---|---|
| Difficulty | Easy/, Medium/, Hard/ |
| Topic | Arrays/, Graphs/, DP/, Trees/ |
| Language | Java/, CPP/, Python/ |
| Problem Number | 0001/, 0002/, 0003/ |
| Flat | all files at repository root |
Every upload stored locally.
Example:
Today
✔ Two Sum
✔ Binary Search
✖ LRU Cache
Reason: GitHub Rate Limit
Failed uploads stored locally. Retry automatically.
If nothing changed, skip upload.
Button: Sync Current Problem
Every re-submission of a previously solved problem is uploaded as a new suffixed file — no overwrite, no user toggle:
Two Sum_v1.cpp
Two Sum_v2.cpp
Two Sum_v3.cpp
The suffix always increments from the last version found in the repository for that problem+language pair. README table links to the latest version by default.
Users can change repository, disconnect repository, or switch repositories.
Fetch all past accepted submissions and upload them retroactively, using the same _v1, _v2 suffix scheme for any problem with multiple historical submissions.
LeetCode, GeeksforGeeks, Codeforces, CodeChef, HackerRank, AtCoder
Each problem gets a notes.md containing: Idea, Mistakes, Complexity, Revision Notes
Generated and stored locally only.
Charts for: problems solved, difficulty, topics, languages, acceptance rate, daily/weekly streak, monthly activity.
Remind users of problems not revisited in 30 / 60 / 90 days.
Store the same problem solved in multiple languages (Java, Python, C++, Rust) side by side rather than as versions.
OAuth is intentionally avoided — it requires broad repository permissions. Instead: PAT → Single Repository → Contents Read & Write only.
No requests except to the GitHub API and the coding platform.
No Google Analytics, no Mixpanel, no telemetry, no tracking.
Encrypted, Chrome Storage API. Never transmitted.
Users can inspect every API request the extension makes.
Browser
├── Popup UI
├── Settings
├── Content Scripts
├── Background Worker
├── Storage
└── GitHub Client
↓
GitHub REST API
↓
Repository
src/
├── background/
├── content/
├── github/
├── platforms/
│ ├── leetcode/
│ ├── gfg/
│ └── codeforces/
├── storage/
├── utils/
├── popup/
├── options/
└── assets/
Every platform implements:
interface PlatformAdapter {
detectSubmission()
extractProblem()
extractCode()
extractLanguage()
extractDifficulty()
extractMetadata()
}
Problem
id, title, difficulty, language, runtime, memory,
submissionTime, tags, companyTags, code, url, version
Settings
repository, folderStructure, commitTemplate,
autoSync, readmeEnabled
(versionMode removed — versioning is now always-on with auto-incrementing suffixes, not a user setting.)
Header → Statistics → Table
| # | Problem | Difficulty | Language | Date | Version |
|---|
Introduction, Security Promise, Setup
PAT, Repository, Test Connection
Sync Status, Statistics, Logs
Repository, Folder Structure, README, Commit Template, Retry Queue, Advanced
| Condition | Response |
|---|---|
| GitHub Rate Limit | Retry with backoff |
| Network Failure | Queue for retry |
| Repository Deleted | Notify user |
| Invalid Token | Prompt to reconnect |
V1 — LeetCode, GitHub Sync, README, PAT, Logs, Retry Queue, Duplicate Detection, Version History, Import Existing History, Multi Platform (GeeksForGeeks, HackerRank)
V1.5 / V2 — Statistics Dashboard, Study Notes, Revision Planner, Multi-language Solutions, AI Explanation
V3 (not scoped) — Plugin Marketplace, Self-hosted Sync, VS Code Companion, Mobile Companion — revisit after V2 ships, no commitments made in this document.
| Existing Extensions | CommitCode |
|---|---|
| OAuth, broad permissions | Fine-Grained PAT, single repository |
| Limited customization | Fully configurable folder/commit/README |
| Few platforms | Plugin architecture |
| Minimal logging, no retry | Detailed logs + retry queue |
| Basic README | Rich, auto-updating README |
| Closed features | Fully open source |
CommitCode should be the extension developers trust without hesitation.
Every design decision should answer one question:
"Does this improve user trust, security, or developer experience?"
If not, it doesn't belong.