docs: clean up README formatting and improve clarity
This commit is contained in:
@@ -5,33 +5,25 @@
|
|||||||

|

|
||||||

|

|
||||||
|
|
||||||
---
|
|
||||||
## Description
|
## Description
|
||||||
---
|
|
||||||
The Online Shop is build with React. It has custom responsive layout styled with SCSS. It makes an API call to fetch mock products from [Dummy JSON API](https://dummyjson.com/products) with Redux [RTK Query](https://redux-toolkit.js.org/rtk-query/overview). Added also Toastify for notifications.
|
The Online Shop is build with React. It has custom responsive layout styled with SCSS. It makes an API call to fetch mock products from [Dummy JSON API](https://dummyjson.com/products) with Redux [RTK Query](https://redux-toolkit.js.org/rtk-query/overview). Added also Toastify for notifications.
|
||||||
The application shows a product home page and a cart page, the routing is done with React Router.
|
The application shows a product home page and a cart page, the routing is done with React Router.
|
||||||
|
|
||||||
---
|
|
||||||
## Quick overview
|
## Quick overview
|
||||||
---
|
|
||||||
- Browse products retrieved from a mock API
|
- Browse products retrieved from a mock API
|
||||||
- View product details and add items to a cart
|
- View product details and add items to a cart
|
||||||
- Update item quantities or remove items from the cart
|
- Update item quantities or remove items from the cart
|
||||||
- Toast notifications for user actions
|
- Toast notifications for user actions
|
||||||
- Responsive layout using SCSS
|
- Responsive layout using SCSS
|
||||||
|
|
||||||
---
|
|
||||||
## Tech stack
|
## Tech stack
|
||||||
---
|
|
||||||
- React (functional components + hooks)
|
- React (functional components + hooks)
|
||||||
- Redux Toolkit + RTK Query for async data
|
- Redux Toolkit + RTK Query for async data
|
||||||
- React Router for navigation
|
- React Router for navigation
|
||||||
- SCSS for styling
|
- SCSS for styling
|
||||||
- react-toastify (notifications)
|
- react-toastify (notifications)
|
||||||
|
|
||||||
---
|
|
||||||
## Getting started (local)
|
## Getting started (local)
|
||||||
---
|
|
||||||
1. Clone the repository :
|
1. Clone the repository :
|
||||||
```git clone https://dadobos.github.io/online-shop.git```
|
```git clone https://dadobos.github.io/online-shop.git```
|
||||||
2. Go into the project folder:
|
2. Go into the project folder:
|
||||||
@@ -43,20 +35,14 @@ The application shows a product home page and a cart page, the routing is done w
|
|||||||
5. Open the app in your browser:
|
5. Open the app in your browser:
|
||||||
```http://localhost:3000/```
|
```http://localhost:3000/```
|
||||||
|
|
||||||
---
|
|
||||||
## Common scripts
|
## Common scripts
|
||||||
---
|
|
||||||
- npm start — start dev server (hot reload)
|
- npm start — start dev server (hot reload)
|
||||||
- npm run build — create a production build
|
- npm run build — create a production build
|
||||||
- npm test — run tests (if present)
|
- npm test — run tests (if present)
|
||||||
- npm run lint — run linters (if configured)
|
- npm run lint — run linters (if configured)
|
||||||
|
|
||||||
---
|
|
||||||
## Notes for development
|
## Notes for development
|
||||||
---
|
|
||||||
- API calls are handled with RTK Query; service files are located in src (look for a services or api directory).
|
- API calls are handled with RTK Query; service files are located in src (look for a services or api directory).
|
||||||
- Styles are in SCSS — components can import their module styles or use shared partials.
|
- Styles are in SCSS — components can import their module styles or use shared partials.
|
||||||
- Routing lives under src (check App or routes-related files) — add pages or adjust routes there.
|
- Routing lives under src (check App or routes-related files) — add pages or adjust routes there.
|
||||||
- For mock API changes, update the base URL or endpoints in the RTK Query service file.
|
- For mock API changes, update the base URL or endpoints in the RTK Query service file.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user