A comprehensive AI-powered programming assistant system featuring a VS Code extension, web interface, and FastAPI backend for intelligent code analysis, generation, and assistance.
This project provides a complete ecosystem for AI-assisted programming, specializing in Perl development but extensible to other languages. The system combines real-time code analysis, intelligent suggestions, error detection, and multi-modal content processing through three integrated components.
git_check/
├── backend/ # FastAPI backend server
├── frontend/ # React web interface
├── VsCodeExtension/ # VS Code extension
└── README.md # This file
- 🤖 AI-Powered Code Generation: Convert comments to functional code
- 🔍 Intelligent Error Detection: Real-time code analysis and error highlighting
- 📋 Alternative Code Suggestions: Multiple implementation approaches for any code block
- 💬 Interactive Chat Interface: Web-based AI programming assistant
- 📁 Multi-Modal Processing: Analyze repositories, PDFs, and web content
- 🔐 Secure Authentication: JWT-based user management
- 🔄 Real-time Streaming: Live AI responses in both web and IDE
- 🧠 Vector-Based Search: Semantic code matching using LanceDB embeddings and FAISS indexing
- 📚 Persistent Session Storage: FAISS-powered document storage for conversation context
🖥️ Backend (backend/
)
FastAPI-based server providing AI integration and content processing.
Tech Stack: FastAPI, MongoDB, FAISS, Ollama LLM, JWT Authentication
Key Features:
- AI chat with session management
- Comment-to-code generation
- Repository and PDF analysis
- Error detection and code validation
- FAISS vector storage for semantic search and document persistence
- HuggingFace embeddings (all-MiniLM-L6-v2) for document indexing
Quick Start:
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8000
🌐 Frontend (frontend/
)
Modern React web interface for interacting with the AI assistant.
Tech Stack: React 19, Vite, Tailwind CSS, Radix UI
Key Features:
- Interactive chat interface
- Multi-session management with FAISS-backed document storage
- File upload and repository integration
- Real-time streaming responses
- Code syntax highlighting
- Persistent conversation context using vector embeddings
Quick Start:
cd frontend
npm install
npm run dev
🔧 VS Code Extension (VsCodeExtension/
)
Integrated development environment extension for seamless coding assistance.
Key Features:
- Real-time code suggestions
- Error detection and highlighting
- Sidebar alternative suggestions
- Context-aware code generation
- LanceDB vector search integration for semantic code matching
Quick Start:
cd VsCodeExtension
npm install
# Press F5 in VS Code to launch Extension Development Host
The system uses advanced vector storage technologies for intelligent content retrieval:
- FAISS (Facebook AI Similarity Search): High-performance similarity search for document storage and retrieval
- HuggingFace Embeddings: Uses
all-MiniLM-L6-v2
model for generating semantic embeddings - Persistent Session Storage: User-specific and session-specific document indexes for maintaining conversation context
- LanceDB Integration: Additional vector database support in VS Code extension for semantic code search
- Document Management: Automatic indexing, filtering, and removal of documents based on metadata
- Node.js: 14.0+
- Python: 3.9+
- MongoDB: 4.4+
- Ollama: With perlbot3:latest model
- VS Code: 1.60.0+ (for extension)
-
Clone the repository
git clone <repository-url> cd git_check
-
Start Backend
cd backend pip install -r requirements.txt cp .env.example .env # Configure environment variables uvicorn main:app --reload --port 8000
-
Start Frontend
cd frontend npm install npm run dev # Runs on http://localhost:5173
-
Install VS Code Extension
cd VsCodeExtension npm install npm install -g vsce vsce package # Install the generated .vsix file in VS Code
Backend Environment (.env
):
MONGODB_URL=mongodb://localhost:27017
DATABASE_NAME=archelon_ai
JWT_SECRET_KEY=your-secret-key
OLLAMA_MODEL=perlbot3:latest
OLLAMA_BASE_URL=http://localhost:11434
Frontend: Automatically connects to http://localhost:8000
VS Code Extension: Configure through VS Code settings (perlCodeGeneration.*
)
# Create a subroutine that validates email addresses
# AI generates:
sub validate_email {
my ($email) = @_;
return $email =~ /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
}
- Start conversations with the AI assistant
- Upload files, analyze repositories
- Get real-time streaming responses
- Manage multiple chat sessions with persistent context
- FAISS-powered document retrieval for relevant conversation history
- Select code blocks for alternative suggestions
- Automatic error detection and highlighting
- Context-aware code completion
- Semantic search through codebase using vector embeddings
Once the backend is running:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
POST /chats/chat
- AI chat interaction with vector-based context retrievalPOST /commentCode/suggest
- Code generationPOST /validate/error
- Error detectionPOST /upload
- File processing with FAISS indexingPOST /analyze-repo
- Repository analysis
# Backend
cd backend && python -m pytest tests/
# Frontend
cd frontend && npm test
# VS Code Extension
cd VsCodeExtension && npm test
# Frontend
cd frontend && npm run build
# VS Code Extension
cd VsCodeExtension && vsce package
-
Backend Connection Failed
- Ensure MongoDB is running
- Verify Ollama model is installed:
ollama pull perlbot3:latest
- Check environment variables in
.env
-
FAISS Index Issues
- Verify write permissions to session storage directory
- Check for sufficient disk space for vector indexes
- Ensure HuggingFace model downloads correctly
-
VS Code Extension Not Working
- Verify backend is running on port 8000
- Check extension logs in VS Code Output panel
- Ensure workspace contains Perl files
-
Frontend API Errors
- Confirm backend server is accessible
- Check browser console for CORS issues
- Verify authentication tokens
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open Pull Request
Component | Requirements |
---|---|
Backend | Python 3.9+, MongoDB 4.4+, Ollama, FAISS, 8GB+ RAM |
Frontend | Node.js 14+, Modern browser |
VS Code Extension | VS Code 1.60+, Node.js 14+, LanceDB |
System | 10GB+ storage, Internet connection |
This project is licensed under [LICENSE]. See individual component directories for specific licensing information.
- FastAPI Documentation
- VS Code Extension API
- React Documentation
- Ollama Models
- FAISS Documentation
- LanceDB Documentation
Built with ❤️ using modern AI and web technologies
For detailed component documentation, see the README files in each subdirectory.