Skip to content

hrutik-codes/nxt-trendz-fullstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NxtTrendz β€” Fullstack E-Commerce Platform

NxtTrendz

A full-featured e-commerce web application built with the MERN stack, featuring secure authentication, cart management, Razorpay payment integration, and an admin dashboard.

πŸ”— Live Demo: nxt-trendz-fullstack.vercel.app πŸ”— API: nxt-trendz-fullstack.onrender.com


Tech Stack

Frontend React Vite JavaScript

Backend Node.js MongoDB JWT

Payments & Deployment Razorpay Vercel Render


Features

User Features

  • πŸ” JWT-based authentication (Register/Login)
  • πŸ›οΈ Browse products with search, filter by category & rating, sort by price
  • πŸ“¦ Product detail page with similar products
  • πŸ›’ Persistent cart (synced with MongoDB)
  • πŸ’³ Razorpay payment integration (UPI, Cards, NetBanking)
  • πŸ“‹ Order history with payment and delivery status

Admin Features

  • πŸ‘‘ Role-based access control (Admin/User)
  • πŸ“Š Admin dashboard with Orders, Products, Users tabs
  • πŸ”„ Update order status (Processing β†’ Shipped β†’ Delivered)
  • βž• Add/Delete products
  • πŸ‘₯ View and delete users

Project Structure

nxt-trendz-fullstack/
β”œβ”€β”€ client/                 # React + Vite Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # 18+ React components
β”‚   β”‚   β”œβ”€β”€ context/        # Cart Context
β”‚   β”‚   └── utils/          # API utility with base URL
β”‚   └── vercel.json         # Client-side routing config
└── server/                 # Express Backend
    β”œβ”€β”€ controllers/        # Auth, Cart, Orders, Payment, Admin
    β”œβ”€β”€ middleware/         # JWT protect + admin guard
    β”œβ”€β”€ models/             # User, Cart, Order, Product
    └── routes/             # 20+ REST API endpoints

API Endpoints

Auth

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login Login user
GET /api/auth/profile Get user profile

Cart

Method Endpoint Description
GET /api/cart Get user cart
POST /api/cart Add item to cart
PUT /api/cart/:productId Update quantity
DELETE /api/cart/:productId Remove item
DELETE /api/cart/clear Clear cart

Orders

Method Endpoint Description
POST /api/orders Place order
GET /api/orders/my Get my orders

Payment

Method Endpoint Description
POST /api/payment/create-order Create Razorpay order
POST /api/payment/verify Verify payment signature

Local Setup

Prerequisites

  • Node.js 18+
  • MongoDB Atlas account
  • Razorpay test account

Installation

# Clone the repo
git clone https://github.com/hrutik-codes/nxt-trendz-fullstack.git
cd nxt-trendz-fullstack

# Install dependencies
npm install
cd client && npm install
cd ../server && npm install

Environment Variables

Create server/.env:

PORT=5000
MONGO_URI=your_mongodb_atlas_uri
JWT_SECRET=your_jwt_secret
RAZORPAY_KEY_ID=rzp_test_your_key
RAZORPAY_KEY_SECRET=your_razorpay_secret
CLIENT_URL=http://localhost:5173
NODE_ENV=development

Create client/.env:

VITE_API_URL=http://localhost:5000

Run Development Server

# From root directory
npm run dev

Runs both frontend (port 5173) and backend (port 5000) concurrently.


Test Credentials

Admin Account:
Email:    [email protected]
Password: 123456

Test Payment (Razorpay):
UPI ID: success@razorpay

Deployment

Service Platform URL
Frontend Vercel nxt-trendz-fullstack.vercel.app
Backend Render nxt-trendz-fullstack.onrender.com
Database MongoDB Atlas Cloud hosted

⚠️ Render free tier spins down after 15 min inactivity. First request may take ~30 seconds.


Author

Hrutik Jagdale


License

MIT Β© 2026 Hrutik Jagdale

About

πŸ›’ Full-stack e-commerce platform built with MERN stack featuring JWT authentication, product filtering, cart & order management, Razorpay payment gateway, and admin dashboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors