{"id":29460688,"url":"https://github.com/vero-code/job-radar-api","last_synced_at":"2025-07-14T02:32:45.701Z","repository":{"id":257229333,"uuid":"857082756","full_name":"vero-code/job-radar-api","owner":"vero-code","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-16T10:29:50.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T20:33:25.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vero-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-13T19:08:47.000Z","updated_at":"2024-09-16T10:29:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"58c72651-399f-4533-98f6-0d7e7b28368a","html_url":"https://github.com/vero-code/job-radar-api","commit_stats":null,"previous_names":["vero-git-hub/job-radar-api","vero-code/job-radar-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vero-code/job-radar-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vero-code%2Fjob-radar-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vero-code%2Fjob-radar-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vero-code%2Fjob-radar-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vero-code%2Fjob-radar-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vero-code","download_url":"https://codeload.github.com/vero-code/job-radar-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vero-code%2Fjob-radar-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265233753,"owners_count":23731825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-14T02:30:50.067Z","updated_at":"2025-07-14T02:32:45.653Z","avatar_url":"https://github.com/vero-code.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Job Radar API\n\nJob Radar API is a backend service that automatically collects job posting data from an external API. The service provides functionality to retrieve, store, and manage job posting data in database with endpoints for listing jobs, retrieving latest jobs, and collecting location-based statistics. The project is built using Java 21, Spring Boot, and H2 Database, and JPA.\n\n## Table of Contents\n\n- [Technologies](#technologies)\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Endpoints](#endpoints)\n- [Database](#database)\n- [Testing](#testing)\n- [License](#license)\n\n## Technologies:\n- **Backend**: Java v21.0.1, Spring Boot v3.3.3, Maven, Lombok\n- **Database**: H2 Database (in-memory for development/testing)\n- **Testing**: JUnit 5 and Mockito\n- **Tools**: Intellij IDEA\n\n## Features\n- Fetches job listings from an external API and stores them in an H2 database.\n- Provides a REST API with the following functionalities:\n    - List all jobs with pagination and sorting.\n    - Get top 10 most recent jobs.\n    - Generate job statistics based on location.\n- Periodically fetches and updates job listings to ensure the data remains current.\n- Unit tests for service and controller layers using JUnit and Mockito.\n\n## Installation\n1. Clone the repository:\n\n```\ngit clone https://github.com/your-repository/job-radar-api.git\ncd job-radar-api\n```\n\n2. Build the project:\n\n```\n./mvnw clean install\n```\n\n3. Run the application:\n\n```\n./mvnw spring-boot:run\n```\n\nThe application will start on http://localhost:8080.\n\n## Usage\n\n### Configuring the API URL\n\nThe API URL for fetching jobs is configurable in the application.properties file:\n\n```\napi.url=https://www.example.com/api/job-board-api\n```\n\n### H2 Database\nThe application uses an H2 in-memory database by default. To access the H2 database console, navigate to:\n\n```\nhttp://localhost:8080/h2-console\n```\n\n- Username: sa\n- Password: (leave blank)\n\n### Scheduled Data Fetching\n\nThe service periodically fetches new job listings every 3 minutes. You can adjust the fetch rate by modifying the @Scheduled annotation in the JobService class.\n\n## Endpoints\n\n| Method   | Endpoint       | Description   |\n| ---------|:--------------:|:-------------:|\n| GET      | /api/jobs      | Retrieve all jobs with pagination \u0026 sorting|\n| GET      | /api/jobs/top10| Retrieve top 10 most recent jobs           |\n| GET      | /api/jobs/stats| Get statistics of job counts by location   |\n\n### Example Requests\n\n1. Get All Jobs with Pagination:\n\n```\nGET http://localhost:8080/api/jobs?page=0\u0026size=10\u0026sortBy=createdAt\n```\n\n2. Get Top 10 Latest Jobs:\n\n```\nGET http://localhost:8080/api/jobs/top10\n```\n\n3. Get Location Statistics:\n\n```\nGET http://localhost:8080/api/jobs/stats\n```\n\n## Database\n\nThe H2 database schema is generated automatically using JPA annotations from the Job entity. The jobs table stores job listings, with the following columns:\n\n- **id:** Auto-generated ID\n- **slug:** Job identifier\n- **title:** Job title\n- **company_name:** Company offering the job\n- **description:** Job description\n- **location:** Job location\n- **remote:** Boolean indicating if the job is remote\n- **url:** URL to the job posting\n- **created_at:** Job creation date\n\n## Testing\n\nUnit tests for services and controllers have been implemented using JUnit 5 and Mockito.\n\n### Running the Tests\n\nTo execute all tests:\n\n```\n./mvnw test\n```\n\n### Test Coverage\n\n- **Service Tests:** Covers the main business logic for fetching jobs, retrieving job statistics, and handling job data storage.\n- **Controller Tests:** Ensures the correctness of the API responses for job listings, top 10 jobs, and location statistics.\n\n## License\nThis project is licensed under the terms of the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvero-code%2Fjob-radar-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvero-code%2Fjob-radar-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvero-code%2Fjob-radar-api/lists"}