Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rizzviii/CodeSage-AI

Repository files navigation

🧠 CodeSage AI

Advanced AI-Powered Code Intelligence System
Understand, debug, and learn from any code — instantly.

Live Demo GitHub License React Vite


📸 Screenshots

| Landing Page | Main Tool | image

| Dark Mode | Light Mode | image

image

✨ Features

🔍 13 Analysis Modes

Mode Description
📋 Line-by-Line Explains every line in plain language
▶️ Dry Run Step-by-step execution trace with variable states
🐛 Bug Detect Finds every bug, risk, and code smell
⚙️ Algorithm Detects algorithms with Big-O complexity analysis
📄 Pseudocode Converts code to plain English flowcharts
🎓 Viva Prep Generates 12 exam Q&As at Easy / Medium / Hard
⚠️ Errors Translates cryptic compiler errors to human language
🧩 Paradigm Detects OOP, Functional, Procedural & more
📦 Dependencies Explains every import with alternatives
💻 I/O Simulator Simulates inputs and traces outputs live
📝 Generate Notes Creates exam-ready study notes and cheatsheets
🐙 Repo Explain Explains full project architecture from ZIP/code
🔌 API Explainer Explains request flow, auth, middleware, and more

🛠️ Additional Features

  • Syntax Highlighting — CodeMirror editor with language-aware highlighting
  • Multiple File Tabs — Open and switch between multiple files
  • Chat with Code — Ask follow-up questions about your code
  • Auto-Fix — One-click bug fixing on the Bug Detect tab
  • Analysis History — All analyses saved to localStorage
  • Dark / Light Theme — Full theme toggle
  • Onboarding Tour — 3-step walkthrough for new users
  • Premium Downloads — Export as beautifully formatted PDF, DOCX, or TXT
  • 23 Languages — Python, JS, TS, Java, C, C++, Go, Rust, and more
  • AI Model Fallback — 10 free models tried automatically if one fails

🚀 Getting Started

Prerequisites

Installation

# 1. Clone the repository
git clone https://github.com/Rizzviii/CodeSage-AI.git
cd CodeSage-AI
# 2. Install dependencies
npm install
# 3. Create your environment file
cp .env.example .env
# 4. Add your OpenRouter API key to .env
# VITE_OPENROUTER_KEY=your_key_here
# 5. Start the development server
npm run dev

Open http://localhost:5173 in your browser.


🔑 Environment Variables

Create a .env file in the root directory:

VITE_OPENROUTER_KEY=your_openrouter_api_key_here

Get your free API key at openrouter.ai/keys.


🏗️ Project Structure

CodeSage-AI/
├── public/
│ └── favicon.svg
├── src/
│ ├── App.jsx # Root component — landing page + tool routing
│ ├── CodeSageAI.jsx # Main tool component (editor, analysis, chat)
│ ├── LandingPage.jsx # Premium animated landing page
│ └── main.jsx # React entry point
├── screenshots/ # Add your screenshots here
├── .env.example # Environment variable template
├── .gitignore
├── index.html
├── package.json
├── README.md
└── vite.config.js

🤖 AI Models Used

CodeSage AI uses OpenRouter to access multiple free AI models with automatic fallback:

  1. openai/gpt-oss-120b:free
  2. openai/gpt-oss-20b:free
  3. nvidia/nemotron-3-super-120b-a12b:free
  4. google/gemma-4-31b-it:free
  5. meta-llama/llama-3.3-70b-instruct:free
  6. deepseek/deepseek-v4-flash:free
  7. (+ 4 more fallbacks)

If one model is rate-limited, the next is tried automatically.


🚢 Deployment

Deployed on Vercel

https://www.code-sage.app

Build for Production

npm run build
# Output is in the /dist folder

🧰 Tech Stack

Technology Purpose
React 18 UI framework
Vite 5 Build tool & dev server
CodeMirror 6 Syntax-highlighted code editor
OpenRouter API AI model access
jsPDF PDF generation
Tabler Icons Icon set
Plus Jakarta Sans Typography

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


👤 Author

Baqar Rizvi
GitHub


🙏 Acknowledgements


Built with ❤️ by Baqar Rizvi
If you find this useful, please ⭐ star the repo!

About

AI-powered code intelligence tool — explains, debugs, and analyzes code in 23 languages with 13 analysis modes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /