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

Appearance settings

ashish7802/Commitai

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
24 Commits
 
 
 
 
 
 

Repository files navigation

🤖 CommitAI

AI-powered Git commit message generator — paste your diff, get 3 perfect commits.

Stars Forks License Python Next.js


Live Demo


🎯 What is CommitAI?

Stop writing bad commit messages like fix stuff or updated files.

Paste your code diff → CommitAI generates 3 AI-powered commit message suggestions using Google Gemini — in seconds.


✨ Features

  • ✅ Paste any git diff → get 3 commit suggestions instantly
  • ✅ 3 tone modes — Professional / Fun / Short
  • ✅ One-click copy to clipboard
  • ✅ Full commit history dashboard
  • ✅ MongoDB-backed persistence
  • ✅ Dark theme UI — clean & minimal
  • ✅ REST API — fully documented

🛠️ Tech Stack

Layer Tech
Frontend Next.js 14 + Tailwind CSS
Backend Python + FastAPI
AI Google Gemini API
Database MongoDB + Mongoose

🚀 Quick Start

Backend

cd commitai/backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # add your keys
uvicorn main:app --reload

Frontend

cd commitai/frontend
npm install
npm run dev

Open http://localhost:3000 🎉


🔑 Environment Variables

GEMINI_API_KEY=your_gemini_api_key
MONGODB_URI=mongodb://localhost:27017
MONGODB_DB_NAME=commitai
NEXT_PUBLIC_API_BASE_URL=http://localhost:8000
CORS_ORIGINS=http://localhost:3000

📡 API Endpoints

Method Route Description
POST /api/generate Generate 3 commit messages
GET /api/history Get all past commits
DELETE /api/history/:id Delete a history item
GET /health Backend health check

📁 Project Structure

commitai/
├── frontend/          # Next.js 14
│   ├── app/
│   │   ├── page.jsx           # Main generator
│   │   └── history/page.jsx   # History dashboard
│   └── components/
│       ├── DiffInput.jsx
│       ├── CommitCard.jsx
│       └── HistoryTable.jsx
└── backend/           # FastAPI
    ├── main.py
    ├── core.py
    ├── routes/
    │   ├── generate.py
    │   └── history.py
    └── models/
        └── commit.py

☁️ Deploy

Service Use For
Vercel Frontend
Railway Backend + MongoDB

🤝 Contributing

PRs welcome! Star the repo if it helped you ⭐


Made with ❤️ by Ashish Yadav

About

AI-powered Git commit message generator — paste your diff, get 3 perfect commit messages instantly. Built with Next.js 14 + FastAPI + Google Gemini + MongoDB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.