Repository files navigation

JobOffers for Junior Java Developers

License: MIT

JobOffers is a web application designed to aggregate job offers specifically for Junior Java Developers from various online sources. The primary goal is to provide a centralized platform with up-to-date job listings from diverse websites and applications, simplifying the job search process.

Video Demo: https://www.youtube.com/watch?v=odNjBvRsTFs

Project Description

This application automates the collection of job offers, ensuring that Junior Java Developers have access to the latest opportunities in their field. It features robust backend services for data retrieval, storage, and management, along with API endpoints for seamless integration.

This project uses a modular monolithic application architecture with elements of hexagonal principles.

🔗 Live Demo: live-demo

Hosted on AWS (EC2 + ECR) with full Docker-based deployment.

Features

  • Automated Job Offer Aggregation: Fetches job listings from multiple websites and applications.
  • Junior Java Developer Focus: Tailored job offers relevant to entry-level Java developers.
  • RESTful API: Provides endpoints for accessing and managing job offer data.
  • Data Storage: Utilizes MongoDB for efficient data storage and retrieval.
  • Filtering and Search: Enables users to filter and search job offers based on various criteria.
  • Security: Implements JWT authentication for secure access to API endpoints.
  • Scheduling: Uses Spring Scheduler for periodic job offer updates.
  • Caching: Redis integration for improved performance and reduced database load.
  • Containerization: Docker and Docker Compose for easy deployment and scalability.
  • Live Demo: Deployed on AWS EC2 with Dockerized setup. Publicly accessible demo for showcasing features.
  • React Frontend (WIP): Frontend integration in progress using React to enhance user experience.

Architecture

Architecture Diagram

  • The C3 diagram above presents main application components and module dependencies.

Tech

JobOffers is developed using the following technologies:

Core:

BackendSpring BootJava
Spring Boot (REST Controllers, Test, Data MongoDB, Validation, Security, JWT, Spring Scheduler)
DatabaseMongoDBMongoExpress
MongoDB, MongoExpress
ContainerizationDockerDocker ComposeDocker Desktop
Docker, Docker Compose, Docker Desktop
TestingJUnit5MockitoAssertJ
Wiremock, Testcontainers, MockMvc, Awaitility, JUnit5, Mockito, AssertJ, SpringBootTest, SpringSecurityTest
LoggingLog4j2
Log4j2
NetworkingRestTemplateJSONHTTP
RestTemplate, JSON, HTTP
UtilitiesLombokRedisJedis
Lombok, Redis (Jedis, Redis-Commander)
Build ToolMaven
Maven
Version ControlGitGitHub / GitLab
Git, GitHub/GitLab
IDEIntelliJ Ultimate
API DocumentationSwagger
Swagger
CI/CDJenkins
Jenkins
Project ManagementSCRUMJira
SCRUM, Jira
Dev. PracticesCode Review, Pair Programming
FrontendReact
React (basic UI integration – WIP)
HostingAWS EC2AWS ECRSecurity Groups
AWS EC2, Amazon ECR, IAM Roles, Security Groups configuration

