IIITN-Resell is a campus marketplace platform designed specifically for IIIT Nagpur students and faculty to buy and sell second-hand items. This full-stack application provides a secure, easy-to-use environment for the campus community to trade items, connect through real-time chat, and manage personal listings.
- Google OAuth Integration - Secure login using institutional (@iiitn.ac.in) email addresses
- JWT Authentication - Secure API access with JSON Web Tokens
- User Profiles - Customizable profiles with image upload capabilities
- Intuitive Marketplace - Browse all available products with advanced filtering
- Category & Price Filtering - Find items by category, price range, and more
- Product Management - Create, edit, and mark items as sold
- Image Upload - Add images to product listings using Cloudinary storage
- Real-time Chat - Instant messaging between buyers and sellers
- Product-Specific Conversations - Chat about specific items
- Notifications - Get notified about new messages
- Unread Message Tracking - See which conversations have unread messages
- Responsive Design - Works on desktop and mobile devices
- Dark/Light Mode - Toggle between dark and light themes
- Intuitive Navigation - Easy-to-use interface with clear product visibility
- React.js - UI component library
- React Router - Client-side routing
- Context API - Global state management
- Socket.io-client - Real-time communication
- Axios - API request handling
- Tailwind CSS - Utility-first CSS framework
- Lucide React - Modern icon set
- Node.js - JavaScript runtime
- Express - Web application framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- Socket.io - Real-time bidirectional communication
- JWT - Authentication mechanism
- Passport.js - Authentication middleware
- Multer/Cloudinary - File uploads and storage
- bcryptjs - Password hashing
- Node.js (v14 or higher)
- MongoDB instance (local or Atlas)
- Cloudinary account for image storage
- Google OAuth credentials
- Clone the repository:
git clone https://github.com/yourusername/iiitn-resell.git
cd iiitn-resell- Install dependencies:
# Install root dependencies
npm install
# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm install- Create a
.envfile in the server directory with the following variables:
# Server Configuration
PORT=5000
NODE_ENV=development
# MongoDB Connection
MONGODB_URI=your_mongodb_connection_string
# JWT Secret
JWT_SECRET=your_jwt_secret_key
SESSION_SECRET=your_session_secret
# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Client URL
CLIENT_URL=http://localhost:3000
PRODUCTION_CLIENT_URL=https://your-production-url.com
- Create a
.envfile in the client directory:
REACT_APP_API_URL=http://localhost:5000/api
# From the root directory
npm run devThis will start both the client and server concurrently.
# Build the client
cd client
npm run build
# Start the server (from root directory)
npm startPOST /api/auth/register- Register a new userPOST /api/auth/login- Login userGET /api/auth/google- Google OAuth loginGET /api/auth/profile- Get user profileGET /api/auth/verify-token- Verify JWT token
GET /api/users/profile- Get current user profilePUT /api/users/profile- Update user profilePUT /api/users/change-password- Change user passwordPUT /api/users/profile-picture- Update profile picture
GET /api/products- Get all products with filtersGET /api/products/user- Get current user's productsGET /api/products/:id- Get single productPOST /api/products- Create a new productPUT /api/products/:id- Update a productDELETE /api/products/:id- Delete a product
POST /api/chat/conversations- Create a new conversationGET /api/chat/conversations- Get all user conversationsGET /api/chat/conversations/:conversationId/messages- Get conversation messages
join_conversation- Join a conversation roomsend_message- Send a messagemark_as_read- Mark messages as readtyping- User is typingstop_typing- User stopped typing
receive_message- Receive a new messagenew_message_notification- New message notificationmessages_read- Messages were readuser_typing- User is typinguser_stop_typing- User stopped typing
The application can be deployed to platforms like Heroku, Vercel, or DigitalOcean. Make sure to set up the environment variables appropriately for your production environment.
iiitn-resell/
├── client/ # React frontend
│ ├── public/ # Static files
│ └── src/ # Source code
│ ├── api/ # API service
│ ├── components/ # React components
│ ├── context/ # Context providers
│ ├── pages/ # Page components
│ └── config/ # Configuration
├── server/ # Node.js backend
│ ├── middleware/ # Express middleware
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ └── server.js # Server entry point
└── package.json # Root package.json
- Admin Dashboard - For content moderation and user management
- Advanced Search - Full-text search capabilities
- Recommendation System - Personalized product recommendations
- Wishlist Feature - Save favorite products
- In-app Notifications - Broader notification system
- Report System - Allow users to report inappropriate listings
- Mobile App - Native mobile application
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License.
- IIIT Nagpur for supporting campus entrepreneurship
- Open source community for the amazing tools and libraries
