MarketVerse is a dynamic e-commerce platform built with Next.js, where users can seamlessly buy and sell products. Whether you want to shop for quality goods or become a seller to showcase your products, MarketVerse provides a smooth and intuitive experience. With secure transactions, user-friendly navigation, and a robust marketplace, MarketVerse empowers individuals to connect, trade, and grow their businesses effortlessly.
Warning
This project is created for learning purposes to explore and implement various web development and DevOps technologies.
- Project - MarketVerse
- Table of Contents
Before running MarketVerse, ensure you have the following installed:
- Node.js (>= 18.0.0) → Download Here
- Docker & Docker Compose → Install Guide
- PostgreSQL (>= 14) → Setup Guide
- Cloudinary Account → Sign Up (For image uploads)
- Clerk Account → Sign Up (For authentication)
- 🛍️ Buy & sell products effortlessly
- 🔒 Secure authentication with Clerk
- 📸 Image management using Cloudinary
- 📩 Email notifications with Nodemailer
- 📦 PostgreSQL with Drizzle ORM for efficient data handling
- 🌗 Dark Mode support with Next-Themes
- ⚡ Lightning-fast UI with React, Tailwind CSS & Shadcn UI
- 🛠️ Fully containerized and orchestrated using Docker & Kubernetes
src
├── app
│ ├── api
│ │ ├── (buyer)
│ │ │ └── user
│ │ │ ├── add-user
│ │ │ ├── address-user
│ │ │ │ ├── default
│ │ │ │ └── [email]
│ │ │ ├── get-user
│ │ │ ├── payment
│ │ │ │ ├── unlink
│ │ │ │ │ └── [username]
│ │ │ │ └── [email]
│ │ │ ├── update-user
│ │ │ └── upload-image
│ │ ├── (seller)
│ │ │ ├── add-product
│ │ │ ├── check
│ │ │ ├── delete
│ │ │ ├── delete-products
│ │ │ │ └── [id]
│ │ │ ├── details
│ │ │ ├── get-products
│ │ │ ├── login
│ │ │ ├── order
│ │ │ │ ├── accept-orders
│ │ │ │ │ └── [orderId]
│ │ │ │ ├── decline-orders
│ │ │ │ │ └── [orderId]
│ │ │ │ ├── delivered-orders
│ │ │ │ │ └── [orderId]
│ │ │ │ ├── get-approve-orders
│ │ │ │ │ └── [email]
│ │ │ │ ├── get-decline-orders
│ │ │ │ │ └── [email]
│ │ │ │ ├── get-delivered-orders
│ │ │ │ │ └── [email]
│ │ │ │ └── get-orders
│ │ │ │ └── [email]
│ │ │ ├── payment
│ │ │ │ ├── unlink
│ │ │ │ │ └── [username]
│ │ │ │ └── [email]
│ │ │ ├── update
│ │ │ └── upload
│ │ ├── cron
│ │ │ └── newsletter
│ │ ├── newsletter
│ │ └── products
│ │ ├── cart
│ │ │ ├── add
│ │ │ ├── fetch
│ │ │ └── remove
│ │ ├── fetch
│ │ ├── order
│ │ │ ├── auto-cancel
│ │ │ ├── cancel
│ │ │ │ └── [orderId]
│ │ │ └── [email]
│ │ ├── review
│ │ │ └── [no]
│ │ ├── wishlist
│ │ │ ├── add
│ │ │ ├── fetch
│ │ │ └── remove
│ │ └── [no]
│ ├── common
│ │ ├── address
│ │ ├── cart
│ │ ├── orders
│ │ ├── payment
│ │ ├── profile
│ │ └── wishlist
│ ├── dashboard
│ │ ├── list
│ │ ├── order
│ │ │ ├── accept
│ │ │ ├── complete
│ │ │ ├── decline
│ │ │ └── pending
│ │ ├── payment
│ │ ├── profile
│ │ └── view
│ └── products
│ ├── buynow
│ │ └── [id]
│ ├── explore
│ └── [no]
├── components
│ ├── custom
│ │ ├── products
│ │ └── skeleton
│ ├── theme
│ └── ui
├── db
├── hooks
├── lib
├── service
│ ├── buyer-detail
│ ├── product-detail
│ └── seller-detail
├── types
│ ├── api
│ ├── products
│ └── schema
├── utils
└── validation
└── schema
Each folder serves a specific purpose:
- app/api → Handles all API endpoints
- components/ → Reusable UI components
- service/ → Business logic for buyers, products, and sellers
- db/ → Database-related files
- utils/ → Helper functions
- validation/ → Schema validation
This structured approach ensures scalability and ease of maintenance.
Important
These technologies are planned for future implementation.
- Docker
- Kubernetes (Minikube)
- Jenkins
- Shell Scripting
- Linux
- Helm
- AWS EC2
- Terraform
- Ansible
- Grafana
- Prometheus
- GraphQL (Planned)
- Redis (Planned)
Follow these steps to set up the project on your local machine:
# Clone the project repository
git clone https://github.com/iamanonymous419/marketverse.git marketverse
cd marketverse
# For a specific branch
git clone -b main https://github.com/iamanonymous419/marketverse.git marketverse
cd marketversenpm install # for npm
# or
bun install # for bun
# or
yarn install # for yarn
# or
pnpm install # for pnpm (recommended)Create a .env.local file in the root directory and add your environment variables:
# Clerk authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
# Database configuration (PostgreSQL)
DATABASE_URL=
# Cloudinary configuration
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
# Nodemailer configuration
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=
SMTP_FROM=npx drizzle-kit generate
npx drizzle-kit push
# or
pnpm exec drizzle-kit generate
pnpm exec drizzle-kit push
# or (for linux)
pnpm drizzle-kit generate
pnpm drizzle-kit pushnpm run dev
# or
yarn dev
# or
pnpm dev # (recommended)
# or
bun devNote
Open http://localhost:3000 with your browser to see the result.
# Clone the project repository
git clone https://github.com/iamanonymous419/marketverse.git marketverse
cd marketverse
# For a specific branch
git clone -b main https://github.com/iamanonymous419/marketverse.git marketverse
cd marketversedocker build --build-arg NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_key_here -t marketverse:latest .Create a Docker network to enable communication between containers:
docker network create marketverse-network -d bridge# Create a volume for persistent data
docker volume create marketverse-data
# Run PostgreSQL container
docker run -d \
--name marketverse-database \
--network marketverse-network \
-p 5400:5432 \
-e POSTGRES_USER=something \
-e POSTGRES_PASSWORD=something \
-e POSTGRES_DB=marketverse \
-v marketverse-data:/var/lib/postgresql/data \
postgresFor Linux : Connect to the database container and run the following commands:
pnpm exec drizzle-kit generate
pnpm exec drizzle-kit pushdocker run --name marketverse --network marketverse-network -d \
-p 3000:3000 \
-e CLERK_SECRET_KEY=your_clerk_secret \
-e DATABASE_URL=postgresql://something:something@marketverse-database:5432/marketverse \
-e NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloudinary_name \
-e CLOUDINARY_API_KEY=your_cloudinary_key \
-e CLOUDINARY_API_SECRET=your_cloudinary_secret \
-e SMTP_HOST=your_smtp_host \
-e SMTP_PORT=your_smtp_port \
-e SMTP_USER=your_smtp_user \
-e SMTP_PASSWORD=your_smtp_password \
-e SMTP_FROM=your_smtp_from \
marketverse:latestCreate a .env file in the root directory and add your environment variables for Docker Compose:
DATABASE_URL="postgresql://something:something@marketverse-database:5432/marketverse"
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
SMTP_FROM=Then run:
docker-compose up --build -dNote
Open http://localhost:3000 with your browser to see the result.
Anonymous
📧 Email: anonymous292009@gmail.com
🔗 GitHub: https://github.com/iamanonymous419