Skip to content

NexionisJake/Drona.ai

Repository files navigation

Drona.ai

Drona.ai is a Socratic code editor designed to foster deep understanding of code logic and prevent the practice of blindly pasting AI-generated solutions.

When a user attempts to paste a significant block of code (e.g., more than 25 lines), the editor locks. To unlock the functionality, the user must answer context-aware questions generated by an AI Mentor regarding the code they wish to paste. This mechanism ensures that the user comprehends the logic, security implications, and performance characteristics of the code before integrating it into the project.

Features

  • Paste Verification: detect large paste actions and temporarily lock the editor to prevent unverified code integration.
  • Socratic Mentor: utilizing Anthropic Claude 3.5 Sonnet, the system generates relevant questions to test the user's understanding of the code.
  • Builder Score: a scoring system to incentivize manual coding and understanding over copy-pasting. Steps are taken to penalize unverified pasting.
  • Verification Override: users may choose to reject the paste action to revert the editor state and restore their score.
  • Modern Interface: a dark-themed, professional interface designed for extended coding sessions.

Technology Stack

  • Frontend: React 19, Vite, TypeScript, Tailwind CSS v4, Monaco Editor.
  • Backend: FastAPI (Python 3.11), Uvicorn, Anthropic API (Claude 3.5 Sonnet).
  • Communication: Server-Sent Events (SSE) for real-time AI interaction.

Installation and Setup

Prerequisites

  • Node.js v18 or higher
  • Python 3.11 or higher
  • An Anthropic API Key (ANTHROPIC_API_KEY)

Quick Start

  1. Clone the Repository

  2. Configure Environment Variables Copy the example environment file and add your API key:

    cp .env.example .env
    # Open .env and set your ANTHROPIC_API_KEY
  3. Run the Application Execute the startup script to initialize the environment and start services:

    ./run.sh

    This script will:

    • Set up the Python virtual environment.
    • Install necessary dependencies.
    • Launch the frontend at http://localhost:5173.
    • Launch the backend at http://localhost:8000.

Demo Flow

  1. Navigate to http://localhost:5173.
  2. Type code manually to observe the Builder Score increase.
  3. Paste the provided snippet from structure/demo_paste_snippet.py.
  4. Observe the editor lock mechanism.
  5. Answer the questions provided by the Mentor in the sidebar.
  6. Upon answering correctly, the editor will unlock.
  7. If necessary, use Ctrl+Z to undo the paste and reset the state.

License

MIT License.

About

anti vibe-coder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors