A Star Wars API demo app using React (Create React App) and Tailwind CSS.
This Star Wars web app contains the following overview pages that can be reached from the top navigation:
Films
: See a list of Star Wars films and add any to your favoritesCharacters
: See a list of Star Wars characters and add any to your favoritesFavorites
: See a list of your favorite Star Wars films and characters (work in progress)
By selecting either a film or a character, you enter the detail pages:
Film
: Learn more about this film and see a list of its charactersCharacter
: Learn more about this character and see a list of its films
# Install dependencies
npm install
# Run the app in development mode
npm start
Then open http://localhost:3000 to view it in the browser.
This project uses react-testing-library for unit testing.
Tests can be found in the src/__tests__
folder.
# Run tests in watch mode
npm test
To prepare the app for production deployment, run the following command:
# Build app for production
npm run build
It correctly bundles React in production mode and optimizes the build for the best performance. You can find the result in the build
folder.
The app mainly contains of the following chomponents:
Films
, includingFilmList
Characters
, includingCharacterList
Favorites
, including bothFilmList
andCharacterList
Film
, includingCharacterList
Character
, includingFilmList
The list components each have their own item component (CharacterListItem
and FilmListItem
) that includes the HeartButton
component for selecting favorites.