E‑Thrift — full-stack e-commerce store
Simple full-stack e-commerce demo with admin dashboard, Stripe checkout, and coupon support.

E‑Thrift is a full-stack e-commerce learning project built with a React + Vite frontend and an Express API backed by MongoDB. The goal was to practice building a realistic store flow end‑to‑end: public browsing, cart UX, secure authentication, admin tooling, and a real payment provider integration. On the backend the app exposes REST endpoints for authentication, products, coupons, checkout, and orders. Authentication is handled with short‑lived access tokens and refresh tokens stored in secure httpOnly cookies, with refresh tokens persisted in Redis for server-side validation. Product management is role-based (admin-only) and product images are uploaded to Cloudinary, supporting a gallery of images per listing. On the frontend the app uses React Router for navigation and Zustand for state management. The shopping experience is guest-first: users can browse products by category, add items to a local cart (stored in localStorage), apply global coupon codes, and complete checkout via Stripe. If a user is logged in during checkout, the purchase is saved as an order and shows up in their account’s purchase history.
- Product browsing (all products, category pages, product detail)
- Recommended products section (randomized selection)
- Guest-first cart stored in localStorage with quantity controls
- Coupon validation and discount calculation
- Stripe Checkout integration with success/cancel flow
- Coupon redemption after successful payment (single-use codes)
- User authentication (signup/login/logout) with access + refresh tokens in httpOnly cookies
- Automatic token refresh on 401 (frontend interceptor)
- Role-based admin dashboard (create/update/delete products)
- Admin coupon creation
- Member order history page (orders saved only for signed-in checkouts)
- Backend analytics endpoint for admin metrics (users/products/sales/revenue + daily sales)
- Responsive UI with Tailwind and small motion/feedback touches (toasts, animations)