Git Product home page Git Product logo

geekelo / space-travelers-hub Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 308 KB

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.

Home Page: https://space-travelers-hub-umber.vercel.app

License: MIT License

HTML 7.57% CSS 15.72% JavaScript 76.70%
api completed react redux

space-travelers-hub's Introduction

signature

πŸ“— Table of Contents

πŸ“–The SPACE TRAVELERS HUB

The Space Travelers Hub is 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. The Space Travelers' Hub consists of Rockets, Missions, and the My Profile section. The Rockets section displays a list of all available SpaceX rockets. Users can book each rocket by clicking the reservation button or cancel the previously made booking. The Missions section displays a list of current missions along with their brief description and participation status. There is also a button next to each mission that allows users to join the selected mission or leave the mission the user joined earlier. The My Profile section displays all reserved rockets and space missions.

Head to the LIVE DEMO SECTION for Live links and presentations

πŸ›  Built With

Tech Stack

ES6
HTML
CSS
JavaScript
REACT

Key Features

  • Desktop Friendly: this website is responsive to desktop screen sizes.
  • Simple and Attractive Design : the UI / UX is engaging and appealing.
  • Functional : this website is accessible, easy to navigate, and helpful for users.

(back to top)

πŸš€ Live Demo

View the live demo of this project by clicking the text below.

(back to top)

πŸ’» Getting Started

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

Clone the repository

git clone https://github.com/geekelo/space-travelers-hub.git

And you are ready to begin your project

Setup

This project contains An HTML FILE (free to edit) - file that contains html codes to give structure to the main webpage A CSS FILE (free to edit) - file that contains css codes to style the webpage A GIT IGNORE FILE (free to edit) - to hide personal or private files HTML/CSS LINTER FILES (should not edit) - Do not make changes A JAVASCRIPT FILE (free to edit) - that handles functionalities and dynamic HTML

Prerequisites

You should have Node and Git Installed You should have basic knowledge on HTML / CSS / JavaScript You should have a code editor

Install

Download install VSCODE and Git To install linters, execute the following commands:

Initialize npm | ``` npminit -y ```
HTML | ``` npm install --save-dev [email protected] ```
CSS | ```npm install --save-dev [email protected] [email protected] [email protected] [email protected]  ```

Usage

To run the linters, execute the following command and fix linter errors:

HTML | ``` npx hint . ```
CSS | ```npx stylelint "**/*.{css,scss}" ```
If you get a flood of errors keep in mind that linters guide you in writing a clean code!

Run Tests

You can run this program on your browser

Deployment

You can deploy this project using the following procedure:

  • Pick the right hosting provider.
  • Choose the tool and method to upload your website.
  • Upload files to your website.
  • Move the website files to the main root folder.
  • Import your database.
  • Check if your website works worldwide.

(back to top)

πŸ‘₯ Authors

(back to top)

πŸ‘€ Eloghene Otiede

πŸ‘€ Ayodeji Sulaimon

(back to top)

(back to top)

🀝 Contributing

You can offer Contributions, submit an issue, and make a feature request.

Future Features

  • Add pop up modals
  • Add the contact form
  • Add more content pages

⭐️ Show your support

Please give a ⭐️ to support this project

(back to top)

πŸ™ Acknowledgments

I would like to thank Microverse for inspiring this project Fonts: Google Fonts

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)

space-travelers-hub's People

Contributors

geekelo avatar sulaimonaa avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

space-travelers-hub's Issues

[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).

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.

[4pt] Display rockets - Lists render

  • Use useSelector() Redux Hook to select the state slices and render lists of rockets 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.

[1pt] Switch badges for Rockets - Conditional components

Rockets that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve rocket" (as per design)

Use the React conditional rendering syntax:

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

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).

[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.

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.

Team3 [1pt] Switch badges for Dragons - Conditional components

Dragons that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve dragon" (as per design).

Use the React conditional rendering syntax:

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

[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.

[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.

[3pt] Implement rocket booking - Actions

  • When a user clicks the "Reserve rocket" button, 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.

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.

[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).

[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
)}

[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).

[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.

[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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.