- Clone this project to your machine
- Make sure node / npm already installed in your machine.
- Run
npm install
oryarn install
orpnpm install
(for this project, I prefer to use pnpm). - After installation, run
pnpm dev
- Open the project in your browser with url localhost:5173
This project also can accessed within this url.
From your terminal, run:
npm test
oryarn test
orpnpm test
For running test with coverage, run:
npm test:coverage
oryarn test:coverage
orpnpm test:coverage
I create this project based on Vite + React + Typescript project. The other lib that I use for this project:
react-router-dom
: for doing client side routerreact-query
: for data-fetcher utility with cache managementTailwind CSS
: for styling utilitiesVitest
: unit testing utilities. Since this project on top of Vite, I use Vitest for testing utilities.React Testing Library
: for React component testing
-
Infinite Scroll
- I implement Infinite Scroll feature with React Intersection Observer & React Query's
useInfiniteQuery
so user can easily load the other movie with scroll.
- I implement Infinite Scroll feature with React Intersection Observer & React Query's
-
Debouncing the search input
- I implement this to avoid multiple API call when user typing. Instead, API call will fired once the user stop typing.
-
Skeleton UI
- I implement Skeleton UI following with how the component are shaped instead of loading spinner or
Loading
text to enhance User Experience.
- I implement Skeleton UI following with how the component are shaped instead of loading spinner or
-
Similar Movie
- I adding component to show Similar Movie based on
Movie id
- I adding component to show Similar Movie based on
Here also I take some note on feature that still not implemented but good to be implemented:
- mocking REST API with
msw