Skip to content

Movie database app that leverages the flix-backend. (GraphQL Version)

Notifications You must be signed in to change notification settings

kimkwanka/GraphFlix

Repository files navigation

GraphFlix

React app that allows you to discover old and upcoming movies alike and let's you save them in a "favorite movies list".

GraphFlix utilizes Apollo Client to communicate with flix-backend's /graphql API endpoint that acts as a GraphQL wrapper for the TMDb's REST API and also provides access to the backend's User Management (CRUD) functionality.

GraphQL Code Generator is used to generate the TypeScript typings, React Hooks and "Possible Types" directly from flix-backend's GraphQL schema.

State management is achieved through Apollo's Client-side schema and Reactive variables.

REST Version

To see the REST API version of this app, check out RESTFlix.

Built With

  • React
  • GraphQL
  • GraphQL Code Generator
  • Apollo Client
  • TypeScript
  • Jest
  • Cypress
  • React / Cypress Testing Library

Live Version

Check out the live version to see the app in action.

Getting Started

Install

After cloning the repository run either yarn or npm install to install all dependencies.

Environment Variables

The app depends on the following environment variable (supplied via a .env file or natively by your OS environment):

VITE_MOVIE_API_URL=https://flix.kimkwanka.io

(Just create a file named .env in the project root, copy the above line into it and you're good to go.)

Development

Use yarn dev or npm run dev to run app in development mode.

Build

Use yarn build or npm run build to build for production.

Testing (Unit / Integration)

Use yarn test or npm run test to run the test suite (Jest + React Testing Library) once or yarn test --watch or npm run test -- --watch to run it in watch mode.

Check the Jest CLI docs for more options.

Testing (E2E)

Use yarn test:e2e or npm run test:e2e to run the end-to-end test suite (Cypress + Cypress Testing Library) headlessly or yarn test:e2e --headed or npm run test:e2e -- --headed to force the browser to show.

Check the Cypress CLI docs for more CLI options.

Alternatively you can run yarn cy:open or npm run cy:open to open Cypress and run the tests manually.

About

Movie database app that leverages the flix-backend. (GraphQL Version)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published