The intelligent "Brain" behind Buddy. This Spring Boot application handles problem analysis and generates pedagogical hints using advanced prompt engineering.
This repository contains the RESTful API that powers the Buddy Chrome Extension. It leverages Large Language Models to guide coders through coding challenges on LeetCode and GeeksforGeeks.
- Language: Java 17
- Framework: Spring Boot 3.5
- AI Integration: Spring AI with Gemini 2.5 Flash
- Resilience: Resilience4j (Rate Limiting)
- Infrastructure: Docker & Render
- REST API: Exposes a POST endpoint at
/api/buddy/hintto receive problem descriptions. - Rate Limiter: Implements a strict rate-limiting policy via Resilience4j to manage API quotas effectively.
- Socratic Engine: Uses custom prompt templates to ensure the AI provides guidance and hints rather than direct solutions.
The application is containerized using a multi-stage Docker build and hosted on Render.
- Live URL:
https://buddy-51vj.onrender.com/api/buddy/hint - Port: Configured to run on internal port
8765.
- Clone the repository.
- Set the environment variable:
export GEMINI_API_KEY='your_key_here'. - Run the application:
mvn spring-boot:run.
Looking for the interface? Visit the Buddy Frontend Repository.
Preetibarsha Dash