GreenCart Project Story
Inspiration
The idea for GreenCart was born out of a desire to create a modern, scalable e‑commerce platform that not only demonstrates full‑stack engineering skills but also emphasizes clarity, accessibility, and sustainability. Inspired by real-world shopping experiences, I wanted to build a cart system that feels intuitive, responsive, and reliable — something that could serve as both a learning project and a professional showcase.
What it does
GreenCart is a full‑stack shopping cart application that allows users to:
- Browse products with a clean, responsive UI
- Add/remove items from their cart
- Manage quantities dynamically
- View real‑time cart totals
- Experience smooth state management across frontend and backend
In short, it simulates the workflow of a real e‑commerce store, from product selection to checkout.
How we built it
- Frontend: Built with React and styled using TailwindCSS for responsive, scroll‑free layouts. State management ensures cart updates are reflected instantly.
- Backend: Designed with Node.js and Express, connected to MongoDB Atlas for persistent storage. Schema design focused on realistic product and user data.
- Deployment: Hosted on Vercel for services, ensuring scalability and easy access and integrated Stripe API for payment services.
- Workflow: Iterative prototyping, debugging seed scripts, and refining backend logic to minimize manual intervention.
Challenges we ran into
- Debugging seed scripts to generate realistic product data without duplication.
- Handling integration errors between frontend and backend, especially with imports and model definitions.
- Ensuring state synchronization so that cart totals update correctly across different components.
- Designing error-proof workflows for multi-role access (admin, user) without breaking authentication.
Accomplishments that we're proud of
- Successfully deployed a full‑stack application with seamless frontend‑backend integration.
- Built a scalable schema that supports realistic product and cart data.
- Automated workflows like payslip generation and approval flows in related HR portal projects, applying similar logic here for cart reliability.
- Achieved a professional polish in UI/UX, prioritizing accessibility and compact layouts.
What we learned
- The importance of backend schema design in ensuring smooth data flow.
- How to debug ReferenceErrors and integration issues in Node.js.
- Best practices for frontend state management in React.
- Deployment strategies across Vercel, Render, and MongoDB Atlas.
- Iterative design thinking: refining workflows step by step until they are error‑proof.
What's next for GreenCart
- Optimize performance using lazy loading and caching strategies.
- Explore eco‑friendly features like carbon footprint tracking for each purchase.
A touch of math
To simulate cart totals, we used a simple aggregation formula:
[ \text{Total Price} = \sum_{i=1}^{n} (p_i \cdot q_i) ]
Where:
- (p_i) = price of item (i)
- (q_i) = quantity of item (i)
- (n) = total number of items in the cart
This formula ensures real‑time updates whenever users adjust quantities or add/remove products.
Built With
- css3
- express.js
- html5
- javascript
- jwt
- mongodb
- mongoose
- node.js
- react.js
- restful
- stripe
- tailwindcss
- vercel
Log in or sign up for Devpost to join the conversation.