MCPcopy Index your code
hub / github.com/NightClover-code/modern-ecommerce

github.com/NightClover-code/modern-ecommerce @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
443 symbols 1,101 edges 195 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Elecshop - Modern eCommerce Platform

A full-stack eCommerce platform built with Next.js, Nest.js, and MongoDB, featuring AI-powered product management and modern authentication.

Elecshop preview image

Features 🚀

Core Features

  • Full-featured shopping cart with:
  • server-side persistence for logged in users
  • local storage for guests
  • Product reviews and ratings system
  • Advanced product search with pagination
  • User account management & order history
  • Secure authentication with JWT (access & refresh tokens)
  • Role-based access control (Admin/User)

AI-Powered Features

  • AI Product Creator for generating product listings (Vercel AI SDK)
  • Image generation for product images (using Replicate)
  • Product Development Expert chat interface
  • Smart product recommendations

Technical Highlights

  • Modern monorepo structure with apps for web and server
  • Type-safe API communication with shared types
  • Real-time updates using modern state management
  • Cloudinary integration for image management
  • Secure payment processing with PayPal and Stripe
  • Modern UI with Shadcn components and Tailwind CSS

Tech Stack 💻

Frontend

  • Next.js 15 with App Router
  • TypeScript
  • Tailwind CSS
  • Shadcn UI Components
  • Framer Motion for animations
  • Chat interface with Vercel AI SDK

Backend

  • Nest.js with TypeScript
  • MongoDB with Mongoose
  • JWT Authentication
  • Swagger API Documentation
  • Argon2 for password hashing
  • Cloudinary for media storage
  • OpenAI integration
  • Text Vercel AI SDK
  • Replicate for image generation

DevOps & Tools

  • Monorepo architecture
  • pnpm for package management
  • Docker support
  • Railway for backend deployment
  • Vercel for frontend deployment

Getting Started 🏃

Prerequisites

  • Node.js (v16 or higher)
  • pnpm (preferred package manager)
  • MongoDB instance (Docker preferred)

Running Locally 🖥️

Clone the project

git clone https://github.com/NightClover-code/modern-ecommerce.git

Go to the project directory

cd modern-ecommerce

Remove remote origin

git remote remove origin

Install dependencies (root)

pnpm install

Add Environment Variables - Client

Click to expand!

  • NEXT_PUBLIC_API_URL
  • OPENAI_API_KEY
  • NEXT_PUBLIC_PAYPAL_CLIENT_ID
  • STRIPE_SECRET_KEY
  • NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY

Add Environment Variables - Server

Click to expand!

  • ALLOWED_ORIGINS
  • PORT
  • JWT_SECRET
  • JWT_ACCESS_SECRET
  • JWT_REFRESH_SECRET
  • CLOUDINARY_CLOUD_NAME
  • CLOUDINARY_API_KEY
  • CLOUDINARY_API_SECRET
  • MONGODB_URI
  • MONGO_USERNAME
  • MONGO_PASSWORD
  • REPLICATE_API_TOKEN
  • OPENAI_API_KEY

Start the server

pnpm start:server

Start the client

pnpm start:web

Author

Thanks for sharing 🚀

Extension points exported contracts — how you extend this code

CookieOptions (Interface)
(no doc)
apps/shared/cookie-config.ts
TokenPayload (Interface)
(no doc)
apps/server/src/users/dtos/auth.dto.ts
AuthLayoutProps (Interface)
(no doc)
apps/web/src/modules/auth/layouts/auth-layout.tsx
CookieConfig (Interface)
(no doc)
apps/shared/cookie-config.ts
GeneratedUser (Interface)
(no doc)
apps/server/src/utils/seed-users.ts
LoginCredentials (Interface)
(no doc)
apps/web/src/modules/auth/api/auth-api.ts
Product (Interface)
(no doc)
apps/shared/types/index.ts
ValidationError (Interface)
(no doc)
apps/server/src/ai/interfaces/agents.ts

Core symbols most depended-on inside this repo

cn
called by 70
apps/web/src/lib/utils.ts
toast
called by 44
apps/web/src/hooks/use-toast.ts
useToast
called by 12
apps/web/src/hooks/use-toast.ts
fetchWithAuth
called by 11
apps/web/src/lib/fetch-with-auth.ts
formatPrice
called by 7
apps/web/src/lib/utils.ts
create
called by 6
apps/server/src/users/services/users.service.ts
refresh
called by 5
apps/server/src/users/services/auth.service.ts
hashPassword
called by 5
apps/server/src/utils/password.ts

Shape

Function 155
Method 113
Class 100
Interface 75

Languages

TypeScript100%

Modules by API surface

apps/server/src/users/services/users.service.ts13 symbols
apps/server/src/products/services/products.service.ts13 symbols
apps/server/src/products/controller/products.controller.ts11 symbols
apps/server/src/cart/services/cart.service.ts11 symbols
apps/server/src/cart/controller/cart.controller.ts10 symbols
apps/web/src/modules/cart/context/cart-context.tsx9 symbols
apps/web/src/hooks/use-toast.ts9 symbols
apps/server/src/users/dtos/auth.dto.ts9 symbols
apps/server/src/users/controller/auth.controller.ts9 symbols
apps/server/src/orders/services/orders.service.ts9 symbols
apps/server/src/orders/controller/orders.controller.ts9 symbols
apps/server/src/ai/tools/product-generation.tool.ts9 symbols

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add modern-ecommerce \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact