Skip to content

Spring Boot Logistics Backend build for the Inditex BOOST HACKATHON Java challenge ☕️.

Notifications You must be signed in to change notification settings

CoderAnchel/Spring-Logistics-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Logistics Backend 🚀

Java

Spring 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.

Captura de pantalla 2024-12-26 a las 15 05 19 UI LINK: https://github.com/CoderAnchel/Logistics-UI

Table of Contents

Features

  • Create and manage orders
  • Allocate orders to the nearest available center
  • Manage center capacities and statuses
  • RESTful API with endpoints for orders and centers

Installation

  1. Clone the repository:
    git clone https://github.com/CoderAnchel/magic-eagle-learning.git
  2. Navigate to the project directory:
    cd magic-eagle-learning
  3. Build the project using Maven:
    mvn clean install
  4. Run the application:
    mvn spring-boot:run

Usage

Once the application is running, you can access the API at http://localhost:8080.

API Endpoints

Orders

  • Create Order

    POST /orders/create

    Request Body:

    {
        "customerId": 1,
        "size": "large",
        "coordinates": {
            "latitude": 42.3601,
            "longitude": -71.0589
        }
    }
  • Allocate Orders

    GET /orders/allocation
  • Get All Orders

    GET /orders/all

Centers

  • Get All Centers

    GET /centers
  • Create Center

    POST /centers

    Request Body:

    {
        "name": "Center 1",
        "status": "Available",
        "capacity": "large",
        "maxCapacity": 100,
        "currentLoad": 0,
        "coordinates": {
            "latitude": 42.3601,
            "longitude": -71.0589
        }
    }
  • Get Center Distance

    POST /centers/distance/all

    Request Body:

    {
        "latitude": 42.3601,
        "longitude": -71.0589
    }
  • Get Nearest Center

    POST /centers/distance/nearest

    Request Body:

    {
        "latitude": 42.3601,
        "longitude": -71.0589
    }
  • Update Center

    PATCH /centers/update/{id}

    Request Body:

    {
        "name": "Updated Center",
        "status": "Full",
        "capacity": "medium",
        "maxCapacity": 150,
        "currentLoad": 75,
        "coordinates": {
            "latitude": 42.3601,
            "longitude": -71.0589
        }
    }

About

Spring Boot Logistics Backend build for the Inditex BOOST HACKATHON Java challenge ☕️.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published