Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AeroTraceX Backend

Java Spring Boot backend service for the AeroTraceX flight tracking application.

Features

  • RESTful API for airport data management
  • MySQL database integration
  • Airport information storage (ICAO/IATA codes, coordinates, etc.)
  • CRUD operations for airports
  • Search and filter capabilities

Prerequisites

  • Java 17 or higher
  • Maven 3.6+
  • MySQL 8.0+

Database Setup

  1. Install MySQL if not already installed

  2. Create a database (optional - the application will create it automatically):

    CREATE DATABASE aerotracex;
  3. Update database credentials in src/main/resources/application.properties:

    spring.datasource.username=root
    spring.datasource.password=your_password

Running the Application

  1. Navigate to the backend directory:

    cd backend
  2. Build the project:

    mvn clean install
  3. Run the application:

    mvn spring-boot:run

The application will start on http://localhost:8080

API Endpoints

Airport Endpoints

  • GET /api/airports - Get all airports
  • GET /api/airports/{id} - Get airport by ID
  • GET /api/airports/icao/{icaoCode} - Get airport by ICAO code
  • GET /api/airports/iata/{iataCode} - Get airport by IATA code
  • GET /api/airports/search?name={name} - Search airports by name
  • GET /api/airports/country/{country} - Get airports by country
  • GET /api/airports/bounds?minLat={minLat}&maxLat={maxLat}&minLng={minLng}&maxLng={maxLng} - Get airports within bounds
  • POST /api/airports - Create a new airport
  • PUT /api/airports/{id} - Update an airport
  • DELETE /api/airports/{id} - Delete an airport

Database Schema

airports table

Column Type Description
id BIGINT Primary key (auto-increment)
icao_code VARCHAR(4) ICAO airport code (unique)
iata_code VARCHAR(3) IATA airport code
name VARCHAR(255) Airport name
city VARCHAR(100) City name
country VARCHAR(100) Country name
latitude DOUBLE Latitude coordinate
longitude DOUBLE Longitude coordinate
altitude INT Altitude in meters
timezone VARCHAR(50) Timezone
created_at DATETIME Creation timestamp
updated_at DATETIME Last update timestamp

Sample Data

The application automatically populates the database with 30+ major airports worldwide on first startup.

Technologies Used

  • Spring Boot 3.2.1
  • Spring Data JPA
  • MySQL Connector
  • Lombok
  • Maven

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages