{"id":26651956,"url":"https://github.com/aniketraut16/airline-management-springboot","last_synced_at":"2026-05-06T05:31:52.580Z","repository":{"id":283705587,"uuid":"952598395","full_name":"aniketraut16/airline-management-springboot","owner":"aniketraut16","description":"This is a Spring Boot-based Airline Management System that allows users to manage flight details and book/cancel tickets.","archived":false,"fork":false,"pushed_at":"2025-03-21T16:57:05.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T17:45:56.057Z","etag":null,"topics":["java","rest-api","spring-boot"],"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/aniketraut16.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":"2025-03-21T14:49:14.000Z","updated_at":"2025-03-21T16:59:12.000Z","dependencies_parsed_at":"2025-03-21T17:47:08.803Z","dependency_job_id":"aecdd590-7d02-4b12-b556-6b66aa39a978","html_url":"https://github.com/aniketraut16/airline-management-springboot","commit_stats":null,"previous_names":["aniketraut16/airline-management-springboot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aniketraut16%2Fairline-management-springboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aniketraut16%2Fairline-management-springboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aniketraut16%2Fairline-management-springboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aniketraut16%2Fairline-management-springboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aniketraut16","download_url":"https://codeload.github.com/aniketraut16/airline-management-springboot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245394773,"owners_count":20608123,"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":["java","rest-api","spring-boot"],"created_at":"2025-03-25T03:39:13.503Z","updated_at":"2026-05-06T05:31:52.537Z","avatar_url":"https://github.com/aniketraut16.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airline Management System API\n\nThis is a Spring Boot-based Airline Management System that allows users to manage flight details and book/cancel tickets.\n\n## 🛠 Tech Stack\n\n- **Spring Boot** (Backend)\n- **Java** (Programming Language)\n- **REST API** (HTTP-based communication)\n- **In-Memory Data Storage** (Using HashMaps for simplicity)\n\n## 📌 Features\n\n- Fetch all available flights\n- Get flight details by ID\n- Get flight schedules\n- Book a ticket\n- Retrieve ticket details\n- Cancel a ticket\n\n## 🚀 API Endpoints\n\n### **1️⃣ Flights API**\n\n#### **Get all flights**\n\n- **Endpoint:** `GET http://localhost:9056/flights`\n- **Response:**\n\n```json\n[\n  {\n    \"id\": 1,\n    \"airline\": \"Emirates\",\n    \"source\": \"Dubai\",\n    \"destination\": \"New York\",\n    \"schedules\": []\n  },\n  {\n    \"id\": 2,\n    \"airline\": \"Qatar Airways\",\n    \"source\": \"Doha\",\n    \"destination\": \"London\",\n    \"schedules\": []\n  },\n  {\n    \"id\": 3,\n    \"airline\": \"Singapore Airlines\",\n    \"source\": \"Singapore\",\n    \"destination\": \"Tokyo\",\n    \"schedules\": []\n  },\n  {\n    \"id\": 4,\n    \"airline\": \"Lufthansa\",\n    \"source\": \"Frankfurt\",\n    \"destination\": \"Toronto\",\n    \"schedules\": []\n  },\n  {\n    \"id\": 5,\n    \"airline\": \"Turkish Airlines\",\n    \"source\": \"Istanbul\",\n    \"destination\": \"Paris\",\n    \"schedules\": []\n  },\n  {\n    \"id\": 6,\n    \"airline\": \"British Airways\",\n    \"source\": \"London\",\n    \"destination\": \"Los Angeles\",\n    \"schedules\": []\n  },\n  {\n    \"id\": 7,\n    \"airline\": \"Etihad Airways\",\n    \"source\": \"Abu Dhabi\",\n    \"destination\": \"Sydney\",\n    \"schedules\": []\n  }\n]\n```\n\n#### **Get flight details by ID**\n\n- **Endpoint:** `GET http://localhost:9056/flights/:id`\n- **Response:**\n\n```json\n {\n    \"id\": 1,\n    \"airline\": \"Emirates\",\n    \"source\": \"Dubai\",\n    \"destination\": \"New York\",\n    \"schedules\": []\n  },\n```\n\n#### **Get flight schedules**\n\n- **Endpoint:** `GET http://localhost:9056/flights/:id/schedules`\n- **Response:**\n\n```json\n[\n  {\n    \"id\": 201,\n    \"flightId\": 1,\n    \"date\": \"2025-04-10\",\n    \"departureTime\": \"08:00:00\",\n    \"arrivalTime\": \"16:30:00\",\n    \"availableSeats\": 70\n  },\n  {\n    \"id\": 202,\n    \"flightId\": 1,\n    \"date\": \"2025-04-11\",\n    \"departureTime\": \"14:00:00\",\n    \"arrivalTime\": \"22:30:00\",\n    \"availableSeats\": 50\n  }\n]\n```\n\n---\n\n### **2️⃣ Ticket API**\n\n#### **Book a ticket**\n\n- **Endpoint:** `POST http://localhost:9056/ticket`\n- **Request Body:**\n\n```json\n{\n  \"flightId\": 1,\n  \"travelDate\": \"2025-03-26\",\n  \"passengerName\": \"Aniket Raut\"\n}\n```\n\n- **Response:**\n\n```json\n{\n  \"message\": \"Ticket booked successfully!\",\n  \"bookingReference\": \"REF-1234ABCD\"\n}\n```\n\n#### **Get ticket details**\n\n- **Endpoint:** `GET http://localhost:9056/ticket/:id`\n- **Response:**\n\n```json\n{\n  \"id\": 101,\n  \"flightId\": 1,\n  \"travelDate\": \"2025-03-26\",\n  \"passengerName\": \"Aniket Raut\",\n  \"bookingReference\": \"REF-1234ABCD\"\n}\n```\n\n#### **Cancel a ticket**\n\n- **Endpoint:** `DELETE http://localhost:9056/ticket/:id`\n- **Response (Success):**\n\n```json\n{\n  \"message\": \"Ticket Canceled Successfully!\"\n}\n```\n\n- **Response (Invalid ID):**\n\n```json\n{\n  \"message\": \"Invalid Ticket ID\"\n}\n```\n\n## 🏃‍♂️ Running the Application\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/aniketraut16/airline-management.git\n   ```\n2. Navigate to the project directory:\n   ```sh\n   cd airline-management\n   ```\n3. Run the application:\n   ```sh\n   mvn spring-boot:run\n   ```\n4. The server will start at `http://localhost:9056`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faniketraut16%2Fairline-management-springboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faniketraut16%2Fairline-management-springboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faniketraut16%2Fairline-management-springboot/lists"}