Skip to content

Latest commit

 

History

History
114 lines (76 loc) · 3.79 KB

README.md

File metadata and controls

114 lines (76 loc) · 3.79 KB

SAMYH

Project Title:

SAMYH-Airline Reservation System

Project description:

A user friendly website for airline called “SAMYH” to make reservations for flights on the system for users and guests by searching for flights, reserve it and they have more functionalities as edit their reservations and cancelling it. also allowing the administers to edit on it the flights system between adding, deleting and editing flights details.

Motivation:

Our vision was to create user-friendly website using MERN stack

Technologies:

*Node Js *React *Express *Mongo DB *REST API

installation:

Locally:

  • Clone the link of repository from github.
  • Open new terminal.
  • Cd src
  • node app “wait until MongoDB connected”.
  • Open new terminal.
  • Cd frontend
  • npm start “wait until your browser open automatically”.

Tests:

For Admin:

  • The list of all flights on the DB.
  • Searching criteria.
  • Editing flights.
  • Adding/deleting flights

For User/Guest:

  • Booking flights. “you can go with LAX->JFK on 12 .jan.2022 and 22.jan.2022 as example”
  • Editing flights seats.
  • Cancelling his booked flights
  • The ticket as PDF attachment email after reservation and cancelling

code example.

NODEJS:

useEffect(() => {
    
 axios.get('http://localhost:8000/currentUser').then(res =>{ 
    if (res.data=="0" || res.data.type=="Customer" || res.data.type=="Guest" ){
    alert("Access Denied, Please Sign In First");
    history.push({pathname:"/SignIn"});
    }
    // else go to admin page
 })
}, [location]);

const [FlightNo, setFlightNo] = useState("");
const [FlightFrom, setFlightFrom] = useState("");
const [FlightTo, setFlightTo] = useState("");
const [FlightDate, setFlightDate] = useState("");
const [FlightDep, setFlightDep] = useState("");
const [FlightArr, setFlightArr] = useState("");
const [FlightFirst, setFlightFirst] = useState("");
const [FlightBus, setFlightBus] = useState("");
const [FlightEco, setFlightEco] = useState("");
const [checked, setChecked] = useState(false);

Screenshots

Screenshot 2021-12-29 at 8 43 27 PM

Screenshot 2021-12-30 at 5 44 06 AM

Screenshot 2021-12-30 at 5 44 26 AM

Screenshot 2021-12-29 at 8 43 52 PM

Screenshot 2021-12-29 at 8 44 20 PM

Screenshot 2021-12-29 at 8 45 03 PM

Screenshot 2021-12-29 at 8 45 41 PM

Screenshot 2021-12-29 at 8 46 02 PM

contributions

The project is created with the contribution of 5 members.

Credits

 https://mui.com
 https://www.codecademy.com/learn/react-101	
 https://www.w3schools.com/nodejs/
 https://expressjs.com/