The Space Travelers' Hub consists of Rockets, Missions, and the My Profile section. We worked with the real-live data from the SpaceX API in this project. And build a web application for a company that provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

Overview

Space Travelers Hub

The Space Travelers' Hub consists of Rockets, Missions, and the My Profile section. We worked with the real-live data from the SpaceX API in this project. And build a web application for a company that provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

Built With

  • HTML5
  • CSS3
  • JavaScript
  • React-Redux
  • Webpack
  • Jest

Live Demo (Netlify) 💻

Space-Travelers-Hub

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

You must have a browser on your device, visual code, a git version, node.js installed in your device and clone the repo from GitHub and follow the steps below.

Setup

Clone the repository from GitHub, open the project folder, inside the project direcory open the commanline or Terminal and install the dependicies.

Install

inside the project direcory open the commanline or Terminal, run npm install to install all the dependicies.

Usage

To use this project or app run npm start in the project directory and you will see the live serever open on youe browser.

Run tests

For running tests inside the project directory run npm test in command line or Terminal.

Authors

👤 Ahmad Zamir Yousufi

👤 Nedjwa Bouraiou

🤝 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

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

📝 License

This project is MIT licensed.

Comments
  • Testing missions components

    Testing missions components

    In this pull request I have added some tests for my components:

    • I have added tests for Missions.js, Mission.js, and MyMission.js.
      • I have added tests for checking existing elements after rendering.
      • I have added tests for checking non-existing elements after rendering.
      • I have added tests for checking the snapshots after rendering components.
    opened by ahzamir 2
  • Display joined missions

    Display joined missions

    In this pull request I have added some changes to My Profile component:

    • I have filtered my missions to get the joined missions.
    • I have added a component to display a list of joined missions on the My Profile page.
    • I have added some styles to the page and to the joined missions list according to the design.
    opened by ahzamir 2
  • Joining missions and leaving missions

    Joining missions and leaving missions

    In this pull request I have worked on Joining mission and Leaving mission functionalities:

    • I have added the action creator for joining the mission.
    • I have added the action creator for leaving the mission.
    • I updated the mission status on the mission state reducer.
    • I have dispatched the join and leave mission actions on button click.
    • I displayed the inner button text and status according to the mission status.
    • I have added some styles to the status button and status info according to the status.
    opened by ahzamir 2
  • Fetch missions

    Fetch missions

    In this pull request I have added some changes according to the requirements:

    • I fetched the mission data from API.
    • I have made the action creator for dispatching an action to get the data.
    • I have added the reducer to update the state with the data.
    • I displayed the mission contents on missions component page.
    • I added some styles according to the design.
    opened by ahzamir 2
  • Making the Space-Travelers-Hub project

    Making the Space-Travelers-Hub project

    In this pull request @ahzamir and my partner @nedjwab have worked together and implemented all these requirements on our project:

    Config & basic setup

    • We have created React App.
    • We nstalled React Redux, Redux Logger and React Router.
    • We have downloaded the free image for the app logo.
    • We have created routes and view components (Rockets, Missions, My Profile). And we used for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
    • We created directories for all Redux state slice files (rockets and missions).

    Redux: Fetch data and update Redux store

    • Upon first render we have fetched data from the SpaceX API endpoints:

      • Rockets: https://api.spacexdata.com/v3/rockets
      • Missions: https://api.spacexdata.com/v3/missions
    • Once the data are fetched, We dispatched an action to store the selected data in the Redux store:

      • Rockets:
        • id
        • rocket_name
        • description
        • flickr_images
      • Missions:
        • mission_id
        • mission_name
        • description

    Render UI:lists

    • We have used useSelector(), Redux Hook, to select the state slices and render lists of rockets and missions in corresponding routes.

    • We have Rendered a list of rockets (as per design). For the image of a rocket, we used the first image in the array of flickr_images.

    • We have Rendered a table with the missions' data (as per design).

    Redux: We have written actions and reducers for booking rockets and joining missions

    • When a user clicks the "Reserve rocket" button, action will be dispatched to update the store. We get the ID of the reserved rocket and update the state. And We returned a new state object with all rockets, but the selected rocket will have an extra key reserved with its value set to true. We have used JS filter() or map() to set the value of the new state.

    • We placed all our logic in the reducer. In the React view file, We only dispatched the action with the correct rocket ID as an argument.

    • We have created a reducer and action dispatcher for the "Join Mission" button. The logic here is practically the same as with rockets - We have passed the mission's ID to the corresponding action and updated the mission's state with the selected mission having a new key/value - status: true.

    Redux: We have written actions and reducers for canceling rockets and leaving missions

    • Here we followed the same logic as with the "Reserve rocket" and "Join mission" - and we set the reserved key to false.
    • We have dispatched these actions upon clicking on the corresponding buttons.

    Render UI: conditional components rendering

    • Rockets that have already been reserved show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve rocket" (as per design).
    • Missions that the user has joined already 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 and Missions use the React conditional rendering syntax.

    Render UI: My Profile section

    • We have composed a two/three-column layout and list rockets and missions joined by the user (as per design):
    • We Rendered a list of all joined missions (using filter()).
    • We Render a list of all reserved rockets (using filter()).
    opened by ahzamir 0
  •  Implement rocket booking and cancel

    Implement rocket booking and cancel

    In This pull request i :

    • add the action creator to reserve the rocket.
    • add the action creator to cancel the mission.
    • Fix linter errors.
    • Update fetching data.
    • Add CSS classes to the reserve badge.
    opened by nedjwab 0
  • Fetch and display rockets

    Fetch and display rockets

    In This pull request i :

    • Installed Axios and redux-thunk.
    • Write the Rocket's actions and reducer.
    • Configure the Redux Store.
    • Create the configure store file and add my reducer.
    • Add CSS classes.
    • Fix linter errors.
    opened by nedjwab 0
  • Space Travelers' Hub: Project Setup and Adding The header

    Space Travelers' Hub: Project Setup and Adding The header

    In This Pull request @ahzamir and I :

    • Create React App.
    • Add React router, Redux, and logger.
    • Add linter configuration.
    • Create the header and add the image from free image.
    • Create routes and view components (Rockets, Missions, My Profile).
    • Create directories for all Redux state slice files (rockets, missions).
    • Add CSS classes.
    opened by nedjwab 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 nedjwab 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 nedjwab 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 nedjwab 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 nedjwab 0
  • Team3 [4pt] Fetch dragons - Fetch data

    Team3 [4pt] Fetch dragons - Fetch data

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

    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 nedjwab 0
  • Team3 [4pt] Display dragons - Lists render

    Team3 [4pt] Display dragons - Lists render

    • Use useSelector() Redux Hook to select the state slices and render lists of dragons 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 dragons (as per design). For the image of a dragon use the first image in the array of flickr_images.

    opened by nedjwab 0
  • Team3 [3pt] Implement dragon booking - Actions

    Team3 [3pt] Implement dragon booking - Actions

    • When a user clicks the "Reserve dragon" button, action needs to be dispatched to update the store. You need to get the ID of the reserved dragon and update the state. Remember you mustn't mutate the state. Instead, you need to return a new state object with all dragons, 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(dragon.id !== id) 
            return dragon;
        return { ...dragon, 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 dragon ID as an argument.
    opened by nedjwab 0
  • Team3 [1pt] Implement dragon booking cancelation - Actions

    Team3 [1pt] Implement dragon booking cancelation - Actions

    • Follow the same logic as with the "Reserve dragon" - but you need to set the reserved key to false.
    • Dispatch these actions upon click on the corresponding buttons.
    opened by nedjwab 0
Owner
Ahmad Zamir Yousufi
Micronaut | Competitive Programmer | Problem Solver | Full-stack developer, Stack: JS Open to new opportunities.
Ahmad Zamir Yousufi
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
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
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
"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
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
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
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 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
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
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
"Space Travelers' Hub" This project will lay foundations for your understanding the new features for Redux, using slice reducer and API requires with createAsyncThunk

Space Travelers' Hub Space Travelers' Hub React - Redux "Space Travelers' Hub" This project will lay foundations for your understand new features for

Hendrid Gonzalez 5 Mar 6, 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
Welcome to Space Traveler's HUB, this web app allows the user to take a fictional tour across the space.

Welcome to Space Traveler's HUB, this web app allows the user to take a fictional tour across the space. The user can choose a rocket from our catalog interface, and reserve it. Also, the user can see recent special missions and join them. Finally, the user will be able to keep track of all your rockets and mission they are subscribed to. Build with React, Redux, React-router, and Railwindcss.

Mihreteab Misganaw 3 Jan 27, 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