A full-stack, community-driven open marketplace platform for buying, selling, exchanging, and donating second-hand items using cash, item swaps, or internal credits.
- Project Overview
- Objectives & Goals
- Target Audience
- Features
- Tech Stack
- System Architecture
- Core Modules
- Limitations
- Future Scope
- Developed By
- License
- Installation & Setup
Swap.it is a modern peer-to-peer marketplace designed to promote sustainable consumption and community-based trading. Inspired by platforms like eBay, Swap.it extends traditional buy/sell models by introducing:
- Item exchange (barter system)
- Internal credit economy
- Structured donation framework (free & credit-based)
- Real-time buyer–seller communication
The platform is architected with scalability, modularity, and user-centric design at its core.
-
Build a secure, scalable, and user-friendly marketplace
-
Support multi-modal transactions:
- Cash
- Item exchange
- Internal credits
-
Introduce a dual donation system (free & credit-based)
-
Enable transparent transaction tracking
-
Provide robust user management
-
Integrate real-time messaging
-
Deliver a fully functional MVP
- Users buying or selling second-hand items
- Environmentally conscious consumers
- Students & budget shoppers
- Community members seeking donation opportunities
- Users with limited access to traditional marketplaces
- Socially responsible traders
- Email & password login
- Google OAuth (via Supabase)
- Secure session handling
- Normal & Privileged user roles
-
Create, edit, delete listings
-
Support for:
- Sale
- Exchange
- Donation
-
Image uploads & categorization
-
Dashboard-based management
- Cash purchase
- Item-for-item exchange
- Credit-based acquisition
- Free donations
- Credit-based donations
- Automatic credit adjustment
- Claim without manual approval
- Donation-only restrictions (no buy/exchange)
- Earn credits by donating items
- Spend credits on listings
- Real-time credit balance updates
- Real-time chat using WebRTC & Socket.IO
- Item-specific conversations
- Secure in-platform communication
- Category filtering
- Price & credit range filters
- Transaction-type filters
- Debounced search
- Pagination with empty states
- Seller listings
- Messaging option
- Filter seller items by type
- Image gallery
- Seller info panel
- Wishlist toggle
- Conditional action buttons
- Related items carousel
- Mobile, tablet & desktop optimized
- Tailwind CSS-based responsive layout
- Next.js (App Router)
- React
- Tailwind CSS
- Axios for API communication
- Next.js API Routes
- Custom business logic & authentication
-
PostgreSQL
-
Prisma ORM
-
Supabase
- Database hosting
- Auth (OAuth, password reset)
- Storage buckets (images)
- WebRTC
- Socket.IO
- App Router-based routing
- Modular frontend components
- API-driven backend
- Prisma-based data modeling
- Real-time socket connections
- Secure session management
- User Management
- Product & Donation Listings
- Internal Credit System
- Real-Time Messaging
- Notifications
- Wishlist
- Profile Dashboard
- No built-in logistics handling
- No automated dispute resolution
- Quality depends on user-provided content
- Requires moderation tools for misuse prevention
- User ratings & verified badges
- In-app dispute resolution system
- Location-based item discovery
- AI-driven recommendations
- Credit top-up via payment gateways
- Gamified credit rewards
- Android & iOS mobile apps
- Donation impact analytics dashboard
- Admin moderation panel
- Hadeed Tariq
- Fatima Masood
This project is developed for academic purposes. All rights reserved by the authors.
Make sure you have the following installed:
- Node.js (v18 or later)
- npm or yarn
- PostgreSQL (or Supabase)
- Git
git clone https://github.com/your-username/swap.it.git
cd swap.itnpm install
# or
yarn installCreate a .env file in the root directory:
DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DATABASE
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
JWT_SECRET=your_secret_key📌 Notes
- Get Supabase keys from Supabase Dashboard → Project Settings → API
DATABASE_URLis provided by Supabase under Database → Connection string
Generate Prisma client:
npx prisma generateRun migrations:
npx prisma migrate dev(Optional) Open Prisma Studio:
npx prisma studioEnable the following in Supabase:
- ✅ Email Auth
- ✅ Google OAuth
- ✅ Storage Buckets (for images)
- ✅ Row Level Security (RLS)
Create buckets:
product-imagesprofile-images
npm run devOpen in browser:
http://localhost:3000
- Socket.io initializes automatically with the server
- WebRTC enables peer-to-peer chat
- No extra setup required for local testing