Code Monkey home page Code Monkey logo

space-travelers-hub's Introduction

Space Travelers Hub

Space Travelers' Hub

πŸ“— Table of Contents

Space Travelers' Hub

Space Travelers' Hub is a web application of a company that offers space travel services. The application is made with ReactJS and Redux to manage the global state of the application, the spaceX API is used to query and show users the list of available Missions and Rockets.

πŸ›  Built With

Tech Stack

Client

Key Features

  • Using the ReactJS library
  • Using the ReactJS Router library
  • Using JSX syntax
  • Using semantic HTML
  • SPA Approach
  • Responsive Design
  • Using Redux Toolkit for a global state management

(back to top)

πŸš€ Live Demo

To see the application working live, you can click on the following link that contains the demo version:

(back to top)

πŸ’» Getting Started

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

Setup

Clone this repository to your desired folder:

  cd my-folder-name
  git clone [email protected]:NitBravoA92/space-travelers-hub.git

Prerequisites

In order to install, modify and run this project, it is necessary to have the following applications installed:

It is also important to have at least basic knowledge about ReactJS, JSX, HTML, CSS and Javascript languages so you will be able to understand and work with the code of the project.

Install

Install this project by running the next command into your project folder:

  npm install

All the packages and libraries necessary for the project to work will be installed in a folder called /node_module. After this installation, the project will be ready to use.

Usage

In the project directory, you can run:

  • npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.

You may also see any CSS and JS linters errors in the console running the following commands:

CSS Linter

  npx stylelint "**/*.{css,scss}"

Javascript Linter

  npx eslint "**/*.{js,jsx}"

Build

  • npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Note: Please only modify the components files and the CSS files. Do not modify configurations files of the project.

πŸ‘₯ Authors

πŸ‘€ Nitcelis Bravo

πŸ‘€ Lawrence Kioko

(back to top)

πŸ”­ Future Features

  • Create My Profile view
  • Create Missions view
  • Create Rockets view
  • Use Redux to manage the states of rockets, missions
  • Fetch data using the spaceX API
  • Add CSS styles to the UI following the mobile first approach
  • Add actions and other functionality to Reserve Rocket
  • Add actions and other functionality to Cancel Reservation
  • Add actions and other functionality to Join Missions
  • Add actions and other functionality to Leave Missions
  • Display the list of Missions Joined in the My Profile view
  • Display the list of Rockets reserved in the My Profile view
  • Create Unit tests using Jest and React testing library
  • Deploy the final version of the project and share Link Demo in the documentation

(back to top)

🀝 Contributing

Contributions, issues, suggestions and feature requests are welcome! Feel free to check the issues page.

To do Contributions, please fork this repository, create a new branch and then create a Pull Request from your branch. You can find detailed description of this process in: A Step by Step Guide to Making Your First GitHub Contribution by Brandon Morelli

(back to top)

⭐️ Show your support

If you liked this project, give me a "Star" (clicking the star button at the beginning of this page), share this repo with your developer community or make your contributions.

(back to top)

πŸ™ Acknowledgments

I would like to thank my Microverse teammates for their support. They have supported me a lot in carrying out this project, giving me suggestions, good advice and solving my code doubts.

πŸ“ License

This project is MIT licensed.

(back to top)

space-travelers-hub's People

Contributors

kidd254 avatar nitbravoa92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kidd254

space-travelers-hub's Issues

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.

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

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

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

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

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

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

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.

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

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

React Redux Group Project - Kanban Board Review

⭐Kanban Board - Request a Review πŸ‘¨β€πŸ’»

Project details πŸ“ƒ

To the Reviewer

πŸ’ I really thank πŸ™‡β€β™‚οΈ you, dear reviewer πŸ‘¨β€πŸŽ¨ for dedicating your precious πŸ₯‡ time ⌚ to check the PR 🧾 .

We kindly ask πŸ™ dear reviewer 🀡 that if there is any kind of issue 🦯 in this project, please do list πŸ“ƒ them in a descriptive πŸ’‘ manner and give your best suggestions 🎁 if needed.

If you think some issues are essential to be changed ♻️ please kindly contact πŸ“ž us through Zoom or Slack, We are available on Microverse UTC-6 time zone.

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

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