Giter Site home page Giter Site logo

starwars-app's Introduction

Star Wars APP

Design a small React app that shows a list of characters using the api SWAPI (https://swapi.dev/). This list should have a traditional pager or a scrolling pager, you decide. Add the ability to navigate the list filtering by race, character, planets and starships. When an item is clicked, show the details of it.

Also, create another section called "My Galactic League" where the user can add:

  • 3 Races
  • 6 Characters
  • 2 Planets
  • 3 Starships

My Galactic League must have at least one character of the 3 selected races. And only characters of the selected races can be added.

The items on "My Galactic League" can be added or deleted always respecting the maximum and restrictions commented before.

For saving the data of "My Galactic League" use something local, may be cookies, local storage or something else. But don't use anything on the server side.

Demo

https://starwars-github.netlify.app/

Notes

  • Tests are important (unit, integration, end to end). Add the tests you prefer.
  • Add a README with everything you consider necessary to run the app
  • Do not develope any backend code
  • If you make any assumptions, take note of them in the README, so we can better understand your decisions.
  • We are open for questions if you have any doubts

Assumptions / Considerations

  • Use Material UI library for faster and easier development.

  • Use local storage for implementing My galactic team.

  • Characters filters cannot be combined because of the API. There is no simple way to search characters by specie, name, planet AND starship. SWAPI provides only name filter in /people resource. I would prefer the API to have more query params to search in /people resource.

  • When filtering by planet, specie or starship first the corresponded resource are fetched (planet, specie or starship) and then characters are fetched because the API is not denormalized. For example a planet has an array of people urls. This generates a high amount of request to the api.

Setup the project

Install dependencies:

npm install

Add .env and .env.test file with this content:

REACT_APP_API_URL=https://swapi.dev/api

Run tests:

npm test

Start the project:

npm start

starwars-app's People

Contributors

nachozullo avatar santiagoaferrari avatar

Watchers

James Cloos avatar  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.