Skip to content

Commit 99b8845

Browse files
committed
initial commit for end-to-end solution
0 parents commit 99b8845

File tree

11 files changed

+1005
-0
lines changed

11 files changed

+1005
-0
lines changed

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.DS_Store
2+
.env
3+
.gclient_done
4+
**/.npmrc
5+
.tags*
6+
.vs/
7+
.vscode/
8+
*.log
9+
*.pyc
10+
*.sln
11+
*.swp
12+
*.VC.db
13+
*.VC.VC.opendb
14+
*.vcxproj
15+
*.vcxproj.filters
16+
*.vcxproj.user
17+
*.xcodeproj
18+
/.idea/
19+
/dist/
20+
node_modules/
21+
SHASUMS256.txt
22+
**/package-lock.json
23+
compile_commands.json
24+
.envrc
25+
26+
# npm package
27+
/npm/dist
28+
/npm/path.txt
29+
/npm/checksums.json
30+
31+
.npmrc
32+
33+
# Generated API definitions
34+
electron-api.json
35+
electron.d.ts
36+
37+
# Spec hash calculation
38+
spec/.hash
39+
40+
# Eslint Cache
41+
.eslintcache*
42+
43+
# Generated native addon files
44+
/spec/fixtures/native-addon/echo/build/
45+
46+
# If someone runs tsc this is where stuff will end up
47+
ts-gen
48+
49+
# Used to accelerate CI builds
50+
.depshash
51+
52+
# Used to accelerate builds after sync
53+
patches/mtime-cache.json
54+
55+
spec/fixtures/logo.png

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Coding Helper (Repo: `coding-helper`)
2+
3+
## 👋 Introduction
4+
Coding Helper is an Electron-based desktop assistant that helps you solve coding problems by taking screenshots of problem descriptions and generating solutions using OpenAI's GPT models. It features a floating, always-on-top window with keyboard shortcuts for quick access, screenshot management, and solution rendering.
5+
6+
## Disclaimer
7+
This is a fun, personal project intended to help you learn and experiment with coding problems. **Using this tool during interviews or assessments is at your own risk.** Please respect the rules and integrity of any platform or process you participate in.
8+
9+
## 🔥 Demo
10+
Here is the link to the app demo. We hope you enjoy it.
11+
> [The Youtube demo Link](https://www.youtube.com/watch?v=_XNQo9AIK0Y)
12+
13+
## Features
14+
- **Floating Window:** Minimal, draggable overlay that stays on top of other windows.
15+
- **Quick Screenshots:** Capture up to 5 screenshots of coding problems using keyboard shortcuts.
16+
- **OpenAI Integration:** Sends screenshots to OpenAI GPT-4.1-mini for problem analysis and solution generation.
17+
- **Language Selection:** Choose your preferred programming language (Python, JavaScript, Java) for solutions.
18+
- **API Key Management:** Set and store your OpenAI API key.
19+
- **Tooltip & Settings:** Access shortcuts, language selection, and API key input via a tooltip window.
20+
- **Window Controls:** Move, show/hide, and reset the helper using keyboard shortcuts.
21+
22+
## Getting Started
23+
24+
### Prerequisites
25+
- [Node.js](https://nodejs.org/) (v16 or higher recommended)
26+
- [npm](https://www.npmjs.com/)
27+
- [OpenAI API Key](https://platform.openai.com/account/api-keys)
28+
29+
### Installation
30+
1. **Clone the repository:**
31+
```sh
32+
git clone https://github.com/yourusername/coding-helper.git
33+
cd coding-helper
34+
```
35+
2. open terminal/command prompt
36+
37+
3. **Install dependencies:**
38+
```sh
39+
npm install
40+
```
41+
42+
4. **Start the app:**
43+
```sh
44+
npm start
45+
```
46+
47+
5. **Set your OpenAI API Key:**
48+
- Click the ⚙️ gear icon or use the tooltip window to enter your API key.
49+
50+
6. **Capture the problem:**
51+
- Open Leetcode problem.
52+
- Capture up to 5 screenshots of coding problems using keyboard shortcut
53+
<kbd>⌘</kbd> + <kbd>H</kbd> (Mac) or <kbd>Ctrl</kbd> + <kbd>H</kbd> (Windows/Linux).
54+
55+
7. **Generate Solution:**
56+
- Process <kbd>⌘</kbd> + <kbd>Enter</kbd> to generate solution.
57+
58+
## Usage
59+
- **Take Screenshot:** <kbd>⌘</kbd> + <kbd>H</kbd> (Mac) or <kbd>Ctrl</kbd> + <kbd>H</kbd> (Windows/Linux)
60+
- **Clear Screenshots:** <kbd>⌘</kbd> + <kbd>W</kbd>
61+
- **Show/Hide Tooltip:** <kbd>⌘</kbd> + <kbd>,</kbd>
62+
- **Move Window:** <kbd>⌘</kbd> + Arrow Keys
63+
- **Show/Hide Windows:** <kbd>⌘</kbd> + <kbd>B</kbd>
64+
- **Send to OpenAI:** <kbd>⌘</kbd> + <kbd>Enter</kbd>
65+
66+
## Project Structure
67+
```
68+
.
69+
├── index.html
70+
├── main.js
71+
├── preload.js
72+
├── renderer.js
73+
├── solution-render.js
74+
├── solution.html
75+
├── tooltip-render.js
76+
├── tooltip.html
77+
├── package.json
78+
├── .gitignore
79+
├── screenshots/
80+
└── .vscode/
81+
```
82+
83+
## Security
84+
- Your OpenAI API key is only stored locally and never shared.
85+
- The app uses Electron's `contextIsolation` and disables `nodeIntegration` for renderer security.
86+
87+
## License
88+
MIT
89+
90+
---
91+
92+
**Author:** Vinay Duvvada

index.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Coding Helper</title>
6+
<style>
7+
html, body {
8+
margin: 0;
9+
padding: 0;
10+
width: 100%;
11+
height: 100%;
12+
background: rgba(0, 0, 0, 0.4);
13+
color: white;
14+
font-family: sans-serif;
15+
display: flex;
16+
align-items: center;
17+
justify-content: center;
18+
-webkit-user-select: none;
19+
}
20+
21+
#container {
22+
display: flex;
23+
align-items: center;
24+
justify-content: center;
25+
width: 100%;
26+
padding: 0 10px;
27+
-webkit-app-region: drag;
28+
}
29+
30+
#label {
31+
flex: 1;
32+
font-size: 14px;
33+
text-align: center;
34+
}
35+
36+
#gear {
37+
-webkit-app-region: no-drag;
38+
cursor: pointer;
39+
font-size: 16px;
40+
padding-left: 10px;
41+
}
42+
43+
.key {
44+
background: rgba(255, 255, 255, 0.15);
45+
padding: 2px 6px;
46+
border-radius: 4px;
47+
font-family: monospace;
48+
margin-right: 4px;
49+
}
50+
51+
52+
</style>
53+
</head>
54+
<body>
55+
<div id="container">
56+
<div id="label">Take first screenshot (<span class="key"></span> + <span class="key">h</span>)</div>
57+
<div class="key-combo">⌘ ,</div>
58+
<div id="gear">⚙️</div>
59+
</div>
60+
61+
<script src="renderer.js"></script>
62+
</body>
63+
</html>

0 commit comments

Comments
 (0)