SkillAgentSearch skills...

Job Recommendation System

Intelligent job recommendation platform using Java + MySQL + Redis. Supports location-based search, AI keyword extraction, and personalized suggestions.

Install / Use

npx skills add nuglifeleoji/Job-Recommendation-System

Installs into whichever agent you are using.

README

🚀 Job Recommendation System

An intelligent job recommendation system that provides location-based job search with personalized recommendations, built with Java, MySQL, Redis, and modern web technologies.

📋 Table of Contents

✨ Features

Core Functionality

  • 🌍 Location-Based Search: Find jobs near any geographic location
  • ⭐ Smart Favorites: Save and manage favorite job listings
  • 🔍 Keyword Extraction: Automatic job keyword extraction using AI
  • 📊 Personalized Recommendations: AI-powered job recommendations
  • ⚡ Redis Caching: High-performance caching for improved response times

Security & Performance

  • 🔐 Secure Authentication: MD5-hashed passwords with session management
  • 🛡️ Input Validation: Comprehensive input sanitization and validation
  • 📝 Structured Logging: Centralized logging with multiple levels
  • ⚙️ Environment Configuration: Flexible configuration management
  • 🚦 Error Handling: Structured exception handling with user-friendly messages

User Experience

  • 💻 Responsive Web Interface: Modern, mobile-friendly UI
  • 🔄 Real-time Updates: Dynamic content loading with AJAX
  • 📱 Cross-platform Compatibility: Works on desktop, tablet, and mobile
  • 🎨 Professional Design: Clean, intuitive user interface

🏗️ Architecture

System Components

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Frontend      │    │    Backend      │    │   External APIs │
│                 │    │                 │    │                 │
│ • HTML/CSS/JS   │◄──►│ • Java Servlets │◄──►│ • SerpAPI       │
│ • Bootstrap     │    │ • REST APIs     │    │ • EdenAI        │
│ • AJAX          │    │ • Business Logic│    │ • GeoConverter  │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                                │
                                ▼
                       ┌─────────────────┐    ┌─────────────────┐
                       │   Data Layer    │    │     Cache       │
                       │                 │    │                 │
                       │ • MySQL DB      │◄──►│ • Redis         │
                       │ • Connection    │    │ • Session Store │
                       │   Pooling       │    │ • Search Cache  │
                       └─────────────────┘    └─────────────────┘

Technology Stack

Backend:

  • Java 11+ with Servlet API
  • Maven for dependency management
  • MySQL 8.0+ for data persistence
  • Redis for caching and session management

Frontend:

  • HTML5, CSS3, JavaScript (ES6+)
  • Bootstrap for responsive design
  • AJAX for asynchronous communication

External Services:

  • SerpAPI: Google Jobs search integration
  • EdenAI: AI-powered keyword extraction
  • GeoConverter: Coordinate to location code conversion

Development & Deployment:

  • JUnit 5 for unit testing
  • Apache Tomcat 9+ as servlet container
  • Environment-based configuration
  • Comprehensive logging system

📋 Prerequisites

Before you begin, ensure you have the following installed:

  • Java Development Kit (JDK) 11 or higher
  • Apache Maven 3.6+
  • MySQL 8.0+
  • Redis 6.0+
  • Apache Tomcat 9.0+

Required API Keys

🚀 Installation

1. Clone the Repository

git clone https://github.com/your-username/job-recommendation-system.git
cd job-recommendation-system

2. Database Setup

# Start MySQL server
# Create database and user
mysql -u root -p

# Run the initialization script
mysql -u root -p < scripts/init-database.sql

3. Redis Setup

# Start Redis server
redis-server

# Test Redis connection
redis-cli ping

4. Environment Configuration

Run the setup script to configure environment variables:

# Windows
scripts\setup-env.bat

# Or manually set environment variables:
set DB_HOST=localhost
set DB_PORT=3306
set DB_NAME=jobrec
set DB_USERNAME=admin
set DB_PASSWORD=your_password
set REDIS_HOST=localhost
set REDIS_PORT=6379
set REDIS_PASSWORD=your_redis_password
set SERPAPI_KEY=your_serpapi_key
set EDENAI_KEY=your_edenai_key
set APP_ENVIRONMENT=dev

5. Build the Application

mvn clean compile package

6. Deploy to Tomcat

# Copy WAR file to Tomcat webapps directory
cp target/JobSearch-1.0-SNAPSHOT.war $TOMCAT_HOME/webapps/jobrec.war

# Start Tomcat
$TOMCAT_HOME/bin/startup.sh  # Linux/Mac
# or
%TOMCAT_HOME%\bin\startup.bat  # Windows

⚙️ Configuration

