This is a React shop project made by Amirali Granmayeh.
It features a responsive landing page, shopping cart, product details, and account management with API integration.
π Live Demo
π https://amiraligrr.ir/shop
β οΈ Important The backend (json-server) is not running on the live demo. Only the Login page and Main UI are accessible. After entering the address, click on one of the links, such as Home, to load the page. Due to hosting problems, you must click on one of the links in the header once.
- Responsive landing page
- Product listing with filtering and search
- Product details page
- Shopping cart with quantity adjustment
- User login/logout using cookies
- API integration with Axios
- Carousel for featured and discounted products
- Reusable components: Header, Footer, Cards, Carousel, Layout
- React 19.1.1
- React DOM 19.1.1
- React Router DOM 7.9.1
- TailwindCSS 4.1.13
- @tailwindcss/vite 4.1.13
- Axios 1.12.2
- js-cookie 3.0.5
- JSON Server 1.0.0-beta.3
- Concurrently 9.2.1
- Vite 7.1.6
- ESLint 9.35.0
- Clone the repository:
git clone https://github.com/amiraligrr/react-shop.git
cd react-shop
Install dependencies:
bash
Copy code
npm install
Run development server:
bash
Copy code
npm run dev
Start JSON API server:
bash
Copy code
npm run start:api
Open http://localhost:5173 in your browser.
π§ Available Scripts
npm run dev β Start Vite development server
npm run start:api β Run JSON Server
npm run start β Run both Vite and JSON Server concurrently
npm run build β Build for production
npm run preview β Preview production build
npm run lint β Lint project with ESLint
npm run deploy β Deploy to GitHub Pages
π Folder Structure
bash
Copy code
src/
ββ assets/ # Images and fonts
ββ component/ # Cards, Carousel, etc.
ββ context/ # API data and state management
ββ laut/ # Header, Footer, Layout
ββ pages/ # Home, Product details, About, Login, Cart, Profile
ββ main.jsx # Entry point
ββ index.css # TailwindCSS styles
π License
This project is licensed under the ISC License.----------------------------------------Made with β€οΈ by Amirali Granmayeh ------------------------------------