Inspiration
I wanted to build something simple yet useful that reflects a real-world e-commerce experience. Shopping carts are a core feature of almost every online store, so I decided to create my own version to strengthen my understanding of React, Next.js, and state management.
What it does
Browse products by category: Electronics, Jewelry, Men's Clothing, Women's Clothing. View product details, including price, rating, and description. Add products to the cart. Increment, decrement, and remove items from the cart. Clear the entire cart. Filter products by price range and customer ratings. Sort products by customer reviews, price low to high, and price high to low. Loading Animation: While the product data is being fetched, a loading animation is displayed. Sidebar Navigation: Implemented a sidebar menu with category links for easy navigation, toggling open and closed, powered by Redux and Next.js.
How we built it
I built this project using Next.js, React, and Tailwind CSS for the UI. For state management, I used Redux Toolkit, which made it easier to handle cart operations and keep data consistent across components.
Challenges we ran into
One of the biggest challenges was keeping the cart state consistent when users performed multiple actions quickly, such as adding and removing the same item repeatedly.
Accomplishments that we're proud of
I’m proud that I built a fully functional shopping cart with real-time updates and smooth user interactions. It feels great to see everything from fetching products to managing the cart working seamlessly together.
What we learned
Through this project, I learned how important proper state management is for building scalable web applications.
What's next for My First Project
- Add user authentication so users can save their cart and wishlist
- Integrate a payment gateway for checkout
- Include product search with auto-suggestions
- Improve mobile responsiveness and accessibility
- Store cart data in a backend database for persistence
Built With
- axios
- nextjs
- react
- tailwindcss
Log in or sign up for Devpost to join the conversation.