Git Product home page Git Product logo

starcart's Introduction

StarCart

The idea is that a user create a collection of their favourite star wars related stuff: films, people, planets, vehicles, starships. At the moment, the default is to fetch films. you can toggle results, but there's no results yet for characters ( or any of the others ), so some ideas for improvments could be ( getting progressively harder):

extend current functionality

1 wire up the endpoint to display the results for characters just like the films components work. ( ie copy/paste )

2 we need pagination also for the results - luckily the json provides a next and previous and a total count of items

favourites UI

-- there's a faves component but all we can do is add, we can't delete or sort by rating.

3 update the removeFave function /features/faves/favesSlice.reducer.removeFave to find and remove the selected favourite from the state faves array

4 It's possible to add the same fave twice, extend the existing addFave function to make sure we're not adding the same fave again

typescript and testing

5 change the FaveItemProps interface in the FavesItem component from any so that it satisfies the typescript compiler

remove the 'any' and add the correct type interface Props{ fave:any; handleRating:any; handleRemove:any; }

6 update the unit test to test the input/output of the FaveItem

redux

7 create a new slice of state for a future shopping cart we're going to add later with addCartItem, removeCartItem and editCartItem methods and make sure that each item when added has a unique id

... for funzies ...

8 add filters eg type / 1-star 2-star 3-star

9 add new RTKQuery API end points for vehicles and planets to services https://swapi.dev/documentation

10 Time left? add some flair, a 'show off' feature

TECH STACK / GETTING STARTED

install vscode git with git bash for windows ( if windows ) / bash

install nvm and or node to get the latest version of nodejs 'lts' version

nvm install lts
nvm use 16.14.0
npm install -g [email protected]

install the packages and dependencies and start the app

npm ci
npm start

*** sometimes npm can be buggy, if you need to reinstall packages to clear any errors, then try the following command :

rm -rf node_modules

npm cii
npm start

If for some reason you can’t get the app to spin up then just have a go using ‘ npx create-react-app’ at hitting some of the endpoints, mapping the data and displaying the results as best you can.

And rather than struggle with something, just email UPDATE ME and I’ll get back to you.

-- You are advised to have VS Code, Redux dev tools, Eslint, Prettier, VS Code Chrome Debugger Extensions installed
-- useful links

https://reactjs.org/

https://redux-toolkit.js.org/introduction/getting-started

https://github.com/coreybutler/nvm-windows/releases

https://dev.to/skaytech/how-to-install-node-version-manager-nvm-for-windows-10-4nbi

https://create-react-app.dev/docs/getting-started/

https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en

https://gitforwindows.org/

https://daveceddia.com/redux-tutorial/

https://www.youtube.com/watch?v=9zySeP5vH9c&t=1513s

https://react.semantic-ui.com/

starcart's People

Contributors

richard-marshall-fod avatar jakeheathfod avatar fod-lunanull avatar

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.