Loading repository data…
Loading repository data…
parakh80 / repository
AI Code Analyzer is a web app that helps you understand and improve Python and JavaScript code using Google’s Gemini AI. Just paste your code, and it’ll check for correctness, highlight edge cases, explain what’s happening, and even generate test cases. It’s designed to make life easier for prompt engineers and developers speeding up code reviews.
AI Code Analyzer is a web application built to analyze code snippets currently supporting Python and Next js using the power of Google’s Gemini AI models. It offers insights into code correctness, uncovers potential edge cases, performs deep semantic analysis, and auto-generates relevant test cases. With a clean and user-friendly interface, users can easily submit their code and track progress while reviewing detailed analysis results.
While this tool doesn't replace prompt engineers, it significantly boosts their productivity. It helps them better understand AI-generated code, spot edge-case errors that might be missed during manual analysis, and leverage test cases to validate the logic. It’s all about making prompt engineering smarter, faster, and more reliable.
google-generativeai)python-dotenv@monaco-editor/react)react-markdownreact-syntax-highlighterClone the Repository (if applicable): (If you haven't cloned it yet, otherwise skip)
git clone <your-repository-url>
cd <repository-directory>
Backend Setup:
cd backend
# Windows
python -m venv venv
.\venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
.env file in the backend directory and add your API keys:
# backend/.env
GEMINI_API_KEY=YOUR_GEMINI_API_KEY_HERE
API_KEY=YOUR_CHOSEN_BACKEND_API_KEY # Optional: A secret key clients must send (e.g., 'mysecretkey')
(Replace YOUR_GEMINI_API_KEY_HERE with your actual key. Set API_KEY to a secret value if you want to protect the backend endpoint).Frontend Setup:
cd ../frontend
# Or if you are in the backend dir: cd ../frontend
npm install
# or
yarn install
.env.local file in the frontend directory and configure the backend URL:
# frontend/.env.local
NEXT_PUBLIC_API_URL=http://localhost:8000
# Optional: If you set an API_KEY in the backend .env, add it here
NEXT_PUBLIC_BACKEND_API_KEY=YOUR_CHOSEN_BACKEND_API_KEY
(Ensure NEXT_PUBLIC_API_URL points to where your backend will run. Add NEXT_PUBLIC_BACKEND_API_KEY only if you set API_KEY in the backend).Start the Backend Server:
backend directory.python api.py
http://localhost:8000.Start the Frontend Development Server:
frontend directory.npm run dev
# or
yarn dev
http://localhost:3000.Access the Application:
http://localhost:3000.