Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 

Repository files navigation

IITISHOP

A peer-to-peer marketplace for IIT Indore students and faculty to buy and sell second-hand goods. Built with a Next.js frontend and an Express + Prisma backend, with Clerk for authentication, Cloudinary for image uploads, and Dodo Payments for checkout.

🔗 Live: iitishop.vercel.app


Tech Stack

Layer Technology
Frontend Next.js 15, React 19, Tailwind CSS, shadcn/ui
Backend Node.js, Express.js, TypeScript
ORM Prisma
Database MySQL
Auth Clerk
Payments Dodo Payments
Image Storage Cloudinary

Project Structure

iitishop/
├── backend/          # Express + Prisma REST API
│   ├── prisma/       # Schema and migrations
│   └── src/
│       ├── controllers/
│       ├── routes/
│       ├── middleware/
│       └── index.ts
└── frontend/         # Next.js app
    └── src/
        ├── app/      # App router pages & API routes
        ├── components/
        ├── hooks/
        └── types/

Getting Started

Prerequisites

1. Clone the repo

git clone https://github.com/yasharyasaxena/iitishop.git
cd iitishop

2. Set up the Backend

cd backend
npm install

Create a .env file in the backend/ directory:

DATABASE_URL="mysql://USER:PASSWORD@HOST:PORT/DATABASE"
PORT=3000

Run Prisma migrations and generate the client:

npx prisma migrate dev
npx prisma generate

Start the dev server:

npm run dev

The API will be available at http://localhost:3000. You can verify it with the health check endpoint: GET /health.

3. Set up the Frontend

cd ../frontend
npm install

Create a .env.local file in the frontend/ directory:

# Clerk (https://dashboard.clerk.com)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...

# URL of the running backend
NEXT_PUBLIC_API_URL=http://localhost:3000

# Cloudinary (https://cloudinary.com/console)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_UPLOAD_PRESET=your_upload_preset

Start the dev server:

npm run dev

The app will be available at http://localhost:3001 (or the next available port).


Environment Variables Reference

Backend (backend/.env)

Variable Description
DATABASE_URL MySQL connection string (e.g. mysql://user:pass@localhost:3306/iitishop)
PORT Port for the Express server (default: 3000)

Frontend (frontend/.env.local)

Variable Description
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY Clerk publishable key (public)
CLERK_SECRET_KEY Clerk secret key (server-only)
NEXT_PUBLIC_API_URL Base URL of the backend API
CLOUDINARY_CLOUD_NAME Your Cloudinary cloud name (server-only)
CLOUDINARY_UPLOAD_PRESET Cloudinary unsigned upload preset (server-only)

Available Scripts

Backend

Command Description
npm run dev Start dev server with nodemon
npm run build Compile TypeScript to dist/
npm run start Run compiled production build
npm run prisma:generate Re-generate Prisma client
npm run prisma:studio Open Prisma Studio

Frontend

Command Description
npm run dev Start Next.js dev server
npm run build Build for production
npm run start Start production server
npm run lint Run ESLint

Features

  • Browse and search product listings by category
  • Seller dashboard to create, edit, and manage listings
  • Product image uploads via Cloudinary
  • Order management for buyers and sellers
  • Checkout and payments via Dodo Payments
  • Auth and user profiles via Clerk
  • Review and reporting system
  • In-app messaging between users

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages