AI-Powered Java static code analysis platform. Analyze, optimize, and improve Java code quality instantly.
- Monaco Code Editor — Full-featured editor with Java syntax highlighting, line numbers, drag-and-drop upload
- 15+ Analysis Rules across 4 categories: Style, Performance, Best Practice, Complexity
- Quality Score — 0–100 animated score with Excellent/Good/Average/Poor grades
- Warnings Panel — Expandable categorized warnings with severity badges
- Suggestions Panel — Actionable improvement recommendations
- Performance Insights — Cyclomatic complexity, maintainability, and readability scores
- Export Report — Download full analysis as JSON
- Animated UI — Framer Motion transitions, glassmorphism cards, loading overlay
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS v4, Framer Motion, Axios |
| Editor | Monaco Editor (@monaco-editor/react) |
| Icons | Lucide React |
| Backend | Java 17, Spring Boot 3.2, Maven |
| Analysis | Custom regex-based static analysis rule engine |
| Deployment | Vercel (frontend) · Render/Railway (backend) |
- Node.js 18+
- Java 17+
- Maven 3.8+
git clone https://github.com/yourusername/codeinsight-ai.git
cd codeinsight-aicd backend
mvn spring-boot:runBackend starts at http://localhost:8080
cd frontend
npm install
npm run devFrontend starts at http://localhost:5173
codeinsight-ai/
├── backend/
│ ├── pom.xml
│ └── src/main/java/com/codeinsight/
│ ├── CodeInsightApplication.java
│ ├── config/CorsConfig.java
│ ├── controller/AnalysisController.java
│ ├── service/CodeAnalysisService.java
│ ├── analyzer/
│ │ ├── RuleSet.java
│ │ ├── ScoreCalculator.java
│ │ └── rules/
│ │ ├── StyleRules.java
│ │ ├── PerformanceRules.java
│ │ ├── BestPracticeRules.java
│ │ └── ComplexityRules.java
│ ├── dto/
│ │ ├── AnalyzeRequest.java
│ │ └── AnalyzeResponse.java
│ └── model/
│ ├── Warning.java
│ └── Metrics.java
│
└── frontend/
├── vercel.json
├── .env
└── src/
├── App.jsx
├── main.jsx
├── index.css
├── pages/
│ ├── LandingPage.jsx
│ └── Dashboard.jsx
├── components/
│ ├── Navbar.jsx
│ ├── CodeEditor.jsx
│ ├── ScoreCard.jsx
│ ├── WarningsPanel.jsx
│ ├── SuggestionsPanel.jsx
│ ├── MetricsCard.jsx
│ └── LoadingOverlay.jsx
├── services/api.js
├── hooks/useAnalysis.js
└── utils/helpers.js
Analyze Java source code.
Request:
{
"code": "public class MyClass { ... }"
}Response:
{
"score": 74,
"grade": "Good",
"totalLines": 42,
"issueCount": 5,
"warnings": [
{
"type": "BestPractice",
"message": "System.out.println() used at line 8. Use a Logger instead.",
"severity": "MEDIUM",
"line": 8,
"ruleId": "SYSOUT_USAGE"
}
],
"suggestions": [
"Replace System.out.println() with SLF4J Logger..."
],
"metrics": {
"complexityScore": 80,
"maintainabilityScore": 65,
"readabilityScore": 72,
"cyclomaticComplexity": 4,
"methodCount": 3,
"effectiveLines": 28
}
}Returns {"status":"UP","service":"CodeInsight AI"}
| Category | Rule | Severity |
|---|---|---|
| Style | Short variable names (≤ 1 char) | LOW |
| Style | Missing Javadoc on public members | LOW |
| Style | Method > 30 lines | MEDIUM |
| Style | Class > 200 lines | MEDIUM |
| Performance | Nested loops | HIGH |
| Performance | String += in loops |
HIGH |
| Performance | Unnecessary boxing (new Integer) | MEDIUM |
| BestPractice | System.out.println usage | MEDIUM |
| BestPractice | Magic numbers | LOW |
| BestPractice | Hardcoded credentials | CRITICAL |
| BestPractice | Empty catch blocks | HIGH |
| BestPractice | Catching generic Exception | MEDIUM |
| BestPractice | Returning null | LOW |
| Complexity | Deep nesting (depth ≥ 5) | HIGH |
| Complexity | High cyclomatic complexity (> 10) | HIGH |
| Complexity | Too many method parameters (> 5) | MEDIUM |
- Push
frontend/folder to GitHub - Import project in vercel.com
- Set environment variable:
VITE_API_URL=https://your-backend.railway.app - Deploy
- Push
backend/folder to GitHub - Create new project at railway.app
- Select the
backend/directory - Railway auto-detects Maven and deploys
- Copy the Railway URL and set it as
VITE_API_URLin Vercel
| Landing Page | Dashboard — Empty | Dashboard — Results |
|---|---|---|
| Hero with gradient background | Monaco editor ready | Score + warnings + suggestions |
MIT License — free to use for educational and demo purposes.
Built with ❤️ using React + Spring Boot