A production-ready, enterprise-grade ecommerce platform built with Next.js 15, NestJS, PostgreSQL, and Prisma. Glacier-blue glassmorphism aesthetic with complete backend architecture.
Frontend: Next.js 15, TypeScript, TailwindCSS, Framer Motion, Zustand, TanStack Query Backend: NestJS, PostgreSQL, Prisma ORM, Redis, JWT, Passport.js Payments: Stripe, Razorpay Deployment: Docker, Vercel (frontend), Railway/Render/AWS (backend)
- Node.js 20+
- Docker & Docker Compose
- PostgreSQL 16+
- Redis 7+
Backend:
cd backend
npm install
cp .env .env.local # Edit with your values
npx prisma migrate dev
npx prisma db seed
npm run start:devFrontend:
cd frontend
npm install
cp .env.local.example .env.local
npm run devdocker compose up -dThis starts PostgreSQL, Redis, backend (port 4000), and frontend (port 3000).
cd backend
npx prisma db seedCredentials:
- Admin:
admin@wemine.com/admin123 - User:
user@wemine.com/admin123
wemine/
├── backend/ # NestJS API
│ ├── prisma/
│ │ ├── schema.prisma # Database schema (20+ models)
│ │ └── seed.ts # Seed script
│ └── src/
│ ├── auth/ # JWT, OAuth, 2FA, OTP
│ ├── products/ # CRUD, variants, images
│ ├── orders/ # Orders, refunds
│ ├── cart/ # Cart, save for later
│ ├── payments/ # Stripe, Razorpay
│ ├── admin/ # Dashboard, management
│ ├── search/ # Full-text search
│ ├── users/ # Profiles, addresses
│ ├── categories/ # Category hierarchy
│ ├── reviews/ # Ratings & reviews
│ ├── wishlist/ # User wishlists
│ ├── coupons/ # Discount engine
│ ├── notifications/ # User notifications
│ ├── upload/ # File uploads
│ ├── email/ # Transactional emails
│ └── loyalty/ # Loyalty points
├── frontend/ # Next.js 15 App
│ └── src/
│ ├── app/ # App Router pages
│ │ ├── products/ # Product listing
│ │ ├── product/ # Product detail
│ │ ├── cart/ # Shopping cart
│ │ ├── checkout/ # Multi-step checkout
│ │ ├── auth/ # Login, signup, OAuth
│ │ ├── account/ # Profile, orders, wishlist
│ │ └── admin/ # Admin dashboard
│ ├── components/ # Reusable components
│ ├── store/ # Zustand stores
│ └── lib/ # API client, utils
└── docker-compose.yml # Full stack orchestration
- Email/password signup & login
- OAuth (Google, GitHub)
- Email verification (OTP)
- Password reset flow
- JWT access + refresh tokens
- 2FA support
- Session management
- Product variants (size/color)
- Dynamic inventory
- Category hierarchy
- Product images gallery
- Related products
- Flash sales support
- SEO metadata
- SKU management
- Persistent cart
- Save for later
- Quantity management
- Coupon/discount engine
- Multi-address support
- Stripe & Razorpay
- Tax & shipping calculation
- Order confirmation
- Sales analytics
- Revenue tracking
- User management
- Inventory management
- Order management
- Refund processing
- Debounced instant search
- Typo-tolerant
- Price & category filters
- Search suggestions
- Search history
| Variable | Description |
|---|---|
| DATABASE_URL | PostgreSQL connection string |
| REDIS_URL | Redis connection string |
| JWT_ACCESS_SECRET | JWT signing key |
| JWT_REFRESH_SECRET | Refresh token key |
| STRIPE_SECRET_KEY | Stripe API key |
| RAZORPAY_KEY_ID | Razorpay API key |
| SMTP_HOST | Email server host |
| GOOGLE_CLIENT_ID | Google OAuth client ID |
| GITHUB_CLIENT_ID | GitHub OAuth client ID |
| Variable | Description |
|---|---|
| NEXT_PUBLIC_API_URL | Backend API URL |
cd frontend
npx vercel --prodcd backend
# Set DATABASE_URL, JWT secrets, payment keys in dashboard
npm run build
npm run start:prodnpx prisma migrate deploy # Production
npx prisma migrate dev # DevelopmentPOST /api/auth/signup— Create accountPOST /api/auth/login— Sign inPOST /api/auth/refresh— Refresh tokensPOST /api/auth/logout— Sign outPOST /api/auth/send-otp— Email verificationPOST /api/auth/verify-email— Verify OTPPOST /api/auth/forgot-password— Reset requestPOST /api/auth/reset-password— Reset passwordGET /api/auth/profile— Get profilePATCH /api/auth/profile— Update profileGET /api/auth/google— Google OAuthGET /api/auth/github— GitHub OAuth
GET /api/products— List products (search, filter, sort, paginate)GET /api/products/featured— Featured productsGET /api/products/:slug— Product by slugGET /api/products/:id/related— Related productsPOST /api/products— Create (admin/vendor)PUT /api/products/:id— Update (admin/vendor)DELETE /api/products/:id— Delete (admin)
GET /api/cart— Get cartPOST /api/cart/items— Add itemPATCH /api/cart/items/:id— Update quantityDELETE /api/cart/items/:id— Remove itemDELETE /api/cart— Clear cart
POST /api/orders— Create orderGET /api/orders— List user ordersGET /api/orders/:id— Order detailPOST /api/orders/:id/refund— Request refund
POST /api/payments/stripe/create-intent/:orderId— Stripe paymentPOST /api/payments/stripe/webhook— Stripe webhookPOST /api/payments/razorpay/create-order/:orderId— RazorpayPOST /api/payments/razorpay/verify— Verify payment
GET /api/admin/dashboard— Dashboard statsGET /api/admin/users— List usersGET /api/admin/orders— List ordersPUT /api/admin/orders/:id/status— Update order statusPOST /api/admin/refunds/:id/:action— Approve/reject refund
GET /api/search?q=query— Search productsGET /api/search/recent— Recent searchesDELETE /api/search/history— Clear history
The UI follows a premium glacier-glassmorphism aesthetic:
- Colors: Glacier blue palette (#F4F9F9 → #1A2C2E)
- Typography: Outfit (headings) + Manrope (body)
- Effects: Glass surfaces, backdrop blur, subtle shadows
- Animations: Framer Motion with smooth transitions
- Responsive: Mobile-first, pixel-perfect
MIT
