{"id":26738403,"url":"https://github.com/jayanth-kotni/nxt-trendz-react.js-project","last_synced_at":"2026-04-11T13:04:30.711Z","repository":{"id":237903621,"uuid":"795461320","full_name":"Jayanth-Kotni/Nxt-Trendz-React.Js-Project","owner":"Jayanth-Kotni","description":"Nxt Trendz App: Secure login, authenticated routing, dynamic product listing with filters, detailed product view, intuitive cart management, and contextual cart operations for a seamless shopping experience..","archived":false,"fork":false,"pushed_at":"2024-07-19T16:06:29.000Z","size":240,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-19T20:56:59.832Z","etag":null,"topics":["api-requests","api-response","authentication","cart-functionality","css","ecommerce-website","jwt-token","login-logout-system","protected-routes","reactjs","responsive-design","router-dom"],"latest_commit_sha":null,"homepage":"https://trendzpop.ccbp.tech/login","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jayanth-Kotni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-03T10:32:01.000Z","updated_at":"2024-07-19T16:12:19.000Z","dependencies_parsed_at":"2024-05-08T07:43:34.812Z","dependency_job_id":"b2aeb9af-7400-43e4-9a08-9b6fd9c5d9ba","html_url":"https://github.com/Jayanth-Kotni/Nxt-Trendz-React.Js-Project","commit_stats":null,"previous_names":["jayanth-kotni/nxt-trendz-react.js-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jayanth-Kotni%2FNxt-Trendz-React.Js-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jayanth-Kotni%2FNxt-Trendz-React.Js-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jayanth-Kotni%2FNxt-Trendz-React.Js-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jayanth-Kotni%2FNxt-Trendz-React.Js-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jayanth-Kotni","download_url":"https://codeload.github.com/Jayanth-Kotni/Nxt-Trendz-React.Js-Project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245966168,"owners_count":20701742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-requests","api-response","authentication","cart-functionality","css","ecommerce-website","jwt-token","login-logout-system","protected-routes","reactjs","responsive-design","router-dom"],"created_at":"2025-03-28T03:29:18.691Z","updated_at":"2025-12-30T23:21:29.586Z","avatar_url":"https://github.com/Jayanth-Kotni.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"In this project, let's build a **Nxt Trendz - Cart Features** by applying the concepts we have learned till now.\n\n### Refer to the video below:\n\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n  \u003cvideo style=\"max-width:70%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12);outline:none;\" loop=\"true\" autoplay=\"autoplay\" controls=\"controls\" muted\u003e\n    \u003csource src=\"https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-output.mp4\" type=\"video/mp4\"\u003e\n  \u003c/video\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n### Design Files\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n- [Extra Small (Size \u003c 576px) and Small (Size \u003e= 576px)](https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-sm-output-v0.png)\n- [Medium (Size \u003e= 768px), Large (Size \u003e= 992px) and Extra Large (Size \u003e= 1200px)](https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-lg-output.png)\n\n\u003c/details\u003e\n\n### Set Up Instructions\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n- Download dependencies by running `npm install`\n- Start up the app using `npm start`\n\u003c/details\u003e\n\n### Completion Instructions\n\n\u003cdetails\u003e\n\u003csummary\u003eFunctionality to be added\u003c/summary\u003e\n\u003cbr/\u003e\n\nThe app must have the following functionalities\n\n- When an unauthenticated user tries to access the **Cart** Route, then the page should be navigated to **Login** Route\n\n- Following are the features to be implemented\n\n  - Feature 1\n\n    - When an authenticated user tries to add the same product multiple times\n      - The quantity of the product should be updated accordingly, and the count of the cart items in the header should be remained same\n\n  - Feature 2\n\n    - The total amount and number of items in the cart should be displayed in the **Cart** Route\n\n  - Feature 3\n\n    - In each cart item in the cart\n      - When the plus icon is clicked, then the quantity of the product should be incremented by one\n      - When the minus icon is clicked, then the quantity of the product should be decremented by one\n      - When the quantity of the product is one and the minus icon is clicked, then the respective product should be removed from the cart\n      - Based on the quantity of the product, the product price and the Cart Summary, i.e the total cost should be updated accordingly\n\n  - Feature 4\n\n    - When an authenticated user clicks on the remove button, cart item should be removed from the cart list\n\n  - Feature 5\n\n    - When an authenticated user clicks on the **Remove All** button, all the cart items should be removed from the cart and [Empty Cart View](https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-empty-cart-view.png) should be displayed\n\n- The `CartContext` has an object as a value with the following properties\n  - `cartList` - this key stores the cart items\n  - `removeAllCartItems` - this method is used to remove all the cart items in the `cartList`\n  - `addCartItem` - this method adds the cart item to the `cartList`\n  - `removeCartItem` - this method removes the cart item from the `cartList`\n  - `incrementCartItemQuantity` - this method increases the quantity of a product in the `cartList`\n  - `decrementCartItemQuantity` - this method decreases the quantity of a product in the `cartList`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eComponents Structure\u003c/summary\u003e\n\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-component-structure-breakdown.png\" alt=\"component structure breakdown\" style=\"max-width:100%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eImplementation Files\u003c/summary\u003e\n\u003cbr/\u003e\n\nUse these files to complete the implementation:\n\n- `src/App.js`\n- `src/components/Cart/index.js`\n- `src/components/Cart/index.css`\n- `src/components/CartItem/index.js`\n- `src/components/CartItem/index.css`\n- `src/components/CartSummary/index.js`\n- `src/components/CartSummary/index.css`\n\u003c/details\u003e\n\n### Quick Tips\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\u003cbr\u003e\n\n- The `line-height` CSS property sets the height of a line box. It's commonly used to set the distance between lines of text\n\n  ```\n  line-height: 1.5;\n  ```\n\n    \u003cbr/\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/react-js/line-height-img.png\" alt=\"line height\" style=\"width:90%; max-width: 600px;\"/\u003e\n\n- The array method `find()` returns the first item's value that satisfies the provided testing function. If no item is found, it returns `undefined`\n\n  **Syntax**: `arr.find(Testing Function)`\n\n\u003c/details\u003e\n\n### Important Note\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n**The following instructions are required for the tests to pass**\n\n- `BsPlusSquare`, `BsDashSquare` icons from `react-icons` should be used for **plus** and **minus** buttons in cart item\n- The Cart Item should consist of two HTML button elements with data-testid attribute values as **plus** and **minus** respectively\n- `AiFillCloseCircle` icon from react-icons should be used for **remove** button in cartItem\n- The Cart Item should consist of an HTML button element with data-testid attribute values as **remove**\n- The product image in **Cart Item** Route should have the alt as `title` of the product\n\n- Prime User credentials\n\n  ```text\n   username: rahul\n   password: rahul@2021\n  ```\n\n- Non-Prime User credentials\n\n  ```text\n   username: raja\n   password: raja@2021\n  ```\n\n\u003c/details\u003e\n\n### Resources\n\n\u003cdetails\u003e\n\u003csummary\u003eColors\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cdiv style=\"background-color: #0b69ff; width: 150px; padding: 10px; color: white\"\u003eHex: #0b69ff\u003c/div\u003e\n\u003cdiv style=\"background-color: #171f46; width: 150px; padding: 10px; color: white\"\u003eHex: #171f46\u003c/div\u003e\n\u003cdiv style=\"background-color: #616e7c; width: 150px; padding: 10px; color: white\"\u003eHex: #616e7c\u003c/div\u003e\n\u003cdiv style=\"background-color: #ffffff; width: 150px; padding: 10px; color: black\"\u003eHex: #ffffff\u003c/div\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFont-families\u003c/summary\u003e\n\n- Roboto\n\n\u003c/details\u003e\n\n\u003e ### _Things to Keep in Mind_\n\u003e\n\u003e - All components you implement should go in the `src/components` directory.\n\u003e - Don't change the component folder names as those are the files being imported into the tests.\n\u003e - **Do not remove the pre-filled code**\n\u003e - Want to quickly review some of the concepts you’ve been learning? Take a look at the Cheat Sheets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayanth-kotni%2Fnxt-trendz-react.js-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayanth-kotni%2Fnxt-trendz-react.js-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayanth-kotni%2Fnxt-trendz-react.js-project/lists"}