CampusKart is an exclusive, safe, and dynamic university-based student marketplace. Designed to solve the issue of expensive textbooks and dorm essentials, the app allows verified students to seamlessly buy, sell, and bid on second-hand campus items locally, bypassing the noise and risks of public marketplaces.
- Exclusive Access: JWT authentication paired with university-specific email check (
@vcet.edu.in). - Product Marketplace: View, search, and list products securely with fully integrated Cloud/ImageKit image hosting.
- Real-Time Notifications & Bidding: Buyers can place bids on active products, triggering notifications directly to seller dashboards.
- Integrated Chat System: Secure peer-to-peer messaging system linked to specific items, facilitating safe price negotiations.
- Seller Dashboard: Robust panel for students to manage their active listings, profile information, and track successfully sold items.
- Framework: React Native (managed by Expo)
- Navigation: React Navigation (Native Stack & Bottom Tabs)
- State/Requests: Axios, React Hooks, Async Storage
- Media: Expo Image Picker
- Runtime: Node.js
- Framework: Express.js
- Security: bcrypt (Password Hashing), jsonwebtoken (JWT)
- Storage: ImageKit SDK for Media
- Primary Database: Dual-support for PostgreSQL (
pg) and MySQL (mysql2) - Query Method: Native parameterised SQL queries
- Cross-Origin Resource Sharing (
cors) - Environment management (
dotenv)
- Home β The main discovery feed featuring newly listed electronics, books, and campus essentials.
- Login / Signup β Gatekeeping screens handling JWT authentication and university verification.
- Profile / Dashboard β A user hub to track metrics like active listings, items sold, and manage account details.
- Sell Item (Add Product) β Form screen accepting product details, base64 image encoding, and price metadata.
- Listings Screen β Allows sellers to manage their own products (mark as SOLD, delete, or edit).
- Product Detail β Comprehensive display of the product, including seller badge, description, and dynamic bidding UI.
- Chat / Messages β Dedicated inbox rendering ongoing secure negotiations and real-time message sending.
project-root
β£ backend
β β£ config
β β£ controllers
β β£ middleware
β β£ models
β β£ routes
β β£ utils
β β£ initDb.js
β β£ server.js
β β package.json
β£ src
β β£ components
β β£ screens
β β£ services
β β utils
β£ scripts
β£ assets
β£ App.js
β£ app.json
β£ package.json
β README.md
Step 1: Clone the repository
git clone https://github.com/yourusername/campuskart.git
cd campuskartStep 2: Install dependencies
# Install frontend dependencies
npm install
# Install backend dependencies
cd backend
npm installStep 3: Setup environment variables
For the backend, copy .env.example into a .env file within the backend/ directory:
cp .env.example .envFill out the variables as described in the Environment Variables section.
Step 4: Setup database
Assuming you are running a local MySQL or Postgres server, initialize the tables by strictly running:
node initDb.js(Optionally populate sample items utilizing node seedData.js)
Step 5: Run backend
npm run dev
# Server runs gracefully at http://localhost:5000 Step 6: Run frontend
Open a new terminal session in the project root path.
npm startUse the Expo Go app on iOS/Android or the 'w' key to open in a web browser.
Your backend/.env file requires the following structure:
# Server
PORT=5000
# Database Type: 'mysql' or 'postgres'
DB_TYPE=mysql
# Database Connection
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password_here
DB_NAME=campuskart
# JWT Auth
JWT_SECRET=your_super_secret_jwt_key
JWT_EXPIRES_IN=7dEnsure that your relational SQL server is active.
- Create a blank database called
campuskart:CREATE DATABASE campuskart;
- Verify that the
.envcredentials match the server. - Automatically execute structure schemas from the backend root:
node initDb.js
POST /api/auth/registerβ Register account and receive JWTPOST /api/auth/loginβ Login to existing account
GET /api/productsβ Get all available productsGET /api/products/:idβ Fetch product by IDPOST /api/productsβ Add a new student listingPUT /api/products/:idβ Edit listing definitionPATCH /api/products/:id/statusβ Update state (Available -> Sold)DELETE /api/products/:idβ Remove a product listing
GET /api/messages/chatsβ Retrieve active inbox threadsGET /api/messages/:chatIdβ Load chat message historyPOST /api/messagesβ Send message or initiate new chat threadPOST /api/bidsβ Submit a direct bid on an active itemGET /api/bids/:productIdβ Fetch total bids for a product
- Payment Gateway Integration: Implement secure Stripe/RazorPay escrows to facilitate direct cashless purchases instead of solely cash-on-meet.
- Real-Time Websockets: Transition chat from HTTP polling to a true real-time Socket.io bi-directional connection.
- Advanced Filtering/Search: Implement elastic search for complex queries across descriptions, price bounds, and condition states.
- Admin Panel: Separate dashboard for campus moderators to manage bad actors or reported products.
Contributions are warmly welcomed!
- Fork the repository.
- Create your Feature Branch (
git checkout -b feature/NewMarketplaceTool). - Commit your changes (
git commit -m 'Add NewMarketplaceTool'). - Push to the Branch (
git push origin feature/NewMarketplaceTool). - Open a logical Pull Request pointing to
main.
This project is licensed under the MIT License - see the LICENSE file for details.












