Coder Social home page Coder Social logo

code-whisperer-ai's Introduction

Code Whisperer AI

Introduction

Code Whisperer AI is a capstone project developed for Turing's Launch program, showcasing the cumulative learning from mods 0 to 5. This individual project spaned two weeks and represents a blend of skills and knowledge acquired through the rigorous program.

Code Whisperer AI is your personal guide to skill refinement and code perfection. Tailored for both beginners and seasoned coding professionals, our application leverages the power of GPT-4 API to provide insightful analysis and actionable feedback for your code. It's designed to operate quietly yet deliver impactful enhancements, ensuring your code's quality and performance stand out.

Features

AI-Powered Analysis: Utilizing the GPT-4 API for advanced code analysis. User-Friendly Interface: Simple and intuitive design for easy interaction. Comprehensive Feedback: Detailed insights on Code Cleanliness, Time Complexity, and Areas of Improvement. Skill Development: Ideal for learners and professionals aiming to refine their coding skills.

Screen Shots

HomePageScreenshot

CodeAnalysisScreenshot

PreviousCodeScreenshot

Installation

To set up Code Whisperer AI, follow these steps:

  1. Clone the Repository:
git clone https://github.com/your-repository/code-whisperer-ai.git
  1. Navigate to the Project Directory:
cd code-whisperer-ai
  1. Install Dependencies:

Ensure you have the following key dependencies installed:

  • Entity Framework Core: For object-relational mapping.
  • Npgsql: PostgreSQL provider for Entity Framework Core.
  • Serilog: For logging in .NET applications.
  • Microsoft ASP.NET Core Identity: For user authentication and authorization.

Install them using the NuGet package manager. For example:

dotnet add package Microsoft.EntityFrameworkCore --version 7.0.13
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL --version 7.0.11
dotnet add package Serilog --version 3.0.1
dotnet add package Serilog.Sinks.Console --version 4.1.0
dotnet add package Serilog.Sinks.File --version 5.0.0
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore --version 6.0.23
  1. Start the Application:
dotnet run

Usage

After launching Code Whisperer AI, follow these steps to analyze your code:

  • Navigate to the Analyze page.
  • Enter your code snippet into the provided input area.
  • Click the "Analyze" button to submit your code for review.
  • View the AI-generated feedback and suggestions in the results area.

Contributing

Contributions to Code Whisperer AI are welcome! If you have suggestions or improvements, feel free to fork this repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.

Acknowledgments

  • Turing's Launch Program: For providing the educational platform and resources that made this project possible.
  • OpenAI's GPT-4 API: Powers the core functionality of Code Whisperer AI, offering advanced AI-powered code analysis.
  • Ace Editor: An embeddable code editor for the web, used in Code Whisperer AI for providing a user-friendly interface for code input with features like syntax highlighting and line numbering.
  • Bootstrap: For its comprehensive front-end framework, which enhanced the UI/UX design of the application.
  • jQuery: Used for DOM manipulation and to facilitate some of the interactive features in the application.

code-whisperer-ai's People

Contributors

joe10111 avatar

Stargazers

 avatar

Watchers

 avatar

code-whisperer-ai's Issues

Adding User Authentication

As a developer, I want to implement user authentication using ASP.NET Identity, so that users can securely sign up and log in to the application.

Implement the Foundation for Code Analysis Feature

As a developer, I want to implement the basic versions of the API controller, model, and view for our code analysis feature, so that I can establish a functional baseline for the application's core functionality and enable further iterative development.

  • API Controller Setup: Create an API controller that can handle incoming HTTP requests for code analysis, providing appropriate responses.

  • Model Creation: Develop a model that accurately represents the data related to code analysis, including attributes such as code snippet, analysis results, and any metadata required.

  • View Design: Craft a basic view that can present the results returned by the code analysis model in a clear and readable format to the user.

Style Pass One

A pass on style for my whole application. Transforming what I have right now into a more realized version of my wireframes with more interactivity.

In-Memory Caching

As a developer of the Code Whisper AI project,

I want to implement an in-memory caching system,

So that the application can store and retrieve frequently accessed data, such as inputs and API responses, efficiently without making redundant API calls.

Analyze Code Button

As a user, I need a simple way to send my code for analysis, so that I can quickly receive feedback and insights without navigating through complex menus or options.

Analysis Output Panel

As a user, I expect to see the analysis of my code displayed clearly beside my workspace, so that I can easily compare my original code with the suggestions and understand how to improve my coding practices.

Code Input Area

As a user, I want a dedicated space where I can comfortably input my code, ensuring that I can focus on writing and submitting it for review without any distractions.

User Tracking System

  • Implement a lightweight user tracking system using cookies and IP addresses.
  • Assign each user a unique cookie-based identifier to track usage without personal accounts.
  • Record the user's IP address to associate session data, ensuring a basic level of user distinction.

Removing Historical Analysis Results

Disable the storage and retrieval of past analysis results.
Ensure the platform's focus is on real-time analysis without storing user history.
Adapt the user interface and backend services to reflect this change.

Usage Limitation Mechanism

  • Restrict users to a maximum of three code analyses per week, based on their cookie and IP data.
  • Use this limitation to demonstrate the tool's capabilities while preventing excessive cost for API calls.
  • Track the time so I can re-set the attempts once a week has passed.

Implementing Error Logging for Backend Services

As a developer, I need to implement robust error logging across all backend services, ensuring that I capture sufficient detail for troubleshooting while protecting user data and sensitive information.

Setting Up the Project

As a developer, I want to set up a new .NET 6 MVC project with the necessary project structure, so that I can organize my application according to MVC patterns and best practices.

User Feedback Enhancements

Introduce a loading bar to visually indicate when the analysis is in progress.
Use color-coded feedback shadows:
Green shadow for positive feedback or successful analysis.
Yellow shadow to indicate areas needing improvement or caution.
These visual elements aim to make the user experience more engaging and informative.

Interacting with Analysis Output & Detailed Analysis View

As a user, when I view the analysis results, I want the ability to click on a specific piece of feedback to delve into a more detailed explanation, so that I can gain deeper insights into the suggestions and learn how to apply them to my code

As a user, I need a detailed view of each analysis point, so that I can fully understand the context and reasoning behind each piece of feedback and determine how to implement the suggested improvements in my code.

Account Feature Removal

Eliminate the account creation and login features.
Transition from a user-account-based system to a more anonymous user interaction model.
Ensure that all dependencies and functionalities tied to user accounts are cleanly removed or appropriately modified.

Update Documentation VIA GitHub

Update all relevant documentation to reflect the changes made in this phase.
Provide clear instructions and guidelines for first-time users interacting with the demo.

Input Field Management

Set a character limit for the code input field.
Introduce a visual cue (e.g., the input field glowing red) when the character limit is exceeded.
This feature aims to encourage concise code submissions and maintain optimal performance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.