Skip to content

This project uses Nextjs and other web frameworks to mimic an online store where customers may purchase and sell goods.

License

iamanonymous419/marketverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project - MarketVerse

Next.js Tailwind CSS Shadcn UI Lucide Icons React Hook Form Zod Typed.js TanStack Query Zustand Drizzle ORM PostgreSQL Cloudinary Clerk Nodemailer Docker Kubernetes Jenkins Helm Prometheus Grafana AWS Minikube Vercel ESLint Prettier TypeScript TSX PostCSS

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.

Table of Contents

Prerequisites

Before running MarketVerse, ensure you have the following installed:

Tech Stack

Frontend

Next.js Tailwind CSS Shadcn UI Lucide Icons React Hook Form Zod Typed.js TanStack Query

Backend & API

Drizzle ORM PostgreSQL Cloudinary Clerk Nodemailer

Development & Build Tools

TypeScript ESLint Prettier TSX PostCSS

DevOps & Deployment

Containerization & Orchestration

Docker Kubernetes Minikube AWS EKS

Infrastructure as Code (IaC)

Terraform Ansible Helm

CI/CD Pipeline & Automation

Jenkins Shell Linux

Monitoring & Logging

Grafana Prometheus Loki

Cloud & Hosting

AWS EC2 Vercel

Continuous Delivery & GitOps

ArgoCD

Features

  • 🛍️ 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

Project Structure

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.

Future Plans

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)

How To Setup This Project

Local Development Setup

Follow these steps to set up the project on your local machine:

1. Clone the Repository

# 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 marketverse

2. Install Dependencies

npm install # for npm
# or
bun install # for bun
# or
yarn install # for yarn
# or
pnpm install # for pnpm (recommended)

3. Set Up Environment Variables

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=

4. Generate and Push Schema to Database

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 push

5. Run the Development Server

npm run dev
# or
yarn dev
# or
pnpm dev # (recommended)
# or
bun dev

6. Access the Application

Note

Open http://localhost:3000 with your browser to see the result.

Docker Development Setup

1. Clone the Repository

# 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 marketverse

2. Build the Docker Image

docker build --build-arg NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_key_here -t marketverse:latest .

3. Create Docker Network

Create a Docker network to enable communication between containers:

docker network create marketverse-network -d bridge

4. Set Up PostgreSQL Database

# 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 \
  postgres

5. Initialize Database Schema

For Linux : Connect to the database container and run the following commands:

pnpm exec drizzle-kit generate
pnpm exec drizzle-kit push

6. Run the Container

docker 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:latest

Using Docker Compose

Create 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 -d

Note

Open http://localhost:3000 with your browser to see the result.

Author

Anonymous
📧 Email: anonymous292009@gmail.com
🔗 GitHub: https://github.com/iamanonymous419

About

This project uses Nextjs and other web frameworks to mimic an online store where customers may purchase and sell goods.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages