This project is a Flight Status and Notification System built with React for the frontend, Java (Spring Boot) for the backend, and MongoDB for the database. The system includes real-time updates of flight statuses via WebSockets.
- View and update flight status in real-time.
- Add new flight details.
- Update existing flight details.
- WebSocket connection for real-time updates.
The project is divided into two main parts:
- Frontend: Built with React, providing a user interface for viewing and managing flight details.
- Backend: Built with Java (Spring Boot), handling RESTful API requests and WebSocket connections for real-time updates.
- Node.js and npm
- Java 8 or higher
- MongoDB
-
Clone the repository:
git clone https://github.com/your-username/flight-status-notification-system.git cd flight-status-notification-system -
Set up the backend:
- Navigate to the
backenddirectory:cd backend - Install dependencies and run the backend server:
mvn clean install mvn spring-boot:run
- Navigate to the
-
Set up the frontend:
- Navigate to the
frontenddirectory:cd ../frontend - Install dependencies and start the frontend server:
npm install npm start
- Navigate to the
- FlightStatusComponent: Displays the status of flights.
- NotificationSettingsComponent: Manages user notification settings.
- AdminComponent: Admin page with sections to add new flights and update existing flight details.
- FlightUploadComponent: Form to add new flight details.
- FlightUpdateComponent: Form to update existing flight details.
- The styles for the components are defined in CSS files located in the
src/stylesdirectory.
- AdminComponent.css
- DashboardComponent.css
- FlightStatusComponent.css
- FlightController: Handles API requests for flight details.
- FlightService: Contains business logic for managing flight details.
- FlightStatus: Represents the flight status data model.
GET /api/flights: Get all flight details.GET /api/flights/{flightId}: Get flight details by ID.PUT /api/flights/update/{flightId}: Update flight details.
{
"_id": {
"$oid": "66a4ca901e7cdeb3da89a592"
},
"flight_id": "6E 2342",
"airline": "Indigo",
"status": "Delayed",
"departure_gate": "C3",
"arrival_gate": "D4",
"scheduled_departure": {
"$date": "2024-07-26T16:00:00.000Z"
},
"scheduled_arrival": {
"$date": "2024-07-26T20:00:00.000Z"
},
"actual_departure": null,
"actual_arrival": null
}