In this project we built a web application that consumes an SpaceX API. It provides commercial and scientific space travel services that allows users to book rockets and join selected space missions.

Overview

Space Travelers' Hub

In this project we built a web application that consumes an SpaceX API. It provides commercial and scientific space travel services that allows users to book rockets and join selected space missions.

Built With

  • React
  • Redux

Live Demo

Space Travelers' Hub

Getting Started

To get a local copy up and running, copy the SSH key of the repository and run git clone in your terminal. Then, run npm install to install all the dependencies required. And finally, run npm start to run the project locally.

👤 Authors

👤 Muhammad Ashraf

👤 Diego Yon

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse
  • SpaceX API
  • Freepik
Comments
  • React & Redux group project - Space Travelers' Hub

    React & Redux group project - Space Travelers' Hub

    In this PR, We have incorporated the following requirements: Config & basic setup Create React App. Install React Redux, Redux Logger and React Router. Download the free image for the app logo. Create routes and view components (Rockets, Missions, My Profile, Dragons [only if your team has 3 members]). Use for the page navigation links and style active class to indicate which section/page user is currently on (underline active navigation link). Create directories for all Redux state slice files (rockets, missions, dragons [only if your team has 3 members]). Redux: Fetch data and update Redux store Upon first render fetch data from the SpaceX API endpoints:

    Rockets: https://api.spacexdata.com/v3/rockets Missions: https://api.spacexdata.com/v3/missions Dragons: https://api.spacexdata.com/v3/dragons [only if your team has 3 members] Once the data are fetched, dispatch an action to store the selected data in Redux store:

    Rockets: id rocket_name description flickr_images Missions: mission_id mission_name description Dragons [only if your team has 3 members]: id name type flickr_images NOTE: Make sure you only dispatch those actions once and do not add data to store on every re-render (i.e. when changing views / using navigation).

    NOTE: Rockets is the default view, so you must fetch rockets data when the application starts. However, the missions data should only be fetched (once) when a user navigates to the Missions section.

    Render UI:lists Use useSelector() Redux Hook to select the state slices and render lists of rockets and missions in corresponding routes. i.e.: // get rockets data from the store const rockets = useSelector(state => state.rockets); You can style the whole application "by hand" or you could use React Bootstrap, a UI library that could speed up the process. This is a popular library and working with its components would be good practice. Render a list of rockets (as per design). For the image of a rocket use the first image in the array of flickr_images. Render a table with the missions' data (as per design). Render a list of dragons (as per design). For the image of a dragon use the first image in the array of flickr_images[only if your team has 3 members]. Redux: Write actions and reducers for booking rockets/dragons and joining missions When a user clicks the "Reserve rocket" button or "Reserve dragon" button [only if your team has 3 members], action needs to be dispatched to update the store. You need to get the ID of the reserved rocket and update the state. Remember you mustn't mutate the state. Instead, you need to return a new state object with all rockets, but the selected rocket will have an extra key reserved with its value set to true. You could use a JS filter() or map() to set the value of the new state - i.e.: const newState = state.map(rocket => { if(rocket.id !== id) return rocket; return { ...rocket, reserved: true }; }); Regardless of which method you choose, make sure you place all your logic in the reducer. In the React view file, you should only dispatch the action with the correct rocket ID as an argument. Create a reducer and action dispatcher for the "Join Mission" button. The logic here is practically the same as with rockets - you need to pass the mission's ID to the corresponding action and update the missions' state with the selected mission having a new key/value - reserved: true. Redux: Write actions and reducers for canceling rockets/dragons and leaving missions Here you need to follow the same logic as with the "Reserve rocket"/"Reserve dragon" and "Join mission" - but you need to set the reserved key to false. Dispatch these actions upon click on the corresponding buttons. Render UI: conditional components rendering Rockets that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve rocket" (as per design) . Dragons that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve dragon" (as per design) [only if your team has 3 members]. Missions that the user has joined already should show a badge "Active Member" instead of the default "NOT A MEMBER" and a button "Leave Mission" instead of the "Join Mission" button (as per design). Rockets/Dragons and Missions should use the React conditional rendering syntax: {rocket.reserved && ( // render Cancel Rocket button )} Render UI: My Profile section Compose two/three column layout and list ONLY the rockets/dragons reserved and missions joined by the user (as per design): Render a list of all joined missions (use filter()). Render a list of all reserved rockets (use filter()). Render a list of all reserved dragons (use filter()) [only if your team has 3 members]_.

    opened by for-ashraf 0
  • Create missions.js

    Create missions.js

    In this PR, I have incorporated the following: Follow the same logic as with the "Join mission" - but you need to set the reserved key to false. Dispatch these actions upon click on the corresponding buttons.

    opened by for-ashraf 0
  • 6 1pt switch badges for missions conditional components

    6 1pt switch badges for missions conditional components

    In this PR, I have incorporated the following: Missions that the user has joined already should show a badge "Active Member" instead of the default "NOT A MEMBER" and a button "Leave Mission" instead of the "Join Mission" button (as per design).

    Use the React conditional rendering syntax:

    {rocket.reserved && ( // render Cancel Rocket button )}

    opened by for-ashraf 0
  • [3pt] Implement mission joining - Actions #10

    [3pt] Implement mission joining - Actions #10

    In this PR, I have incorporated the following: When a user clicks the "Join Mission" button, action needs to be dispatched to update the store. You need to get the ID of the selected mission and update the state. Remember you mustn't mutate the state. Instead, you need to return a new state object with all missions, but the selected mission will have an extra key reserved with its value set to true. You could use a JS filter() or map() to set the value of the new state - i.e.: const newState = state.map(rocket => { if(mission.id !== id) return mission; return { ...mission, reserved: true }; }); Regardless of which method you choose, make sure you place all your logic in the reducer. In the React view file, you should only dispatch the action with the correct rocket ID as an argument.

    opened by for-ashraf 0
  • 15 4pt display missions lists render

    15 4pt display missions lists render

    in This PR, I have incorporated the following: Use useSelector() Redux Hook to select the state slices and render lists of missions in corresponding routes. i.e.: // get rockets data from the store const rockets = useSelector(state => state.rockets); You can style the whole application "by hand" or you could use React Bootstrap, a UI library that could speed up the process. This is a popular library and working with its components would be good practice. Render a table with the missions' data (as per design).

    opened by for-ashraf 0
  • 18 4pt fetch missions fetch data

    18 4pt fetch missions fetch data

    In this PR, I have incorporated the following: Fetch data from the Missions endpoint (https://api.spacexdata.com/v3/missions) when a user navigates to the Missions section.

    Once the data are fetched, dispatch an action to store the selected data in Redux store:

    mission_id mission_name description NOTE: Make sure you only dispatch those actions once and do not add data to store on every re-render (i.e. when changing views / using navigation).

    opened by for-ashraf 0
  • [4pt]  Fetch missions - Fetch data

    [4pt] Fetch missions - Fetch data

    Fetch data from the Missions endpoint (https://api.spacexdata.com/v3/missions) when a user navigates to the Missions section.

    Once the data are fetched, dispatch an action to store the selected data in Redux store:

    • mission_id
    • mission_name
    • description

    NOTE: Make sure you only dispatch those actions once and do not add data to store on every re-render (i.e. when changing views / using navigation).

    opened by diegoyon 0
  • [4pt] Display missions - Lists render

    [4pt] Display missions - Lists render

    • Use useSelector() Redux Hook to select the state slices and render lists of missions in corresponding routes. i.e.:
    // get rockets data from the store
    const rockets = useSelector(state => state.rockets);
    
    • You can style the whole application "by hand" or you could use React Bootstrap, a UI library that could speed up the process. This is a popular library and working with its components would be good practice.
    • Render a table with the missions' data (as per design).
    opened by diegoyon 0
  • [3pt] Implement mission joining - Actions

    [3pt] Implement mission joining - Actions

    • When a user clicks the "Join Mission" button, action needs to be dispatched to update the store. You need to get the ID of the selected mission and update the state. Remember you mustn't mutate the state. Instead, you need to return a new state object with all missions, but the selected mission will have an extra key reserved with its value set to true. You could use a JS filter() or map() to set the value of the new state - i.e.:
    const newState = state.map(rocket => {
        if(mission.id !== id) 
            return mission;
        return { ...mission, reserved: true };
    });
    
    
    • Regardless of which method you choose, make sure you place all your logic in the reducer. In the React view file, you should only dispatch the action with the correct rocket ID as an argument.
    opened by diegoyon 0
  • [1pt] Implement mission leaving - Actions

    [1pt] Implement mission leaving - Actions

    • Follow the same logic as with the "Join mission" - but you need to set the reserved key to false.
    • Dispatch these actions upon click on the corresponding buttons.
    opened by diegoyon 0
  • [1pt] Switch badges for Missions - Conditional components

    [1pt] Switch badges for Missions - Conditional components

    Missions that the user has joined already should show a badge "Active Member" instead of the default "NOT A MEMBER" and a button "Leave Mission" instead of the "Join Mission" button (as per design).

    Use the React conditional rendering syntax:

    {rocket.reserved && ( 
        // render Cancel Rocket button
    )}
    
    opened by diegoyon 0
  • [1pt] Create empty My profile - Setup (group task)

    [1pt] Create empty My profile - Setup (group task)

    • Create a route and a view component. Use <NavLink /> for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
    • This view should be empty - you will add content in separate tasks.
    opened by diegoyon 0
  • [1pt] Create basic structure for Rockets - Setup

    [1pt] Create basic structure for Rockets - Setup

    • Create a route and a view component. Use <NavLink /> for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
    • Create a directory for all Redux state slice files.
    opened by diegoyon 0
  • [1pt] Create basic structure for Missions - Setup

    [1pt] Create basic structure for Missions - Setup

    • Create a route and a view component. Use <NavLink /> for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
    • Create a directory for all Redux state slice files.
    opened by diegoyon 0
  • Team3 [1pt] Create basic structure for Dragons - Setup

    Team3 [1pt] Create basic structure for Dragons - Setup

    • Create a route and a view component. Use <NavLink /> for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
    • Create a directory for all Redux state slice files.
    opened by diegoyon 0
  • [4pt]  Fetch rockets - Fetch data

    [4pt] Fetch rockets - Fetch data

    Fetch data from the Rockets endpoint (https://api.spacexdata.com/v3/rockets) when the application starts (as Rockets is the default view).

    Once the data are fetched, dispatch an action to store the selected data in Redux store:

    • id
    • name
    • type
    • flickr_images

    NOTE: Make sure you only dispatch those actions once and do not add data to store on every re-render (i.e. when changing views / using navigation).

    opened by diegoyon 0
Owner
Diego Yon
Software Developer with a passion for learning something new every day. Currently looking for new opportunities.
Diego Yon
In this project we built a web application that consumes an SpaceX API. It provides commercial and scientific space travel services that allows users to book rockets and join selected space missions.

Space Travelers' Hub In this project we built a web application that consumes an SpaceX API. It provides commercial and scientific space travel servic

Diego Yon 7 Sep 30, 2022
This web application provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

space-hub About Project "Space Traveler's Hub" is A web application that provides commercial and scientific space travelling services, We are working

Nicholas Emmanuel 7 Nov 2, 2022
This web application provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

Space Traveler's Hub This web application provides commercial and scientific space travel services. The application allows users to book rockets and j

Michael Mesfin 6 Oct 4, 2022
A web application for a company that provides commercial and scientific space travel services. The application will allow users to book rockets and join selected space missions.

Space Travelers A web application for a company that provides commercial and scientific space travel services. The application will allow users to boo

Hector Torres 2 Apr 6, 2022
This a web application for a company that provides commercial and scientific space travel services. The application will allow users to book rockets, dragons and join selected space missions.

Space Travelers' Hub In this project, we have worked with the real live data from the SpaceX API. Our task was to build a web application for a compan

Apuabi Titilope 4 Oct 31, 2022
"Space-Travelers-Hub" is a website that allows users to book rockets and join selected space missions by using data from the SpaceX API.

Space-Travelers-Hub This project was bootstrapped with Create React App. Description "Space-Travelers-Hub" is a website that allows users to book rock

Tresor Sawasawa 4 Mar 13, 2022
A Web application that showcases Rockets and Missions from the SpaceX API, you can reserve Rockets and join Missions to your profile.

Space Travelers' Hub Project that showcases Rockets and missions from the SpaceX API, the user can reserve Rockets and join Missions, and save them in

David Vergaray 9 Apr 17, 2022
This project is a web application for a company that provides commercial and scientific space travel services

Space Traveler's Hub This project is a web application for a company that provides commercial and scientific space travel services.

Selma Belhadj 5 Jun 8, 2022
Space Travelers' Hub - a web application that facilitates booking rockets and join selected space missions

This is a web application that facilitates booking rockets and join selected space missions. It is built for a company that offers both commercial and scientific space travel services. The application also works with real live data from the SpaceX API.

Mong'are 6 Mar 29, 2022
Build a web application for a company that provides commercial and scientific space travel services

Build a web application for a company that provides commercial and scientific space travel services. The application will allow users to book rockets and join selected space missions

Abraha Kahsay 5 Aug 27, 2022
This is a dummy website for company that provides commercial and scientific space travel services

This is a dummy website for company that provides commercial and scientific space travel services. This application will allow users to book rockets and join selected space missions.

David Ouma 2 Apr 14, 2022
This application allows you to book missions and rockets with Elon Musk's company, SpaceX

Space Traveler's Hub This is an application built to book missions and rockets from SpaceX You can both join and leave missions, reserve and cancel re

Santiago Velosa 4 Jun 13, 2022
A single-page application that allows users to keep track of their books. Users can add the book details (book title and author) and also, and the books can also be removed. Built with JavaScript, HTML, and CSS

Project Name Awesome book with ES6 Description the project. This is a single page application that allows users to keep track of their books. Users ca

Micheal Oguntayo 4 Oct 13, 2022
This is an app that displays a list of books, allow users add a book and remove a selected book.

BookStore This is an app that displays a list of books, allow users add a book and remove a selected book. Built With HTML CSS -React -Redux -JavaScri

ABDUL ALI 5 Jul 22, 2022
Space-x is a web application the is working with the real live data from the SpaceX API

Project Name : Space-x Traveler Hub Space-x is a web application for a company that provides commercial and scientific space travel services. The appl

Chris Siku 12 Aug 22, 2022
The Bookstore is a website that allows the user to :display a list of books , Add a book and remove a selected book.

Book Store The Bookstore is a website that allows the user to : -Display a list of books. -Add a book. -Remove a selected book. Built With ?? Basic CS

Nedjwa Bouraiou 4 Sep 6, 2022
This project is a Web application based on an external API. The API provides data about music (including artists, albums, etc) that users can access on-demand. This project was built with ES6, HTML and CSS and it is a SPA.

Capstone M2: Music App This project is a Web application based on the music API Napster built with ES6, HTML and CSS and it is a SPA. This API provide

Karla Delgado 12 Aug 29, 2022