{"id":23822362,"url":"https://github.com/coderanchel/spring-logistics-backend","last_synced_at":"2025-07-23T01:31:42.349Z","repository":{"id":269877392,"uuid":"907963863","full_name":"CoderAnchel/Spring-Logistics-Backend","owner":"CoderAnchel","description":"Spring Boot Logistics Backend build for the Inditex BOOST HACKATHON Java challenge ☕️.","archived":false,"fork":false,"pushed_at":"2024-12-26T20:04:57.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T00:15:23.550Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoderAnchel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-24T18:08:48.000Z","updated_at":"2024-12-26T20:05:00.000Z","dependencies_parsed_at":"2024-12-26T22:36:16.784Z","dependency_job_id":null,"html_url":"https://github.com/CoderAnchel/Spring-Logistics-Backend","commit_stats":null,"previous_names":["coderanchel/spring-logistics-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CoderAnchel/Spring-Logistics-Backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderAnchel%2FSpring-Logistics-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderAnchel%2FSpring-Logistics-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderAnchel%2FSpring-Logistics-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderAnchel%2FSpring-Logistics-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoderAnchel","download_url":"https://codeload.github.com/CoderAnchel/Spring-Logistics-Backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderAnchel%2FSpring-Logistics-Backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266602671,"owners_count":23954693,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-01-02T09:17:34.264Z","updated_at":"2025-07-23T01:31:42.211Z","avatar_url":"https://github.com/CoderAnchel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Logistics Backend 🚀\n\n![Java](https://img.shields.io/badge/Java-98.4%25-blue)\n\nSpring Boot application designed to manage orders and centers. It includes functionalities for creating orders, allocating them to centers, and managing center capacities. This project was build for the INDITEX Java Backend challenge, UI maded in Vue with Nuxt and Mapbox for fun just to have a more friendly way to test the api.\n\n![Captura de pantalla 2024-12-26 a las 15 05 19](https://github.com/user-attachments/assets/0c971a93-e61a-4192-8934-87db7bfe0fad)\nUI LINK: https://github.com/CoderAnchel/Logistics-UI \n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Endpoints](#api-endpoints)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Create and manage orders\n- Allocate orders to the nearest available center\n- Manage center capacities and statuses\n- RESTful API with endpoints for orders and centers\n\n## Installation\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/CoderAnchel/magic-eagle-learning.git\n    ```\n2. Navigate to the project directory:\n    ```sh\n    cd magic-eagle-learning\n    ```\n3. Build the project using Maven:\n    ```sh\n    mvn clean install\n    ```\n4. Run the application:\n    ```sh\n    mvn spring-boot:run\n    ```\n\n## Usage\n\nOnce the application is running, you can access the API at `http://localhost:8080`.\n\n## API Endpoints\n\n### Orders\n\n- **Create Order**\n    ```http\n    POST /orders/create\n    ```\n    **Request Body:**\n    ```json\n    {\n        \"customerId\": 1,\n        \"size\": \"large\",\n        \"coordinates\": {\n            \"latitude\": 42.3601,\n            \"longitude\": -71.0589\n        }\n    }\n    ```\n\n- **Allocate Orders**\n    ```http\n    GET /orders/allocation\n    ```\n\n- **Get All Orders**\n    ```http\n    GET /orders/all\n    ```\n\n### Centers\n\n- **Get All Centers**\n    ```http\n    GET /centers\n    ```\n\n- **Create Center**\n    ```http\n    POST /centers\n    ```\n    **Request Body:**\n    ```json\n    {\n        \"name\": \"Center 1\",\n        \"status\": \"Available\",\n        \"capacity\": \"large\",\n        \"maxCapacity\": 100,\n        \"currentLoad\": 0,\n        \"coordinates\": {\n            \"latitude\": 42.3601,\n            \"longitude\": -71.0589\n        }\n    }\n    ```\n\n- **Get Center Distance**\n    ```http\n    POST /centers/distance/all\n    ```\n    **Request Body:**\n    ```json\n    {\n        \"latitude\": 42.3601,\n        \"longitude\": -71.0589\n    }\n    ```\n\n- **Get Nearest Center**\n    ```http\n    POST /centers/distance/nearest\n    ```\n    **Request Body:**\n    ```json\n    {\n        \"latitude\": 42.3601,\n        \"longitude\": -71.0589\n    }\n    ```\n\n- **Update Center**\n    ```http\n    PATCH /centers/update/{id}\n    ```\n    **Request Body:**\n    ```json\n    {\n        \"name\": \"Updated Center\",\n        \"status\": \"Full\",\n        \"capacity\": \"medium\",\n        \"maxCapacity\": 150,\n        \"currentLoad\": 75,\n        \"coordinates\": {\n            \"latitude\": 42.3601,\n            \"longitude\": -71.0589\n        }\n    }\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderanchel%2Fspring-logistics-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderanchel%2Fspring-logistics-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderanchel%2Fspring-logistics-backend/lists"}