An e-commerce web application built with React, TypeScript, and Vite. This project allows users to browse products, search for items, and manage their shopping cart, all with efficient state management using Zustand.
This project is a fully functional e-commerce web application built using modern front-end technologies. Users can search for products and manage a shopping cart, with real-time updates using Zustand for state management.
- Product listing.
- Search functionality for products.
- Add/remove products from the shopping cart.
- Persist cart state across sessions using
localStorage. - Responsive design with styled-components for custom styles.
- Form validation using Yup.
- React: For building the user interface.
- TypeScript: For static type checking and better developer experience.
- Vite: For fast development with a modern build setup.
- Zustand: For state management, managing the shopping cart, and global state.
- Styled-components: For styling components with tagged template literals.
- ESLint: For code linting and formatting.
- Yup: For schema-based form validation.
Before you begin, ensure you have the following tools installed:
-
Clone the repository:
git clone https://github.com/AHB-7/e-com.git cd e-com -
Install dependencies:
``` npm install ``` Or if you're using yarn: ``` yarn install ```
Once the dependencies are installed, you can run the project locally.
npm run dev
Or if you're using yarn:
yarn dev
Then click on the localhost link: http://localhost:5173/
To build the app for production:
npm run build
Or if you're using yarn:
yarn build
The production build will be created in the dist/ folder.
- npm run dev: Starts the development server.
- npm run build: Builds the app for production.
- npm run lint: Runs ESLint to check for linting errors.
- npm run preview: Previews the production build locally.
Contributions are welcome! If you'd like to contribute, please fork the repository and create a pull request.
Fork the repository. Create a new branch for your feature or bugfix. Make your changes and commit them with clear and descriptive messages. Push your changes and submit a pull request.