SkillExtractor is an AI-powered application that analyzes Java projects to identify programming skills and assess knowledge levels through automated quizzes.
- Overview
- Features
- Tech Stack
- Project Structure
- Getting Started
- Usage
- Common Issues & Solutions
- API Documentation
- Deployment
- Contributing
- License
SkillExtractor helps developers:
- Discover programming skills used in their Java projects
- Assess knowledge level through AI-generated quizzes
- Track skill progression across multiple projects
- Build a comprehensive skill portfolio
- Upload your Java project (up to 20 files)
- Analyze code using OpenAI GPT-4
- Extract skills mapped to predefined categories
- Quiz yourself to determine proficiency level
- Track your skills in a personal dashboard
- β User registration and authentication (Basic Auth + Custom UserDetailsService)
- β Java project upload and validation
- β AI-powered skill extraction (15 predefined categories)
- β Automated quiz generation for each skill
- β Skill level assessment (Unknown β Basic β Good β Expert)
- β Personal skill dashboard with real-time updates
- β Project management (upload, list, delete)
- β Response caching to optimize API usage
- β JSON serialization protection (@JsonIgnore patterns)
- π Python project support
- π GitHub repository integration
- π PDF/JSON skill export
- π Visual skill radar charts
- π Learning path recommendations
- π Achievement badges
- Java 17 with Spring Boot 3.2
- Spring Security (Basic Auth + Custom UserDetailsService)
- Spring Data JPA + Hibernate
- PostgreSQL 15
- OpenAI Java SDK
- Caffeine Cache
@JsonIgnorefor preventing infinite recursion (User β Project β Skill)@Transactional(readOnly = true)for LazyInitializationException prevention- Custom
@Queryannotations for complex JPA queries - XSS protection with HTML escaping
- HTML5 + CSS3 + Bootstrap 5
- Vanilla JavaScript (Fetch API)
- Real-time dashboard updates
- Local Development (PostgreSQL + Maven)
- Railway.app (Production - optional)
skillextractor/
β
βββ src/
β βββ main/
β β βββ java/com/skillextractor/
β β β βββ SkillExtractorApplication.java
β β β β
β β β βββ config/
β β β β βββ SecurityConfig.java # Spring Security + UserDetailsService
β β β β βββ CacheConfig.java # Caffeine cache
β β β β βββ OpenAIConfig.java # OpenAI client
β β β β
β β β βββ controller/
β β β β βββ AuthController.java # Registration/Login
β β β β βββ ProjectController.java # CRUD operations (@Transactional)
β β β β βββ SkillController.java # Skill retrieval
β β β β βββ QuizController.java # Quiz generation/submission
β β β β
β β β βββ service/
β β β β βββ UserService.java # User management
β β β β βββ CustomUserDetailsService.java # β NEW: Spring Security integration
β β β β βββ ProjectService.java # Project operations
β β β β βββ SkillAnalysisService.java # AI-powered analysis
β β β β βββ OpenAIService.java # OpenAI API integration
β β β β βββ QuizService.java # Quiz logic
β β β β
β β β βββ repository/
β β β β βββ UserRepository.java
β β β β βββ ProjectRepository.java # Custom @Query methods
β β β β βββ SkillRepository.java
β β β β βββ QuizResultRepository.java
β β β β
β β β βββ model/
β β β β βββ User.java # @JsonIgnore for security
β β β β βββ Project.java # @JsonIgnore for circular refs
β β β β βββ Skill.java
β β β β βββ QuizResult.java
β β β β
β β β βββ dto/ # 7 DTOs
β β β βββ enums/ # SkillCategory, SkillLevel
β β β βββ exception/ # Global exception handling
β β β
β β βββ resources/
β β βββ application.properties
β β βββ application-dev.properties
β β βββ application-prod.properties
β β β
β β βββ static/
β β βββ index.html
β β βββ login.html
β β βββ register.html
β β βββ dashboard.html # Real-time updates
β β βββ css/style.css
β β βββ js/
β β βββ app.js
β β βββ dashboard.js # Delete + auto-refresh
β
βββ pom.xml
βββ Dockerfile
βββ docker-compose.yml
βββ README.md
**Total: 48+ files** (including CustomUserDetailsService)
- Java 17 or higher
- Maven 3.8+
- PostgreSQL 15 (or use Docker)
- OpenAI API Key (Get one here)
git clone https://github.com/yourusername/skillextractor.git
cd skillextractorCREATE DATABASE skillextractor;
CREATE USER skillextractor_user WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE skillextractor TO skillextractor_user;Edit src/main/resources/application.properties:
spring.datasource.url=jdbc:postgresql://localhost:5432/skillextractor
spring.datasource.username=your_username
spring.datasource.password=your_password
# OpenAI API Key
openai.api.key=${OPENAI_API_KEY}export OPENAI_API_KEY=your_openai_api_keyOr add to application-dev.properties:
openai.api.key=sk-your-key-heremvn clean install
mvn spring-boot:run- Frontend:
http://localhost:8080 - API:
http://localhost:8080/api
# 1. Set environment variable
export OPENAI_API_KEY=your_openai_api_key
# 2. Run with Docker Compose
docker-compose up --build
# 3. Access application
http://localhost:8080Navigate to /register and create your account.
- Go to Dashboard β "Upload Project"
- Select local folder containing your Java project
- Supported files:
.java,pom.xml,.properties - Max: 20 files, 10MB total
Skills are automatically extracted and categorized into 15 categories:
- Syntax Basics, OOP, Collections, Streams & Lambdas
- Exception Handling, File Handling, Database
- Frameworks, Clean Code, Algorithms
- Testing, Build Tools, Design Patterns
- Concurrency, REST API
- Click on any skill to generate a quiz
- Answer 3-5 AI-generated questions
- Receive skill level assessment:
- π₯ Unknown (0-40%)
- π¨ Basic (41-60%)
- π© Good (61-85%)
- π¦ Expert (86-100%)
- View all your projects in the dashboard
- Delete projects (with cascade delete of skills)
- Track skill progression across projects
Problem: JPA query method name doesn't match entity structure.
Solution: Use @Query annotation:
@Query("SELECT p FROM Project p WHERE p.user.id = :userId")
List<Project> findByUserId(@Param("userId") Long userId);Problem: Hibernate tries to load relationships outside session.
Solution: Add @Transactional(readOnly = true):
@GetMapping
@Transactional(readOnly = true)
public ResponseEntity<List<Project>> getUserProjects() { ... }Problem: Jackson tries to serialize circular references.
Solution: Add @JsonIgnore to relationships:
@Entity
public class Project {
@ManyToOne
@JsonIgnore // Prevent recursion
private User user;
}Problem: Frontend doesn't refresh after operations.
Solution: Call loadProjects() after upload/delete:
await Promise.all([loadProjects(), loadSkills()]);Problem: Using old Spring Security 5.x syntax.
Solution: Update to Spring Security 6.x:
.httpBasic(Customizer.withDefaults()) // New syntaxProblem: Function not globally accessible or wrong onclick.
Solution: Ensure deleteProject() is outside DOMContentLoaded:
// Global function
async function deleteProject(projectId) { ... }For more troubleshooting, see:
DIAGNOSTIC_GUIDE.md- Complete diagnostic stepsFRONTEND_FIX_COMPLETE.md- Frontend issuesDELETE_FIX_GUIDE.md- Delete functionality
All endpoints (except registration/login) require Basic Auth:
Authorization: Basic base64(username:password)
POST /api/projects/upload # Upload new project
GET /api/projects # List user's projects
GET /api/projects/{id} # Get project details
DELETE /api/projects/{id} # Delete projectGET /api/skills # List all user skills
GET /api/skills/category/{cat} # Skills by category
GET /api/skills/{id} # Skill detailsPOST /api/quiz/generate/{skillId} # Generate quiz
POST /api/quiz/submit # Submit answers
GET /api/quiz/results/{skillId} # Get latest resultFull API documentation: docs/API.md
mvn spring-boot:run -Dspring-boot.run.profiles=dev- Connect GitHub repository to Railway
- Add PostgreSQL database (Railway provides free tier)
- Set environment variables:
OPENAI_API_KEYSPRING_PROFILES_ACTIVE=prod
- Deploy - Railway auto-builds and deploys
Railway provides a public URL: https://your-app.railway.app
Deployment guide: docs/DEPLOYMENT.md
Contributions are welcome! Please:
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
This project is licensed under the MIT License - see LICENSE file for details.
Created as a learning project to practice:
- Java & Spring Boot development
- REST API design
- OpenAI API integration
- Database modeling with proper JPA patterns
- Spring Security with custom authentication
- Full-stack development with real-time updates
- JSON serialization best practices
- OpenAI for GPT API
- Railway.app for hosting
- Spring Boot for excellent framework
- Community for troubleshooting and best practices
- FUNCTIONALITIES.md - Feature specifications
- STACK.md - Technology stack details
- DEPLOYMENT.md - Deployment guide
- API.md - API documentation
DIAGNOSTIC_GUIDE.md- Step-by-step diagnosticsFRONTEND_FIX_COMPLETE.md- Frontend JSON issuesDELETE_FIX_GUIDE.md- Delete functionalityREPOSITORY_FIX.md- JPA query problems
DebugController.java- Diagnostic endpoints (temporary)test-api.html- Frontend API tester
- β
Added
CustomUserDetailsServicefor Spring Security - β
Fixed JSON infinite recursion with
@JsonIgnore - β
Fixed
LazyInitializationExceptionwith@Transactional - β
Updated to Spring Security 6.x syntax (
Customizer.withDefaults()) - β
Fixed JPA queries with
@Queryannotations - β Added real-time dashboard updates
- β Improved delete functionality with proper cascade
- β Added XSS protection with HTML escaping
- β Enhanced error logging and debugging
β Star this repo if you find it helpful!
π¬ Questions? Open an issue!
π Found a bug? Check troubleshooting guides first!