Installation and Setup

  1. Clone the Repository:

    git clone [https://github.com/Senegalion/JobOffers.git](https://github.com/Senegalion/JobOffers.git)
  2. Navigate to the Project Directory:

    cd JobOffers
  3. Build and Run with Docker Compose:

    docker-compose up --build

    This will start the application, MongoDB, MongoExpress, and Redis using Docker containers.

  4. Configuration:

    • Environment variables are managed within the docker-compose.yml file.
    • Adjust configurations for MongoDB, Redis, and other services as needed.
  5. Access the Application:

    • The application will be accessible at http://localhost:8082.
    • MongoExpress will be accessible at http://localhost:8081.
      • Note: MongoExpress requires login. Use admin as username and pass as password.
    • Redis commander is accessible at http://localhost:8083
    • Swagger UI will be accessible at http://localhost:8082/swagger-ui/index.html

Usage

  • Use the provided REST API endpoints to access and manage job offer data.
  • Utilize Swagger UI for API documentation and testing.
  • Monitor the application and database using MongoExpress and Redis Commander.

API Endpoints

Registration

POST /register

Registers a new user.

Request Body Example:

{
"username": "newuser",
"password": "password123"
}

Response:

{
"userId": "user-id",
"wasCreated": true,
"username": "newuser"
}

Authentication (Login)

POST /token

Authenticates a user and generates a JWT token.

Request Body Example:

{
"username": "newuser",
"password": "password123"
}

Response:

{
"username": "newuser",
"token": "generated-jwt-token"
}

Job Offer Endpoints (Requires Authentication)

Note: The following endpoints require a valid JWT token in the Authorization header.

Get All Job Offers

GET /offers

Retrieves all available job offers.

Response:

[
{
"offerId": "offer-id",
"title": "Junior Java Developer",
"company": "Company Name",
"location": "Location",
"description": "Job description here...",
"url": "[http://job-offer-link.com](http://job-offer-link.com)"
}
]

Get Job Offer by ID

GET /offers/{offerId}

Retrieves details of a job offer by its ID.

Response:

[
{
"offerId": "offer-id",
"title": "Junior Java Developer",
"company": "Company Name",
"location": "Location",
"description": "Job description here...",
"url": "[http://job-offer-link.com](http://job-offer-link.com)"
}
]

Add a New Job Offer

POST /offers

Retrieves details of a job offer by its ID.

Request Body Example:

[
{
"title": "Junior Java Developer",
"company": "Company Name",
"location": "Location",
"description": "Job description here...",
"url": "[http://job-offer-link.com](http://job-offer-link.com)"
}
]

Response:

[
{
"offerId": "new-offer-id",
"title": "Junior Java Developer",
"company": "Company Name",
"location": "Location",
"description": "Job description here...",
"url": "[http://job-offer-link.com](http://job-offer-link.com)"
}
]

Error Handling

The API returns the following error codes:

  • 400 Bad Request: Invalid input data (e.g., missing required fields in the request).
  • 404 Not Found: The job offer was not found.
  • 500 Internal Server Error: A server error occurred.

Swagger UI (API Testing)

You can easily explore and test the API using Swagger UI.

  1. Access Swagger UI: After running the application, navigate to the following URL in your web browser:

    http://localhost:8082/swagger-ui/index.html
    
  2. Interactive Interface: You will be presented with an interactive interface where you can:

    • View all available API endpoints.
    • Test each endpoint by sending requests and inspecting the responses.
    • Interact with the API in a user-friendly way without manually crafting HTTP requests.
  3. Example: Here's an example of what the Swagger UI interface might look like:

    Swagger UI Screenshot

Integration Testing

The application includes integration tests to validate the functionality of the endpoints.

To run the tests, use:

./mvnw test

Tests include:

  • verifying the correctness of retrieving job offers.
  • handling errors for invalid input data.

Contribution

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes.
  4. Push your changes to your fork.
  5. Submit a pull request.

License

This project is licensed under the MIT License.

Author

Senegalion

Contact

For questions or feedback, please contact me via email.

Acknowledgments

  • Shields.io
  • Badges 4 README.md

About

A Spring Boot web application that collects and processes job offers for Junior Java Developers from multiple external sources. It features REST APIs, MongoDB, Redis, Docker, and a full testing setup with JUnit, Mockito, and Testcontainers.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all \u003cpre\u003e\u003ccode\u003e blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks"); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); })();
Skip to content

Repository files navigation

JobOffers for Junior Java Developers

License: MIT

JobOffers is a web application designed to aggregate job offers specifically for Junior Java Developers from various online sources. The primary goal is to provide a centralized platform with up-to-date job listings from diverse websites and applications, simplifying the job search process.

Video Demo: https://www.youtube.com/watch?v=odNjBvRsTFs

Project Description

This application automates the collection of job offers, ensuring that Junior Java Developers have access to the latest opportunities in their field. It features robust backend services for data retrieval, storage, and management, along with API endpoints for seamless integration.

This project uses a modular monolithic application architecture with elements of hexagonal principles.

🔗 Live Demo: live-demo

Hosted on AWS (EC2 + ECR) with full Docker-based deployment.

Features

  • Automated Job Offer Aggregation: Fetches job listings from multiple websites and applications.
  • Junior Java Developer Focus: Tailored job offers relevant to entry-level Java developers.
  • RESTful API: Provides endpoints for accessing and managing job offer data.
  • Data Storage: Utilizes MongoDB for efficient data storage and retrieval.
  • Filtering and Search: Enables users to filter and search job offers based on various criteria.
  • Security: Implements JWT authentication for secure access to API endpoints.
  • Scheduling: Uses Spring Scheduler for periodic job offer updates.
  • Caching: Redis integration for improved performance and reduced database load.
  • Containerization: Docker and Docker Compose for easy deployment and scalability.
  • Live Demo: Deployed on AWS EC2 with Dockerized setup. Publicly accessible demo for showcasing features.
  • React Frontend (WIP): Frontend integration in progress using React to enhance user experience.

Architecture

Architecture Diagram

  • The C3 diagram above presents main application components and module dependencies.

Tech

JobOffers is developed using the following technologies:

Core:

BackendSpring BootJava
Spring Boot (REST Controllers, Test, Data MongoDB, Validation, Security, JWT, Spring Scheduler)
DatabaseMongoDBMongoExpress
MongoDB, MongoExpress
ContainerizationDockerDocker ComposeDocker Desktop
Docker, Docker Compose, Docker Desktop
TestingJUnit5MockitoAssertJ
Wiremock, Testcontainers, MockMvc, Awaitility, JUnit5, Mockito, AssertJ, SpringBootTest, SpringSecurityTest
LoggingLog4j2
Log4j2
NetworkingRestTemplateJSONHTTP
RestTemplate, JSON, HTTP
UtilitiesLombokRedisJedis
Lombok, Redis (Jedis, Redis-Commander)
Build ToolMaven
Maven
Version ControlGitGitHub / GitLab
Git, GitHub/GitLab
IDEIntelliJ Ultimate
API DocumentationSwagger
Swagger
CI/CDJenkins
Jenkins
Project ManagementSCRUMJira
SCRUM, Jira
Dev. PracticesCode Review, Pair Programming
FrontendReact
React (basic UI integration – WIP)
HostingAWS EC2AWS ECRSecurity Groups
AWS EC2, Amazon ECR, IAM Roles, Security Groups configuration

Installation and Setup

  1. Clone the Repository:

    git clone [https://github.com/Senegalion/JobOffers.git](https://github.com/Senegalion/JobOffers.git)
  2. Navigate to the Project Directory:

    cd JobOffers
  3. Build and Run with Docker Compose:

    docker-compose up --build

    This will start the application, MongoDB, MongoExpress, and Redis using Docker containers.

  4. Configuration:

    • Environment variables are managed within the docker-compose.yml file.
    • Adjust configurations for MongoDB, Redis, and other services as needed.
  5. Access the Application:

    • The application will be accessible at http://localhost:8082.
    • MongoExpress will be accessible at http://localhost:8081.
      • Note: MongoExpress requires login. Use admin as username and pass as password.
    • Redis commander is accessible at http://localhost:8083
    • Swagger UI will be accessible at http://localhost:8082/swagger-ui/index.html

Usage

  • Use the provided REST API endpoints to access and manage job offer data.
  • Utilize Swagger UI for API documentation and testing.
  • Monitor the application and database using MongoExpress and Redis Commander.

API Endpoints

Registration

POST /register

Registers a new user.

Request Body Example:

{
"username": "newuser",
"password": "password123"
}

Response:

{
"userId": "user-id",
"wasCreated": true,
"username": "newuser"
}

Authentication (Login)

POST /token

Authenticates a user and generates a JWT token.

Request Body Example:

{
"username": "newuser",
"password": "password123"
}

Response:

{
"username": "newuser",
"token": "generated-jwt-token"
}

Job Offer Endpoints (Requires Authentication)

Note: The following endpoints require a valid JWT token in the Authorization header.

Get All Job Offers

GET /offers

Retrieves all available job offers.

Response:

[
{
"offerId": "offer-id",
"title": "Junior Java Developer",
"company": "Company Name",
"location": "Location",
"description": "Job description here...",
"url": "[http://job-offer-link.com](http://job-offer-link.com)"
}
]

Get Job Offer by ID

GET /offers/{offerId}

Retrieves details of a job offer by its ID.

Response:

[
{
"offerId": "offer-id",
"title": "Junior Java Developer",
"company": "Company Name",
"location": "Location",
"description": "Job description here...",
"url": "[http://job-offer-link.com](http://job-offer-link.com)"
}
]

Add a New Job Offer

POST /offers

Retrieves details of a job offer by its ID.

Request Body Example:

[
{
"title": "Junior Java Developer",
"company": "Company Name",
"location": "Location",
"description": "Job description here...",
"url": "[http://job-offer-link.com](http://job-offer-link.com)"
}
]

Response:

[
{
"offerId": "new-offer-id",
"title": "Junior Java Developer",
"company": "Company Name",
"location": "Location",
"description": "Job description here...",
"url": "[http://job-offer-link.com](http://job-offer-link.com)"
}
]

Error Handling

The API returns the following error codes:

  • 400 Bad Request: Invalid input data (e.g., missing required fields in the request).
  • 404 Not Found: The job offer was not found.
  • 500 Internal Server Error: A server error occurred.

Swagger UI (API Testing)

You can easily explore and test the API using Swagger UI.

  1. Access Swagger UI: After running the application, navigate to the following URL in your web browser:

    http://localhost:8082/swagger-ui/index.html
    
  2. Interactive Interface: You will be presented with an interactive interface where you can:

    • View all available API endpoints.
    • Test each endpoint by sending requests and inspecting the responses.
    • Interact with the API in a user-friendly way without manually crafting HTTP requests.
  3. Example: Here's an example of what the Swagger UI interface might look like:

    Swagger UI Screenshot

Integration Testing

The application includes integration tests to validate the functionality of the endpoints.

To run the tests, use:

./mvnw test

Tests include:

  • verifying the correctness of retrieving job offers.
  • handling errors for invalid input data.

Contribution

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes.
  4. Push your changes to your fork.
  5. Submit a pull request.

License

This project is licensed under the MIT License.

Author

Senegalion

Contact

For questions or feedback, please contact me via email.

Acknowledgments

  • Shields.io
  • Badges 4 README.md

About

A Spring Boot web application that collects and processes job offers for Junior Java Developers from multiple external sources. It features REST APIs, MongoDB, Redis, Docker, and a full testing setup with JUnit, Mockito, and Testcontainers.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages