A full-stack e-commerce platform built with Next.js, featuring user authentication, product management, shopping cart functionality, and secure payment processing.
- Browse Products - View all available products with detailed information
- Product Details - Complete product information with multiple images
- Shopping Cart - Add/remove products with real-time cart updates
- Stock Management - Automatic stock validation to prevent overselling
- Address Management - Add delivery addresses for orders
- Multiple Payment Options:
- π³ Stripe - Secure credit/debit card payments
- π΅ Cash on Delivery (COD) - Pay when you receive your order
- Order History - View all your past orders and their status
- Product Management - Add new products with images and details
- Inventory Control - Manage product listings and availability
- Order Management - View and track all customer orders
- Stock Monitoring - Real-time inventory tracking
The following features could be implemented to enhance the platform:
- Address Management - Edit and update existing delivery addresses
- Order Tracking - Real-time order status updates with notifications
- Product Editing - Modify existing product details and pricing
- Product Removal - Delete discontinued or out-of-stock products
- Order Status Management - Update order status for Cash on Delivery orders
- Advanced Analytics - Sales reports and inventory insights
- Next.js 14 - React framework with App Router
- Tailwind CSS - Utility-first CSS framework
- MongoDB - NoSQL database with Mongoose ODM
- Clerk - Authentication and user management
- Cloudinary - Image storage and optimization
- Stripe - Payment processing
- Inngest - Background jobs and event handling
- React Context API - State management
- Node.js 18+ and npm
- MongoDB database
- Clerk account for authentication
- Cloudinary account for image storage
- Stripe account for payments
Configure your environment variables by copying .env.example to .env and filling in your actual values for all required services (MongoDB, Clerk, Cloudinary, Inngest, and Stripe).
# Clone the repository
git clone https://github.com/AlfonsoVidrio/quickcart.git
# Navigate to project directory
cd quickcart
# Install dependencies
npm install
# Copy environment variables template
cp .env.example .env.local
# Edit .env.local with your actual values
# Run the development server
npm run devOpen http://localhost:3000 in your browser to see the application.
To enable seller functionality for a user:
- Go to your Clerk Dashboard
- Navigate to Users section
- Edit the user's public metadata
- Add the following JSON:
{ "role": "seller" } - Save changes - the user will now have access to seller features
quickcart/
βββ π app/ # Next.js App Router
β βββ π api/ # API routes
β β βββ π cart/ # Cart operations
β β βββ π inngest/ # Inngest webhook endpoint
β β βββ π order/ # Order management
β β βββ π product/ # Product operations
β β βββ π stripe/ # Payment webhooks
β β βββ π user/ # User operations
β βββ π add-address/ # Add delivery address page
β βββ π all-products/ # Product catalog page
β βββ π cart/ # Shopping cart pages
β βββ π my-orders/ # User order history
β βββ π order-placed/ # Order confirmation page
β βββ π product/ # Product detail pages
β βββ π seller/ # Seller dashboard
β βββ οΏ½ favicon.ico # Site favicon
β βββ π globals.css # Global styles
β βββ π layout.js # Root layout component
β βββ π page.jsx # Homepage
βββ π assets/ # Static assets
β βββ π assets.js # Asset exports
β βββ π productData.js # Sample product data
β βββ πΌοΈ [images] # Product and UI images
βββ π components/ # Reusable components
β βββ π seller/ # Seller-specific components
β βββ π Banner.jsx # Hero banner component
β βββ π FeaturedProduct.jsx # Featured product display
β βββ π Footer.jsx # Footer component
β βββ π HeaderSlider.jsx # Image slider component
β βββ π HomeProducts.jsx # Product grid for homepage
β βββ π Loading.jsx # Loading spinner component
β βββ π Navbar.jsx # Navigation component
β βββ π NewsLetter.jsx # Newsletter subscription
β βββ π OrderSummary.jsx # Order summary component
β βββ π ProductCard.jsx # Product display card
βββ π config/ # Configuration
β βββ π db.js # Database connection
β βββ π inngest.js # Background jobs setup
βββ π context/ # React Context
β βββ π AppContext.jsx # Global state management
βββ π lib/ # Utility functions
β βββ π authSeller.js # Seller authentication utilities
βββ π models/ # Database models
β βββ π Address.js # Address schema
β βββ π Order.js # Order schema
β βββ π Product.js # Product schema
β βββ π User.js # User schema
βββ π public/ # Public static files
β βββ π file.svg # File icon
β βββ π globe.svg # Globe icon
β βββ π next.svg # Next.js logo
β βββ π vercel.svg # Vercel logo
β βββ π window.svg # Window icon
βββ οΏ½ .env.example # Environment variables template
βββ π .gitignore # Git ignore rules
βββ οΏ½ eslint.config.mjs # ESLint configuration
βββ π jsconfig.json # JavaScript configuration
βββ π middleware.ts # Next.js middleware
βββ π next.config.mjs # Next.js configuration
βββ π package.json # Dependencies and scripts
βββ π postcss.config.mjs # PostCSS configuration
βββ π README.md # Project documentation
βββ π tailwind.config.mjs # Tailwind CSS configuration
GET /api/product/list- Get all productsGET /api/product/[id]- Get product details
POST /api/cart/update- Update cart itemsGET /api/cart/get- Get user cartPOST /api/order/create- Create new order (COD)POST /api/order/stripe- Create Stripe checkoutPOST /api/user/add-address- Add shipping addressGET /api/user/get-address- Get user addressesGET /api/user/data- Get user profile data
POST /api/product/add- Add new productGET /api/product/seller-list- Get seller productsGET /api/order/seller-orders- Get seller orders