Audiophile is a full-stack e-commerce application built as an extended implementation of the Frontend Mentor – Audiophile E-commerce Website challenge. Beyond the original UI requirements, this project includes a complete backend, payment integration, and order tracking.
- Modern e-commerce UI based on the Audiophile design system
- Product listing, category pages, and product detail pages
- Cart management with persistent state (Zustand)
- Secure checkout flow with server-side price and quantity validation
- Integrated payment gateway
- Order tracking system
- Responsive design (mobile, tablet, desktop)
- Toast notifications for user feedback
- Schema-based validation using Zod
- Next.js 16 (App Router)
- React 19
- Tailwind CSS v4
- Zustand (state management)
- Zod (validation)
- Motion (animations)
- Lucide React (icons)
- Prisma ORM
- PostgreSQL
- Axios (API communication)
- TypeScript
- ESLint
- Bun (for Prisma seeding)
next,react,react-dom— core framework and UIprisma,@prisma/client,pg— database layerzustand— cart and client statezod— form and API validationaxios— HTTP requestsmotion— animationstailwindcss,clsx,tailwind-merge— styling utilities
- Node.js 20+
- PostgreSQL
- Bun (optional, required for seeding as configured)
git clone <repository-url>
cd audiophile
npm install- Payment Webhooks: Implement a dedicated webhook endpoint to handle payment status updates from PayU (and other providers) asynchronously. This should be separate from the user redirect flow (
surl/furl) to ensure reliability even if the user closes the browser. - Fix Typos: Rename
app/api/payment/sucesstoapp/api/payment/success. - Env Variable Consistency: Standardize usage of
PAYU_MERCHANT_SALTvsPAYU_MERCHANT_SECRETacross the codebase. - Frontend Pages: Create dedicated frontend pages for
/payment/successand/payment/failureto provide a better user experience than raw JSON responses. - Multi-Provider Support: Implement Stripe and Razorpay payment providers as defined in the Prisma schema.
- Testing: Add unit and integration tests (e.g., Jest, Playwright) to ensure application stability.
- Checkout Refactor: Refactor checkout logic to dynamically select the payment provider instead of hardcoding PayU.