A modern, React-based frontend for an e-commerce platform, enabling users to browse products, manage their cart, place orders, and track purchases through an intuitive, responsive interface. Built with Vite, Tailwind CSS, and React Router, it integrates seamlessly with a backend API for product data, user authentication, and order processing.
react-toastify
.VITE_BACKEND_URL
)VITE_BACKEND_URL
in .env
)Clone the Repository: ```bash git clone https://github.com/aabr2612/e-commerce-frontend.git cd e-commerce-frontend
Install Dependencies:
npm install
Set up development server: Create a .env file in the root directory and add the backend URL:
VITE_BACKEND_URL=http://your-backend-api-url
Run the Development Server:
npm run dev
Browse Products:
Add to Cart:
Checkout:
Track Orders:
e-commerce-frontend/
├── public/ # Static assets (e.g., favicon)
├── src/
│ ├── assets/ # Frontend assets (images, icons, logo)
│ │ └── frontend_assets/
│ ├── components/ # Reusable components
│ │ ├── BestSeller.jsx
│ │ ├── CartTotal.jsx
│ │ ├── Hero.jsx
│ │ ├── LatestCollection.jsx
│ │ ├── Navbar.jsx
│ │ ├── NewsletterBox.jsx
│ │ ├── OurPolicy.jsx
│ │ ├── ProductItem.jsx
│ │ ├── RelatedProducts.jsx
│ │ ├── SearchBar.jsx
│ │ └── Title.jsx
│ ├── context/ # Context for state management
│ │ └── ShopContext.jsx
│ ├── pages/ # Main views
│ │ ├── About.jsx
│ │ ├── Cart.jsx
│ │ ├── Collection.jsx
│ │ ├── Contact.jsx
│ │ ├── Home.jsx
│ │ ├── Login.jsx
│ │ ├── Orders.jsx
│ │ ├── PlaceOrder.jsx
│ │ ├── Product.jsx
│ │ └── Verify.jsx
│ ├── App.jsx # Root component with routing
│ ├── index.css # Global styles with Tailwind
│ └── main.jsx # Entry point with React DOM
├── .env # Environment variables (not tracked)
├── package.json # Dependencies and scripts
├── package.lock.json # Locked dependency versions for reproducibility
├── vite.config.js # Vite configuration
├── tailwind.config.js # Tailwind CSS configuration
├── eslint.config.js # ESLint configuration
└── README.md # Project documentation
git checkout -b feature/your-feature
).git commit -m "Add your feature"
).git push origin feature/your-feature
).For questions or feedback, feel free to reach out: