# Socratic Lens - Setup Guide This project is a Next.js application that uses Google's Gemini API to function as an "Ethical Tutor" or "Socratic Lens". It features a beautiful "Pixel OS" aesthetic and implements the logic defined in your prompt. ## Prerequisites 1. **Google Gemini API Key**: You need an API key. Get it from [Google AI Studio](https://aistudio.google.com/). ## Quick Start ### 1. Configure API Key Create a new file named `.env.local` in the `socratic-lens` folder. Add your API key: ```bash # In /home/ig0034/Documents/Task_2_24_12_2025/socratic-lens/.env.local GEMINI_API_KEY=your_actual_api_key_here ``` ### 2. Run the Development Server Open your terminal in the `socratic-lens` directory and run: ```bash cd socratic-lens npm run dev ``` ### 3. Open in Browser Visit [http://localhost:3000](http://localhost:3000). ## Project Structure * **`src/app/page.tsx`**: The main frontend logic (Upload UI + Result Renderer). * **`src/app/api/analyze/route.ts`**: The backend API that connects to Gemini. * **`src/prompts/system_prompt.md`**: The brain of the AI (Ethical Tutor Persona). * **`src/app/globals.css`**: Tailwind v4 + Custom styles for the Pixel look. ## Usage 1. **Upload an Image**: Take a screenshot of a math problem or a complex paragraph. 2. **Click Analyze**: The AI will process it using the "Socratic Lens" rules. 3. **Learn**: See the beautiful, structured output that guides you without cheating.