LeetCode Helper
Robinbinu/leetcode_helper
Resolva problemas LeetCode com IA — múltiplos provedores, linguagens variadas
Ver no GitHubAplicação full-stack que ajuda a resolver problemas do LeetCode usando múltiplos provedores de IA (OpenAI, Gemini, Claude, Groq). Backend em Go/Gin fornece API RESTful para gerar soluções estruturadas com explicações, código e dicas. Frontend em AstroJS com armazenamento seguro de chaves de API no navegador.
Instalação
npx convez-ai Robinbinu/leetcode_helper1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Preparação para entrevistas técnicas com soluções explicadas
- Aprendizado de algoritmos com diferentes abordagens de IA
- Prototipagem rápida de soluções em múltiplas linguagens
Veredito

Ferramenta prática que combina bem abstração de provedores com interface clara. Arquitetura limpa e tratamento seguro de credenciais por requisição. Ideia solidária para o nicho de preparação técnica, mas depende fortemente da qualidade do provedor de IA escolhido.
README
A tradução para o português deste README ainda está na fila.
LeetCode Helper Documentation
Overview
LeetCode Helper is a full-stack application that helps users solve LeetCode problems using various GenAI providers. The application consists of a Go (Gin-based) backend API and an AstroJS frontend. Users can input LeetCode problems, select their preferred programming language and AI provider, and receive structured solutions with explanations, code, and hints.
Architecture
The application follows a clean, modular architecture:
Backend (Go/Gin)
- Provider Abstraction: Generic interface for multiple AI providers
- API Endpoints: RESTful endpoints for solving problems and listing providers
- Per-Request API Key Handling: API keys are passed with each request, not stored on the server
Frontend (AstroJS)
- React Components: UI components for input, output, and API key management
- Local Storage: Secure storage of API keys in the browser
- Responsive Design: Works on both desktop and mobile devices
Installation
Prerequisites
- Go 1.23 or higher
- Node.js 16 or higher
- npm or yarn
Backend Setup
- Clone the repository
- Navigate to the backend directory:
cd leetcode-helper/backend - Install Go dependencies:
go mod tidy - Run the backend server:
The server will start on port 8080.go run main.go
Frontend Setup
- Navigate to the frontend directory:
cd leetcode-helper/frontend - Install dependencies:
npm install - Run the development server:
The frontend will be available at http://localhost:3000.npm run dev
Usage
- Open the application in your browser
- Enter a LeetCode problem in the text area
- Select your preferred programming language and experience level
- Choose an AI provider from the dropdown
- Enter your API key for the selected provider
- Click "Solve Problem" to generate a solution
- View the explanation, code, and hints in the tabbed interface
API Endpoints
POST /api/solve
Generates a solution for a LeetCode problem.
Request Body:
{
"problem_text": "Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.",
"language": "javascript",
"user_level": "intermediate",
"provider": "openai",
"api_key": "your-api-key"
}
Response:
{
"explanation": "To solve this problem, we can use a hash map to store the numbers we've seen so far...",
"code": "function twoSum(nums, target) {\n const map = {};\n for (let i = 0; i < nums.length; i++) {\n const complement = target - nums[i];\n if (map[complement] !== undefined) {\n return [map[complement], i];\n }\n map[nums[i]] = i;\n }\n return [];\n}",
"hints": [
"Consider using a hash map to store values you've already seen",
"For each number, check if its complement (target - num) exists in the hash map",
"Time complexity can be reduced to O(n) with the right approach"
],
"timeComplexity": "O(n)",
"spaceComplexity": "O(n)"
}
GET /api/providers
Returns a list of available AI providers.
Response:
{
"providers": ["openai", "gemini", "claude", "groq"]
}
Supported AI Providers
The application currently supports the following AI providers:
-
OpenAI (GPT-4)
- API Key Format: Starts with "sk-"
- API Documentation: https://platform.openai.com/docs/api-reference
-
Google Gemini
- API Key Format: Any valid API key
- API Documentation: https://ai.google.dev/docs
-
Anthropic Claude
- API Key Format: Starts with "sk-"
- API Documentation: https://docs.anthropic.com/claude/reference/getting-started-with-the-api
-
Groq (Llama 3)
- API Key Format: Starts with "gsk_"
- API Documentation: https://console.groq.com/docs/quickstart
Adding New AI Providers
To add a new AI provider:
- Create a new file in the
providersdirectory implementing theGenAIProviderinterface - Register the provider in
main.go - Add the provider to the frontend dropdown in
ProblemInputForm.tsx
Example implementation:
package providers
import (
"context"
"github.com/leetcode-helper/api/models"
)
// NewProviderProvider creates a new provider
func NewProviderProvider() *ProviderProvider {
return &ProviderProvider{
baseURL: "https://api.provider.com/v1/completions",
}
}
// GetName returns the name of the provider
func (p *ProviderProvider) GetName() string {
return "provider"
}
// ValidateAPIKey checks if the API key is valid
func (p *ProviderProvider) ValidateAPIKey(apiKey string) bool {
return len(apiKey) > 0
}
// GenerateSolution generates a solution for a LeetCode problem
func (p *ProviderProvider) GenerateSolution(ctx context.Context, problem string, language string, userLevel string, apiKey string) (*models.SolutionResponse, error) {
// Implementation here
}
Security Considerations
- API keys are stored only in the user's browser local storage
- API keys are never stored on the server
- API keys are sent directly from the frontend to the AI provider
- HTTPS should be used in production to secure API key transmission
License
This project is licensed under the MIT License - see the LICENSE file for details.