Skip to content

BrunoDelfim/code-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Code Solver

A desktop application that uses AI to analyze and solve programming problems through screen captures.

The software is designed to help developers during live coding sessions, as screen content often doesn't appear properly in recordings or live streams. With Code Solver, you can capture the code and get instant AI-generated solutions without interrupting the flow of your presentation.

πŸš€ Features

  • πŸ“Έ Screen capture with integrated OCR
  • πŸ€– Problem analysis using AI (Google Gemini)
  • πŸ’‘ Automatic solution generation in multiple languages
  • πŸ” Floating interface for quick viewing
  • ⌨️ Global shortcuts for all functions
  • πŸ”’ Content protection on windows
  • 🎯 Support for multiple captures
  • πŸ“ TypeScript support for better code quality

⚑ Shortcuts

  • Alt + P: Show/hide main window
  • Ctrl + Shift + P or Crtl + Alt + P: Capture screen
  • Ctrl + Enter: Process captures
  • Alt + S: Show/hide solution
  • Ctrl + Shift + Q: Exit application

πŸ› οΈ Technologies

  • Electron ^28.2.3
  • Node.js
  • TypeScript ^5.3.3
  • Tesseract.js ^5.0.4 (OCR)
  • Google Gemini API ^0.2.0
  • HTML/CSS/JavaScript
  • cross-env ^7.0.3 (Environment variables management)
  • electron-store ^8.1.0
  • node-tesseract-ocr ^2.0.2
  • screenshot-desktop ^1.12.7

πŸ“¦ Dependencies

Main Dependencies

  • Electron ^28.2.3
  • TypeScript ^5.3.3
  • @google/genai ^0.2.0
  • electron-store ^8.1.0
  • node-tesseract-ocr ^2.0.2
  • screenshot-desktop ^1.12.7
  • tesseract.js ^5.0.4

Development Dependencies

  • @types/electron ^1.6.10
  • @types/node ^20.11.24
  • cross-env ^7.0.3
  • electron-builder ^24.9.1
  • electron-reload ^2.0.0-alpha.1
  • nodemon ^3.1.0
  • rimraf ^5.0.5

πŸ“‹ Requirements

  • Google Gemini API key
  • Windows 10/11

πŸ”§ Installation

  1. Clone the repository:
git clone https://github.com/BrunoDelfim/code-solver.git
cd code-solver
  1. Install the dependencies::
npm install
  1. Run the application:
npm start

πŸ“¦ Generating the Installer

  1. Run the command on terminal:
npm run build
# or
yarn build
  1. The installer will be generated in the dist folder

πŸ“ Project Structure

code-solve/
β”œβ”€β”€ src/                    # Main source code
β”‚   β”œβ”€β”€ config/            # App configurations
β”‚   β”œβ”€β”€ services/          # App services
β”‚   β”œβ”€β”€ utils/             # Utilities
β”‚   β”œβ”€β”€ windows/           # Window management
β”‚   β”œβ”€β”€ renderers/         # Renderer processes
β”‚   └── main.ts            # Entry point
β”‚
β”œβ”€β”€ public/                # Public files
β”‚   β”œβ”€β”€ index.html        # Main HTML
β”‚   β”œβ”€β”€ about.html        # About HTML
β”‚   β”œβ”€β”€ api-key.html      # API key configuration
β”‚   β”œβ”€β”€ solution.html     # Solution display
β”‚   └── capture-status.html # Capture status
β”‚
β”œβ”€β”€ assets/               # Static resources
β”‚   └── icon.ico         # Application icon
β”‚
β”œβ”€β”€ docs/                # Documentation
β”œβ”€β”€ dist/               # Builds and distribution
β”œβ”€β”€ .github/            # GitHub configurations
β”œβ”€β”€ node_modules/       # Dependencies
β”œβ”€β”€ package.json        # Project configuration
β”œβ”€β”€ package-lock.json   # Dependency lock file
β”œβ”€β”€ .gitignore         # Git ignore rules
β”œβ”€β”€ tsconfig.json      # TypeScript configuration
β”œβ”€β”€ eng.traineddata    # English OCR data
β”œβ”€β”€ por.traineddata    # Portuguese OCR data
β”œβ”€β”€ README.md          # Main documentation
└── LICENSE            # License

βš™οΈ Configuration

  1. Get an API key from Google Gemini at: https://makersuite.google.com/app/apikey
  2. On the first run, the application will request the API key
  3. The key will be saved at: %APPDATA%/Code Solver/gemini_api_key.txt

πŸ” Security

  • API keys are securely stored locally
  • Solution windows are protected against screen capture
  • Sensitive content is protected from leaks

🀝 Contributing

  1. Fork the project
  2. Create a branch for your feature (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. If there is a related issue, please reference it (Closes#)
  6. Open a Pull Request

πŸ“ License

This project is under the ISC license. See the LICENSE file for more details.

✨ Acknowledgments

  • Google Gemini for the AI API
  • Tesseract.js for the OCR technology
  • Electron for the framework
  • cross-env (Environment variables management)
  • TypeScript team for the amazing type system

About

A desktop application that uses AI to analyze and solve programming problems through screen captures.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors