lukef7fywmrp / product-listing-part2-nextjs

Home Page:https://product-listing-part2-nextjs-zeta.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


PRODUCT-LISTING-PART2-NEXTJS

β—¦ Developed with the software and tools below.

JavaScript PostCSS Autoprefixer React ESLint TypeScript JSON

GitHub license git-last-commit GitHub commit activity GitHub top language

πŸ“– Table of Contents


πŸ“ Overview

The repository contains a Next.js web app for product listing. It provides interactive product listing components, including a product list, price info, product cards, and detailed product info. It utilizes various utilities and data definitions, and offers an efficient toolset for eCommerce websites, prioritizing UX with elements like tooltips, badges, and scrollable areas. Its comprehensive ESLint and TypeScript configurations ensure code quality and type safety, while Tailwind CSS and PostCSS handle aesthetics and style management.


πŸ“¦ Features

  • Feature 1: Interactive product listing components.
  • Feature 2: Product list, price info, product cards, and detailed product info.
  • Feature 3: Utilities and data definitions.
  • Feature 4: Tooltips, badges, and scrollable areas.
  • Feature 5: ESLint and TypeScript configurations.
  • Feature 6: Tailwind CSS and PostCSS.

πŸ“‚ Repository Structure

└── product-listing-part2-nextjs/
    β”œβ”€β”€ .eslintrc.json
    β”œβ”€β”€ app/
    β”‚   β”œβ”€β”€ globals.css
    β”‚   β”œβ”€β”€ layout.tsx
    β”‚   β”œβ”€β”€ logos/
    β”‚   β”œβ”€β”€ page.tsx
    β”‚   └── products/
    β”‚       β”œβ”€β”€ [id]/
    β”‚       β”œβ”€β”€ error.tsx
    β”‚       └── page.tsx
    β”œβ”€β”€ components/
    β”‚   β”œβ”€β”€ PriceInfo.tsx
    β”‚   β”œβ”€β”€ ProductCard.tsx
    β”‚   β”œβ”€β”€ ProductInfo.tsx
    β”‚   β”œβ”€β”€ ProductList.tsx
    β”‚   β”œβ”€β”€ ProductSkeleton.tsx
    β”‚   └── ui/
    β”‚       β”œβ”€β”€ badge.tsx
    β”‚       β”œβ”€β”€ button.tsx
    β”‚       β”œβ”€β”€ card.tsx
    β”‚       β”œβ”€β”€ scroll-area.tsx
    β”‚       β”œβ”€β”€ skeleton.tsx
    β”‚       β”œβ”€β”€ sonner.tsx
    β”‚       └── tooltip.tsx
    β”œβ”€β”€ components.json
    β”œβ”€β”€ lib/
    β”‚   β”œβ”€β”€ data.ts
    β”‚   β”œβ”€β”€ definitions.ts
    β”‚   └── utils.ts
    β”œβ”€β”€ next.config.js
    β”œβ”€β”€ package-lock.json
    β”œβ”€β”€ package.json
    β”œβ”€β”€ postcss.config.js
    β”œβ”€β”€ public/
    β”œβ”€β”€ tailwind.config.ts
    └── tsconfig.json

βš™οΈ Modules

Root
File Summary
.eslintrc.json The code represents directory structure for a Next.js application for product listing. It includes elements for styling (globals.css, tailwind.config.ts), layout settings (layout.tsx), individual product pages ([id]/), and product list (ProductList.tsx). Component specific files (PriceInfo.tsx, ProductCard.tsx etc.), UI elements (badge.tsx, button.tsx etc.), and utilities (data.ts, utils.ts) are also part of the structure. ESLint configuration extends Next.js's core web vitals for performance optimization.
components.json This code represents the file structure and configuration for a product listing Next.js application. The app employs TypeScript, ESLint, CSS styling with Tailwind CSS, and organizes its core functionality into components. components.json defines global configurations like the project's UI schema, styling preferences, resource usage, and path aliases. The components folder contains a host of UI components like product cards and information, while the lib folder manages data, definitions, and utilities.
package-lock.json The code represents the directory structure of a Next.js web application for a product listing. It includes component files for product-related UI elements, utility functions, application layouts, product data, and configurations. There's also mention of a package-lock.json file, which manages project dependencies such as @radix-ui/react-scroll-area and next-themes. The project uses Tailwind for styling, TypeScript for typing, and ESLint for linting.
next.config.js The given code features a Next.js project for a product listing application. The project's key functionalities include rendering UI components for products, price, and other attributes, based on data and utils from the lib folder. The next.config.js file configures remote image handling from fakestoreapi.com. ESLint, TailwindCSS, and PostCSS are used for enforcing code quality, handling CSS, and managing styles respectively.
tailwind.config.ts The code is a configuration file for Tailwind CSS, a utility-first CSS framework. It defines settings like enabling dark mode, specifying where to look for CSS classes, additional color variables, border radius sizes, keyframes for accordion-down and accordion-up animations, and includes a plugin for animations. It also sets up the theme, including container settings and color extensions.
tsconfig.json The directory structure represents a Next.js product listing application with a TypeScript configuration. It contains reusable components for product info, price, card, and list, and UI elements like badges, buttons, cards, etc. The lib directory has utilities and data definitions while.eslintrc.json and next.config.js ensure linting and configuration respectively. The tsconfig.json regulates TypeScript's compiler options, including ESNext module resolution, JSX preservation, and target output as ES5. It also sets path resolution and includes or excludes certain files.
package.json The code represents a Next.js project structure for a product listing application. It contains a layout, error handling, and product-page components, with related UI elements (buttons, cards, tooltips etc.) organized in a components directory. There're scripts for development, production and linting routines, while dependencies cater to UI aesthetics, image handling, scrolling, and tooltips. DevDependencies include type definitions, eslint for code quality, autoprefixer for CSS, and TypeScript enabling static typing. The project follows strict linting rules via.eslintrc.json.
postcss.config.js The code is a directory structure for a Next.js application that lists products. It includes specific setup files for TypeScript and ESLint, PostCSS, and Tailwind CSS styling. The app and components folders structure the application's UI, with page layouts, custom components, and assorted UI utilities. A lib directory holds utility and data functions. The itemized postcss.config.js file configures the Tailwind CSS and autoprefixer plugins for processing CSS.
Components
File Summary
PriceInfo.tsx The PriceInfo.tsx file is a component module that displays product price details. It shows VAT inclusive price, a shopping bag icon indicating a cart function, and logos of different platforms where the product is also available. Each logo is encased in a tooltip that displays the name of the platform on hover. The component takes price as input and outputs a stylized price information section. It utilizes logos sourced from the /logos/ folder and several UI components.
ProductCard.tsx The code outlines a ProductCard component in a Next.js eCommerce web application. This card displays product details like title, description, category, price, and an image gallery for each product. Thumbnail images are generated dynamically with active image indication. Users can zoom in on the images and navigate to respective product pages using a Buy Now button. The component employs external libraries like react-medium-image-zoom and react-image-gallery for image functionalities.
ProductInfo.tsx The given ProductInfo.tsx file is a React component that displays product information including title, description, and category. It also includes static specifications data β€” capacity, warranty, and price. The component visually presents badges for certain product labels (like a new year offer, selling out fast, and best in UAE), a wishlist button, product specifications, and a product title. The file uses badge, button UI components and an image from Next.js.
ProductList.tsx The code imports a function from a library to asynchronously retrieve product data and a component to display each product. Within the ProductList function, it fetches and maps over this data, rendering a ProductCard component for every product-all of which is bundled within a React fragment. This setup forms part of a Next.js application that allows interactive product listing and features a detailed directory structure with custom UI components, theming, TypeScript configuration, and an ESLint setup.
ProductSkeleton.tsx HTTPStatus Exception: 429
Ui
File Summary
scroll-area.tsx The code defines and exports two custom React components, ScrollArea and ScrollBar, that build upon ScrollAreaPrimitive components from @radix-ui/react-scroll-area library. ScrollArea provides a scrollable viewport area for inner content, alongside embedded ScrollBar handling vertical/horizontal scrolling, styled with CSS classes. The ScrollBar component adjusts its styling based on its orientation and further customizes the ScrollAreaThumb appearance. The classNames utility from @/lib/utils is utilized for conditional class assignment.
sonner.tsx HTTPStatus Exception: 429
skeleton.tsx HTTPStatus Exception: 429
card.tsx HTTPStatus Exception: 429
button.tsx HTTPStatus Exception: 429
badge.tsx HTTPStatus Exception: 429
tooltip.tsx HTTPStatus Exception: 429
Lib
File Summary
utils.ts HTTPStatus Exception: 429
data.ts HTTPStatus Exception: 429
definitions.ts HTTPStatus Exception: 429
App
File Summary
globals.css HTTPStatus Exception: 429
layout.tsx HTTPStatus Exception: 429
page.tsx The code essentially structures a Next.js application for product listing. The directory contains configurations, utility scripts, component definitions, data files, and globally applied styles. There is a main app with a layout and a products page, alongside error handling capabilities. Components facilitate product listing, information display, and UI elements. The page.tsx script in the app folder redirects the user to the /products page upon visit to the home page.
Products
File Summary
error.tsx HTTPStatus Exception: 429
page.tsx HTTPStatus Exception: 429
[id]
File Summary
page.tsx HTTPStatus Exception: 429

πŸš€ Getting Started

πŸ”§ Installation

  1. Clone the product-listing-part2-nextjs repository:
git clone https://github.com/lukef7fywmrp/product-listing-part2-nextjs.git
  1. Change to the project directory:
cd product-listing-part2-nextjs
  1. Install the dependencies:
npm install

πŸ€– Running product-listing-part2-nextjs

npm run dev

πŸ“„ License

This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.


Return


About

https://product-listing-part2-nextjs-zeta.vercel.app/


Languages

Language:TypeScript 93.2%Language:CSS 5.8%Language:JavaScript 1.0%