Application Properties

The application supports environment-specific configuration:

  • application.properties - Default configuration
  • application-dev.properties - Development environment
  • application-prod.properties - Production environment

Key Configuration Options

# Database Configuration
db.host=localhost
db.port=3306
db.name=jobrec
db.username=admin

# Redis Configuration
redis.host=localhost
redis.port=6379
redis.ttl=60

# Search Configuration
search.default.keyword=engineer
search.results.limit=20
search.cache.enabled=true

# Logging Configuration
logging.level=INFO
logging.file.enabled=true
logging.console.enabled=true

🎯 Usage

Web Interface

  1. Access the Application: Navigate to http://localhost:8080/jobrec

  2. User Registration:

    • Click "New User? Register"
    • Fill in username, password, first name, and last name
    • Click "Register"
  3. Login:

    • Enter your username and password
    • Click "Login"
  4. Search for Jobs:

    • The system will use your browser's geolocation
    • Browse nearby job listings
    • Use the search functionality for specific keywords
  5. Manage Favorites:

    • Click the heart icon to favorite/unfavorite jobs
    • View your favorites in the "My Favorites" section
  6. Get Recommendations:

    • Click "Recommendation" to see personalized job suggestions
    • Recommendations are based on your favorite jobs and keywords

Sample Users

The database comes with pre-configured test users:

| Username | Password | Description | |----------|----------|-------------| | admin | password123 | Administrator account | | john_doe | password123 | Sample user with favorites | | jane_smith | password123 | Sample user with applications | | test_user | password123 | Basic test user |

📚 API Documentation

Authentication Endpoints

POST /login

Authenticate user and create session.

Request:

{
    "user_id": "john_doe",
    "password": "password123"
}

Response:

{
    "result": "SUCCESS",
    "name": "John Doe"
}

POST /register

Register a new user account.

Request:

{
    "user_id": "new_user",
    "password": "secure_password",
    "first_name": "John",
    "last_name": "Doe"
}

Response:

{
    "result": "Registration successful"
}

GET /logout

Logout user and invalidate session.

Response:

{
    "result": "Logout successful"
}

Job Search Endpoints

GET /search

Search for jobs based on location and keywords.

Parameters:

  • user_id (required): User identifier
  • lat (required): Latitude coordinate
  • lon (required): Longitude coordinate
  • keyword (optional): Search keyword

Example:

GET /search?user_id=john_doe&lat=37.7749&lon=-122.4194&keyword=software engineer

Response:

[
    {
        "id": "job_12345",
        "title": "Senior Software Engineer",
        "company_name": "TechCorp Inc.",
        "location": "San Francisco, CA",
        "description": "Develop and maintain web applications...",
        "url": "https://example.com/job/12345",
        "keywords": ["Java", "Spring Boot", "REST API"],
        "favorite": false
    }
]

Favorites Management

POST /history

Add or remove job from favorites.

Request:

{
    "user_id": "john_doe",
    "favorite": [
        {
            "item_id": "job_12345",
            "favorite": true
        }
    ]
}

Response:

{
    "result": "SUCCESS"
}

GET /history

Get user's favorite jobs.

Parameters:

  • user_id (required): User identifier

Response:

[
    {
        "id": "job_12345",
        "title": "Senior Software Engineer",
        "company_name": "TechCorp Inc.",
        "location": "San Francisco, CA",
        "url": "https://example.com/job/12345",
        "keywords": ["Java", "Spring Boot"],
        "favorite": true
    }
]

Recommendations

GET /recommendation

Get personalized job recommendations.

Parameters:

  • user_id (required): User identifier
  • lat (required): Latitude coordinate
  • lon (required): Longitude coordinate

Response:

[
    {
        "id": "job_67890",
        "title": "Java Developer",
        "company_name": "DevCorp",
        "location": "San Francisco, CA",
        "description": "Work with Java and Spring framework...",
        "url": "https://example.com/job/67890",
        "keywords": ["Java", "Spring"],
        "favorite": false
    }
]

💻 Development

Project Structure

job-recommendation-system/
├── Source Code/
│   ├── Backend/
│   │   ├── config/           # Configuration management
│   │   ├── db/              # Database connections
│   │   ├── entity/          # Data models
│   │   ├── exception/       # Custom exceptions
│   │   ├── external/        # External API clients
│   │   ├── recommendation/  # Recommendation algorithms
│   │   ├── servlet/         # HTTP request handlers
│   │   ├── te

Related Skills

View on GitHub
GitHub Stars232
CategoryDevelopment
Updated8d ago
Forks35

Languages

Java

Security Score

85/100

Audited on Jul 30, 2026

No findings