Skip to content

Aayush-coder1/commitwise-ai

Repository files navigation

🚀 CommitWise AI

A real-time pre-commit safety system that helps developers prevent common Git mistakes before code is pushed.


📑 Table of Contents


Problem

Developers often accidentally commit sensitive data such as API keys and passwords, include unnecessary files like node_modules, or leave debug statements like console.log() in production code.

These mistakes can lead to:

  • 🔓 Security vulnerabilities — Exposed credentials in version control
  • 📦 Messy repositories — Large, unnecessary files tracked
  • 🐛 Production issues — Debug code reaching users
  • ⚖️ Compliance risks — Sensitive data in git history

Solution

CommitWise AI scans staged Git changes before committing and detects critical issues in real-time.

Detection Categories:

  • 🔴 Critical — Sensitive data (API keys, secrets, passwords)
  • 🟡 Warning — Unnecessary files (node_modules, .env)
  • 🔵 Info — Debug statements (console.log, debugger)

Each detection includes instant feedback with clear explanations and one-click actions, helping developers make safer and cleaner commits.


Features

  • Real-time pre-commit scanning — Analyze staged changes instantly
  • 🚦 Severity-based detection — Critical, Warning, and Info level alerts
  • 🛠️ One-click actions — Fix Automatically, Learn More, or Ignore
  • 🧪 Interactive samples — Test with pre-built demo cases
  • 🔒 Fully offline — No data transmission or external API calls
  • 🎨 Developer-focused UI — Clean, modern interface inspired by VS Code
  • 🌗 Dark & Light themes — Works seamlessly with your preference

Demo

*https://drive.google.com/file/d/1WUQM0THzfYf86lNCG14BUBdmE6pMYMNl/view?pli=1 A walkthrough demonstrating real-time detection, fixes, and workflow will be added here.

In the meantime, try the Live Demo below to see CommitWise AI in action.


Tech Stack

Technology Purpose
Next.js 16 React framework & server runtime
React 19 UI library & component system
TypeScript Type-safe development
Tailwind CSS v4 Utility-first CSS styling
Vercel Hosting & deployment platform

Setup Instructions

Prerequisites

  • Node.js 18+ installed (Download)
  • Git configured on your machine
  • npm or pnpm package manager

Local Development

Clone the repository in bash git clone https://github.com/Aayush-coder1/commitwise-ai cd commitwise-ai

  1. Install dependencies

    npm install

    or if you prefer pnpm:

    pnpm install
  2. Run the development server

    npm run dev

    or with pnpm:

    pnpm dev
  3. Open in your browser

    http://localhost:3000
    

Deploy to Vercel

The easiest way to deploy is with Vercel:

  1. Push your code to GitHub
  2. Connect your repository to Vercel Dashboard
  3. Click "Deploy" — automatic deployments on every push!

Live Demo

✨ Try CommitWise AI Live

Try these to see detection in action:

  • Paste code containing .env or API keys
  • Include node_modules in your input
  • Add console.log() or debugger statements

Key Learnings

  • 🎨 Developer Tools Design — Studied interfaces of VS Code, GitHub, and modern dev tools
  • 📖 Git Workflows — Deep understanding of pre-commit hooks and safe committing practices
  • 🔐 Security Practices — Pattern recognition for detecting common security vulnerabilities
  • 🎯 UI/UX for Technical Products — Balancing aesthetics with developer preferences
  • 🚀 Modern Web Development — Leveraging Next.js 16, React 19, and advanced TypeScript patterns

Challenges Overcome

Challenge Solution
Accurate detection without false positives Built pattern-matching system with comprehensive test cases
Balancing simplicity with functionality Created intuitive UI with clear, actionable feedback
Polished developer-focused design Studied modern tools (VS Code, GitHub, Linear) for inspiration
Clean code architecture Component-based structure with separation of concerns
Real-time responsiveness Client-side logic with instant feedback (zero latency)

Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository on GitHub
  2. Clone your fork locally
    git clone https://github.com/YOUR-USERNAME/commitwise-ai.git
    cd commitwise-ai
  3. Create a feature branch
    git checkout -b feature/your-feature-name
  4. Commit your changes
    git commit -m 'Add: description of your feature'
  5. Push to your branch
    git push origin feature/your-feature-name
  6. Open a Pull Request with a clear description

Code Style:

  • Follow the existing code patterns
  • Use TypeScript for type safety
  • Keep components modular and reusable

License

This project is licensed under the MIT License.

See the LICENSE file for full details. You're free to:

  • ✅ Use, copy, and modify the code
  • ✅ Distribute the software
  • ✅ Use it commercially
  • ✅ Use it privately

Just include the license and copyright notice.


Support

Have questions, suggestions, or found a bug?


Built with ❤️ for developers. Making commits safer, one commit at a time.

⬆ Back to top

About

AI-powered pre-commit safety system for developers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors