Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 DevMind — AI-Powered Code Review & Documentation Assistant

Paste any code. Get instant AI-powered review, improvement suggestions, and auto-generated documentation.

Java Spring Boot LangChain4j React PostgreSQL Docker


📌 What is DevMind?

DevMind is a full stack developer productivity tool that uses LangChain4j and the Claude API to review code, suggest improvements, and auto-generate documentation — all through a clean, interactive React interface.

Key capabilities:

  • 🔍 AI Code Review — identifies bugs, anti-patterns, and improvements
  • ✍️ Auto Documentation — generates Javadoc and README from your code
  • 💬 Chat Interface — ask questions about your code in natural language
  • 🕘 Session History — all reviews stored and queryable via PostgreSQL
  • 🐳 Fully Containerised — runs anywhere with Docker

🏗️ Architecture

┌─────────────────────────────────────────────────────────┐
│                     React Frontend                       │
│         Code Editor · Diff View · Chat Interface        │
└─────────────────────┬───────────────────────────────────┘
                      │ REST API (HTTP)
┌─────────────────────▼───────────────────────────────────┐
│                  Spring Boot Backend                     │
│                                                         │
│   ┌─────────────┐     ┌──────────────────────────────┐  │
│   │ REST Layer  │────▶│     CodeReviewService        │  │
│   │ Controllers │     │  LangChain4j + Claude API    │  │
│   └─────────────┘     └──────────────┬───────────────┘  │
│                                      │                  │
│   ┌──────────────────────────────────▼───────────────┐  │
│   │            SessionRepository (JPA)               │  │
│   │              PostgreSQL Storage                  │  │
│   └──────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────┘
                      │
         ┌────────────▼────────────┐
         │      Claude API         │
         │  (via LangChain4j)      │
         └─────────────────────────┘

🛠️ Tech Stack

Layer Technology
Backend Java 17, Spring Boot 3.x
AI / LLM LangChain4j, Claude API (claude-sonnet)
Frontend React 18, Syntax Highlighter, Tailwind CSS
Database PostgreSQL 15 (session + history storage)
Testing JUnit 5, Mockito
DevOps Docker, Docker Compose, Maven

📁 Project Structure

devmind/
├── backend/
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/com/devmind/
│   │   │   │   ├── controller/
│   │   │   │   │   └── CodeReviewController.java
│   │   │   │   ├── service/
│   │   │   │   │   └── CodeReviewService.java
│   │   │   │   ├── model/
│   │   │   │   │   ├── CodeReviewRequest.java
│   │   │   │   │   ├── CodeReviewResponse.java
│   │   │   │   │   └── ChatSession.java
│   │   │   │   ├── repository/
│   │   │   │   │   └── ChatSessionRepository.java
│   │   │   │   └── config/
│   │   │   │       └── LangChain4jConfig.java
│   │   │   └── resources/
│   │   │       └── application.yml
│   │   └── test/
│   │       └── java/com/devmind/
│   │           └── service/
│   │               └── CodeReviewServiceTest.java
│   ├── Dockerfile
│   └── pom.xml
├── frontend/
│   ├── src/
│   │   ├── components/
│   │   │   ├── CodeEditor.jsx
│   │   │   ├── ReviewPanel.jsx
│   │   │   ├── DiffView.jsx
│   │   │   └── ChatInterface.jsx
│   │   ├── services/
│   │   │   └── api.js
│   │   └── App.jsx
│   ├── Dockerfile
│   └── package.json
└── docker-compose.yml

⚙️ Getting Started

Prerequisites

  • Java 17+
  • Node.js 18+
  • Docker & Docker Compose
  • Claude API Key (get one here)

🐳 Run with Docker (Recommended)

# 1. Clone the repo
git clone https://github.com/manaswigautam/devmind.git
cd devmind

# 2. Add your Claude API key
echo "CLAUDE_API_KEY=your_api_key_here" > .env

# 3. Start everything
docker-compose up --build

App will be running at:


🔧 Run Locally (Without Docker)

Backend:

cd backend
# Add your API key to application.yml
./mvnw spring-boot:run

Frontend:

cd frontend
npm install
npm start

📡 API Endpoints

Method Endpoint Description
POST /api/review Submit code for AI review
POST /api/docs/generate Generate Javadoc / README
POST /api/chat Chat with AI about your code
GET /api/sessions Get all past sessions
GET /api/sessions/{id} Get a specific session
DELETE /api/sessions/{id} Delete a session

Sample Request — Code Review

POST /api/review
{
  "code": "public int add(int a, int b) { return a + b; }",
  "language": "java",
  "sessionId": "optional-existing-session-id"
}

Sample Response

{
  "sessionId": "abc123",
  "suggestions": [
    "Consider adding input validation for edge cases",
    "Add Javadoc for public method documentation"
  ],
  "improvedCode": "...",
  "generatedJavadoc": "/** Adds two integers... */",
  "reviewedAt": "2025-05-25T10:30:00Z"
}

🧪 Running Tests

cd backend
./mvnw test

Test coverage target: ~70% across service and controller layers.


🖥️ Screenshots

(Add screenshots here once UI is built) Refer asset section. | Code Review View | Diff View | Chat Interface | |---|---|---| | review | diff | chat |


🗺️ Roadmap

  • Spring Boot backend with Claude API integration
  • PostgreSQL session persistence
  • React frontend with code editor
  • Side-by-side diff view
  • Natural language chat interface
  • Docker containerisation
  • GitHub repo import (paste a GitHub URL instead of code)
  • Support for multiple languages (Python, JS, Go)
  • VS Code extension

👤 Author

Manaswi Gautam


📄 License

MIT License — feel free to use and modify.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages