A community-first intranet marketplace platform for students to buy, sell, exchange, and pre-order items within IIT Bhilai.
|
|
This project provides a dedicated intranet marketplace for the IIT Bhilai community.
Frontend: React + Vite + Tailwind CSS Β |Β Backend: Node.js + Express + MongoDB Β |Β File Storage: Cloudinary Β |Β Containerization: Docker & Docker Compose
This project is fully containerized. Run the entire stack with a single command.
- Docker Desktop (version 20.10+) or Docker Engine + Compose V2
- At least 4GB RAM allocated to Docker
-
Clone the repository
git clone https://github.com/OpenLake/Campus-Marketplace.git cd Campus-Marketplace -
Create environment files (see Environment Variables)
cp backend/.env.example backend/.env cp frontend/.env.example frontend/.env
-
Start all services
docker compose up -d
-
Access the application
- Frontend: http://localhost:4173
- Backend API: http://localhost:5000/api
- Health Check: http://localhost:5000/api/healthcheck
| Service | Container Port | Host Port |
|---|---|---|
| Frontend | 4173 | 4173 |
| Backend | 5000 | 5000 |
| MongoDB | 27017 | (internal) |
Important: For local Docker development,
VITE_API_URLmust point to host port 5000 (http://localhost:5000/api), not the container service name. The browser cannot resolvebackend:5000.
Create a .env file inside backend/ and frontend/ respectively.
For local development without Docker, follow these manual steps.
- Navigate to the backend folder:
cd backend - Install dependencies:
npm install
- Create a
.envfile (see template above). - Start the development server:
The API will run at
npm run dev
http://localhost:5000.
- Open another terminal and navigate to the frontend folder:
cd frontend - Install dependencies:
npm install
- Create a
.envfile (see template above). - Start the Vite development server:
The frontend will run at
npm run dev
http://localhost:4173.
- Ensure Docker is running.
docker compose up -d- Open http://localhost:4173 in your browser.
- Register or log in using email/password or Google OAuth.
- Create a listing (sell an item), browse listings, and express interest.
Run backend and frontend separately as described in Getting Started.
| Action | How to do it |
|---|---|
| List an item | Click "Sell" β fill in details β upload images β publish. |
| Express interest | On a listing page, click "I'm interested" β seller receives a notification. |
| Manage listings | Go to Dashboard β My Listings β edit or mark as sold. |
# Find process using port 5000 (Linux/macOS)
sudo lsof -i :5000
# Kill it
kill -9 <PID>
# Or change the host port in docker-compose.yml- Wrong
VITE_API_URLβ Ensure it'shttp://localhost:5000/api(nothttp://localhost:4173). - CORS misconfiguration β Backend
CORS_ORIGINmust includehttp://localhost:4173. - Container network β If you changed ports, rebuild:
docker compose up --build
- Check that
users/googleroute exists in backend routes (/api/users/google). - Verify your frontend
api.jshasbaseURL: 'http://localhost:5000/api'.
- Ensure your Cloudinary credentials are correct and the environment variables are loaded.
- Restart the backend after changing
.env.
# View all logs
docker compose logs
# Follow backend logs only
docker compose logs -f backend
# Follow frontend logs
docker compose logs -f frontend
# Rebuild a single service
docker compose up -d --build backendWe welcome contributions from the community.
Please read CONTRIBUTING.md for guidelines before submitting a pull request.
- Fork the repository.
- Create a 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.
| Avatar | Name | GitHub |
|---|---|---|
![]() |
Harshit Kandpal | @Hark-github |
![]() |
Garvit Sharma | @garvit-sharma |
See MAINTAINERS.md for the full list.
Distributed under the MIT License.
See LICENSE for details.
MIT License
Copyright (c) 2025 OpenLake Society
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
Built with β€οΈ by Harshit Kandpal @ OpenLake


