Git Product home page Git Product logo

simple-react-app's Introduction

SWAPI React App

A Star Wars API demo app using React (Create React App) and Tailwind CSS.

Features

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 favorites
  • Characters: See a list of Star Wars characters and add any to your favorites
  • Favorites: 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 characters
  • Character: Learn more about this character and see a list of its films

Getting Started

Development

# Install dependencies
npm install

# Run the app in development mode
npm start

Then open http://localhost:3000 to view it in the browser.

Testing

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

Production

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.

Architecture

The app mainly contains of the following chomponents:

Overview Pages

  • Films, including FilmList
  • Characters, including CharacterList
  • Favorites, including both FilmList and CharacterList

Detail Pages

  • Film, including CharacterList
  • Character, including FilmList

Lists

The list components each have their own item component (CharacterListItem and FilmListItem) that includes the HeartButton component for selecting favorites.

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.