Skip to content

A MERN stack website for booking and managing round-trip flights

License

Notifications You must be signed in to change notification settings

katrin-ibrahim/Boomerang

 
 

Repository files navigation

Boomerang Airline Reservation System

Boomerang Airline Reservation System was created to make it easier for users to reserve round trips through different options and airlines and be able to choose the best routes or flights according to their preferences.

Build Status

The project build status now is completed successfully with no current errors.

Screenshots

This is the Sign In page where the user can enter their username and password.

WhatsApp Image 2021-12-25 at 8 51 46 PM (2)

This is the Sign Up page where the user can sign up for the website.

WhatsApp Image 2021-12-25 at 8 51 47 PM

The user can search for flights using search criteria including Departure Airport, Arrival Airport, Departure Date, Arrival Date

WhatsApp Image 2021-12-25 at 8 51 46 PM

WhatsApp Image 2021-12-25 at 8 51 46 PM (1)

WhatsApp Image 2021-12-25 at 8 51 45 PM

Frameworks

This project was implemented using MERN stack,so for someone to use/edit this project they need a basic understanding of React.js, HTML & CSS which were used for the frontend and Node.js which was used for the backend in addition to JavaScript and Express Js and MongoDB Atlas was used for the database.

Useful Extra Features

  • The user can email himself/herself their reservation itinerary at any time.
  • The departure/return flights can be changed at any time even after paying for the reservation(taking into account that the price difference will have to be paid).
  • The users can view all their previous bookings or history at any time using “My bookings”.

Code Examples

Veryfing Token for the user

  const token = req.headers["x-access-token"]?.split(" ")[1];
  console.log(token);
  if (token) {
    jwt.verify(token, process.env.JWT_SECRET, (err, decoded) => {
      if (err)
        return res.json({
          isLoggedIn: false,
          message: "Failed To Authenticate",
        });
      req.user = {};
      req.user._id = decoded.id;
      req.user.UserName = decoded.username;
      next();
    });
  } else {
    res.json({ message: "Incorrect Token Given", isLoggedIn: false });
  }
};

Software Installation

API References

Run Locally

  • Clone the full-stack branch in the repository on your VS Code
  • Create your own .env file which includes:
    • mongoURI = //your mongoDB URL
    • PORT = //your server port number to run the server
    • PORTA = //your client port number to run the user interface
    • JWT_SECRET = //any string of your choice to use in hashing the users’ passwords
  • In your VS Code terminal in order to run the server you’ll run the following commands
    cd Cheetos
    cd server
    npm i
    node app.js
  • In your VS Code terminal in order to run the client you’ll run the following commands
    cd Cheetos
    cd client
    npm i
    npm start

Authors

Contributions

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. As for pushing guidelines:

  • Create a separate branch for your modifications if it is your first time to modify, if not commit to your previously created branch.
  • You should always resolve conflicts and make sure that no changes that were made previously are lost.

Useful Links and Credits

License

GPL v3

About

A MERN stack website for booking and managing round-trip flights

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.0%
  • CSS 5.4%
  • HTML 0.6%