Flight Management System
Group: 2 Number of group members: 3 Name: Lee Brian (12623187), Zhu Jiawei (12627010), Xu Xiaochi (12556828) MongoDB Database name: comps381-project
Render link: http://flights-381project.onrender.com/login
Github link: https://github.com/Chuck-Tsui/Flights-Management-System/tree/main
System functions list: 1. Login/ Logout 2. Creation of new flight object 3. Read details from existing flight objects 4. Remove flight objects 5. Search flight objects by one or more out of the following attributes: flight number, airline, destination, status (check in, take off, arrival) 6. Search flight objects by MongoDB query command 7. RESTful service: 1. Search by flight number: /api/flights/flightnumber/:flightnumber 2. Search by airline: /api/flights/airline/:airline 3. Search by destination: /api/flights/destination/:destination 4. Search by status: /api/flights/status/:status
In the cover of the homepage, the page should display login page that users can log in/out with their credentials. A background photo of the night view of the HK Airport is shown. After successful login, the page should display "Welcome to Flight Management System" with a list of options that users can choose: "Create Flight" button, "View Flight" button, "Home", "Logout"
For the login interface, each user can access the content of the Flight Management System with their own registered usernames and passwords.
The user id, i.e. the "name", is stored after successful login using credentials.
Guidelines for login trials: Login information: If a user leave the username and password sections blank, which mean an empty string "" exist, indicating no password required for that particular account. The password must be at least 8 characters long, including at least 1 number and 1 upper-case letter in the string. Password: "" means that account has no password. 1. {name: "brianlee", password: "brianLEE1011"}, 2. {name: "jiaweizhu", password: "jiaweiZHU0308"}, 3. {name: "chuckxu", password: "chuckXU0610"}, 4. {name: "elviszhao", password: "elvisZHAO1006"}, 5. {name: "nikochen", password: "nikoCHEN0610"}, 6. {name: "micklee", password: "mickLEE0429"}
Testings for login/logout: Reminder: username and passwords are both case sensitive, 1. Login the system by using the following, for example: Username: brianlee Password: brianLEE1011 2. Click "Submit" 3. The information of the users will be stored into session. 4. The page will now display a UI with two options: Create Flight and View Flight. 5. Click the 'Log out' button to log out 6. Navigate on 'Logout' button for logging out of the page 7. The system will redirect users back to the login page.
Repeat the above steps for logging into other accounts with other registered usernames and passwords
-
Create
-
A flight object may contain the following attributes with an example:
- Flight Number: each flight will be assigned a flight number. The flight number consists of a mixture of letters and numbers, and stored in string format, spaces are allowed between characters, e.g. BA 240
- Airline: each flight will be assigned to an airline. The airline contains letters only, with at least 1 capital letter and is stored in string format, no restriction in number of characters, spaces are allowed between characters, e.g. Cathay Pacific
- Destination: each flight will be flown to a destination. The destination contains letters only, with at least 1 capital letter and is stored in string format, no restriction in number of characters, spaces are allowed between characters, e.g. Japan
- Status: each flight will have its own status: check in, arrival, take off. Spaces are allowed between characters. Status is stored in string format.
Procedures:
- Click on 'Create Flight' button.
- The page will be redirected to the 'Create Flight' page
- Fill in the details of the flight object, e.g. Flight Number, Airline, Destination, Status
- Click 'Create Flight' button to create the flight object
- Click on 'View Flight' button
- The page will be redirected to the 'View Flight' page
- The 'View Flight' page should show that a new flight object is created.
Flight Number, Airline and Destination are mandatory. Status is optional.
Create operation is post request, and all information is in body of request.
- Update
Show all the details, grouped by their aircraft registration id and company id 1. Navigate to the corresponding flight object to obtain details of the flight. 2. Change the flight number from 'CX231' to 'CX232', airline from 'Cathay Pacific' to 'Hong Kong Airline' 3. Click 'Update Flight' to update the airplane information for the corresponding flight object. 4. Click 'Back to Flight List' button to redirect back to the 'View Flight' page. 5. The 'View Flight' page should shown the associated flight object has been updated.
Remark: To update the details of other flights, just repeat the above steps.
- Delete
- Click on the corresponding flight object to obtain details of the flight.
- Click 'Delete' to delete this flight object
- Click 'Back to Home' button
- The associated flight information should be removed from the 'View Flight' page.
- Search
- Click on the corresponding flight object
- Search flight objects by using one or more out of the following attributes: flight number, airline, destination, status (check in, take off, arrival)
- Click 'Search' to search this flight object
- The flight information will be filtered based on the query criteria specified in the search bar, only showing the relevant flight objects.
- Return to homepage by clicking 'Back to Home' or continue searching for other flight objects by editing the search bar.
For HTTP request types, there are three types that are to be tested: post, get and delete.
- Post Post request is used for insert. Example: Path URL: /api/flights/flightnumber/:flightnumber Test: curl -X POST -H "Content-Type: application/json" --data '{"name": Cathay Pacific, "flightnumber": "CX232"}'localhost:3000/api/item/flightnumber/CX232/. Successful insertion will be displayed if the post request testing is successful. The list of flight objects in the 'View Flight' page will be updated, with the associated flight objects removed from the RESTFUL POST test.
RESTful services test: Note: Must be login to the system first with any valid account then use the services
RESTful searching services access by the following: 1. Search by flight number: /api/flights/flightnumber/:flightnumber 2. Search by airline: /api/flights/airline/:airline 3. Search by destination: /api/flights/destination/:destination 4. Search by status: /api/flights/status/:status
Search by Flight Number:
1. Copy and past the Search by name pathURL 'https://comps381-project.render.com/api/flights/flightnumber'
2. The system will redirect to RESTful Search Result page and show the result.
3. Select the flight object that correponds to the flight number you want.
4. Click 'Back to Home' button return to homepage or search other object with different flight numbers.
Search by Airline:
1. Copy and past the Search by name pathURL 'https://comps381-project.render.com/api/flights/airline'
2. The system will redirect to RESTful Search Result page and show the result.
3. Select the flight object that correponds to the airline you want.
4. Click 'Back to Home' button return to homepage or search other object with different airlines.
Search by Destination:
1. Copy and past the Search by name pathURL 'https://comps381-project.render.com/api/flights/destination'
2. The system will redirect to RESTful Search Result page and show the result.
3. Select the flight object that correponds to the destination you want.
4. Click 'Back to Home' button return to homepage or search other object with different destinations.
Search by Status:
1. Copy and past the Search by name pathURL 'https://comps381-project.render.com/api/flights/status'
2. The system will redirect to RESTful Search Result page and show the result.
3. Select the flight object that correponds to the associated status.
4. Click 'Home' button return to homepage or search other object with the other status.
Search document(s) via MongoDB query command:
Note: Search document(s) via MongoDB query command is not case-sensitive
Search filtering will be performed basedThe list of flight objects in the 'View Flight' page will be updated, filtering only the relevant flight objects that fulfill the query criteria based on the RESTFUL GET test.
- Delete Delete request is used for deletion. Example: Path URL: /api/flights/:flightnumber Test: curl -X DELETE localhost:3000/api/flights/destination/BA243. Successful deletion will be performed. The list of flight objects in the 'View Flight' page will be updated, with the associated flight objects removed from the RESTFUL Delete test.
END