AI CodeSense is an AI-powered code review assistant that helps developers analyze their code for potential improvements and best practices using GPT-4. It provides a full-stack implementation using FastAPI (Python) for backend, Next.js (TypeScript) for frontend, and PostgreSQL for storage.
- AI-powered code review using OpenAI's GPT-4
- FastAPI backend for efficient API handling
- Next.js frontend with an intuitive UI for submitting code
- PostgreSQL database to store code review history
- Dockerized deployment for easy scalability
- Cloud-ready (AWS, Docker, Kubernetes support)
git clone https://github.com/anuraghruday/ai-codesense.git
cd ai-codesensecd backend
pip install -r requirements.txtOPENAI_API_KEY=your_openai_api_key
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=your_db_host
DB_PORT=your_db_port
uvicorn app:app --host 0.0.0.0 --port 8000 --reloadcd frontend
npm installnpm run devEnsure you have PostgreSQL installed and run the schema:
psql -U your_db_user -d your_db_name -f database/schema.sqlBuild and run the application using Docker:
docker build -t ai-codesense .
docker run -p 8000:8000 ai-codesenseAlternatively, use docker-compose for running the full stack:
docker-compose up --build{
"code_snippet": "def hello():\n print('Hello, world!')"
}{
"review": "Consider adding a docstring to improve code documentation."
}- Backend: FastAPI, OpenAI GPT-4, PostgreSQL
- Frontend: Next.js, React, TypeScript
- Database: PostgreSQL
- Cloud & Deployment: AWS, Docker, Kubernetes
This project is licensed under the MIT License.
Pull requests are welcome! Please open an issue to discuss before submitting any changes.
- Fork the repository
- Create a feature branch (
git checkout -b feature-name) - Commit changes (
git commit -m 'Add feature') - Push to branch (
git push origin feature-name) - Open a pull request
For any inquiries or support, reach out via:
- 📧 Email: anurag.hruday@gmail.com
- 🌐 GitHub: github.com/anuraghruday
This README.md provides a complete guide to setting up, running, and contributing to AI CodeSense. 🚀🎯