Please make sure these are installed on your system:
- node.js
- git
- any terminal
Open up your terminal and follow these steps:
- Clone this repo
$ git clone https://github.com/ZeynepPinarKaya/ecommerce-website-react.git
- Change directory into created
ecommerce-website-react$ cd getmobil-case-study - Install npm dependencies
$ npm install
- Create a
.envfile by duplicating.env.examplefile and update to this:VITE_API_URL=https://dummyjson.com
- Run in development mod
$ npm run dev
- Open prompted url in your browser (probably:
http://localhost:5173/)
-
If you want to run e2e tests, run this command and it will open up a browser window to show executed tests:
$ npm run test:e2e
-
If you want to run unit tests, run this command and it will prompt tests:
$ npm run test:unit
If you want to run for production, follow these steps:
- Build for production mode
$ npm run build
- Run in a local vite server
$ npm run preview
- Open prompted url in your browser (probably:
http://localhost:4173/)
- Search functionality
- Add searchbar to menu via layout
- Store search value in redux and use it when fetching products
- When submitted, redirect to product list page
- Add to favorites functionality (client side) - (custom hooks)
- Add favorite button to details page or product list card
- Store selected value in local storage using custom hooks
- Always read and match with current listed products
- Theme
- Use ant design & styled-components theme configurations to create alternative themes
- Add theme toggle button to menu
- Use Context Api to keep track of selected theme
- Update via ant design and styled-components config providers
- Add category filter to product list page
- Fetch categories and list as sidebar
- When selected, update fetch request accordingly
- Sort products on product list page (server side)
- Add sort selection to right top
- When selected, update fetch request accordingly