Component Overview
The AI-assisted coding assistant project consists of several key components and technologies, including a VS Code extension for code suggestions, a Flask backend for processing and logging user interactions, Ollama as the AI model, Supabase for authentication and database storage, and a Next.js dashboard for users to track their progress.
Figure 1. Component Diagram of the Github Copilot Clone application.
Main Applicationβ
π VS Code Extension (TypeScript, Node.js)β
The core of the system is a VS Code extension that provides code suggestions while occasionally introducing small logic errors to test user attentiveness.
πΉ Key Features:β
- AI-Powered Code Suggestions β Uses Ollama to generate helpful code recommendations.
- Bug Injection β Sometimes modifies code (e.g., changing
add(a, b)
toa - b
) to check if users notice mistakes. - User Response Logging β Tracks how users interact with suggestions (accept, modify, or reject).
- Adjustable Difficulty β Adapts suggestions based on past responses.
Backend Servicesβ
π Flask (Python)β
The backend handles all API requests between the VS Code extension, AI model, and database.
πΉ Key Features:β
- Processes Code Requests β Sends user code to the AI model and returns suggestions.
- Tracks User Behavior β Logs whether users accept, modify, or reject suggestions.
- Controls Suggestion Flow β Can slow down suggestions or require manual edits based on user performance.
AI Modelβ
π€ Ollama (AI Code Generator)β
The AI model generates code suggestions and sometimes introduces small mistakes to test users.
πΉ Key Features:β
- Context-Aware Suggestions β Provides relevant recommendations based on the userβs code.
- Intelligent Mistakes β Occasionally tweaks suggestions with logical errors to test user focus.
- Adaptive Learning β Adjusts suggestions based on user behavior.
Database & Authenticationβ
π Supabase (PostgreSQL, Auth)β
Supabase handles user login and stores all interaction data.
πΉ Key Features:β
- User Authentication β Manages logins and keeps track of individual progress.
- Logs User Activity β Records which suggestions were accepted, modified, or rejected.
- Real-Time Sync β Updates and injects user progress instantly to the AI model and on the dashboard.
User Dashboardβ
π Next.js (React, Tailwind CSS)β
The dashboard allows users to view their progress and track their learning journey.
πΉ Key Features:β
- Progress Tracking β Displays stats on correct vs. incorrect responses.
- Insightful Feedback β Helps users understand where they need improvement.
- Encourages Learning β Provides interactive insights to refine coding skills.