Campus Marketplace
BUY! SELL! RIDE! COMPUTE!
CI status | GitHub release | Discord | MIT License
Campus Marketplace is a comprehensive, full-stack platform designed exclusively for college students. It connects you with your peers within a verified university ecosystem to securely buy, sell, request items, organize carpools, and even share idle GPU resources for distributed machine learning. The Azure-backed infrastructure handles the heavy lifting — the product is the seamless campus connection.
If you want a safe, student-focused marketplace that feels local, fast, and always-on, this is it.
Website · Docs · Vision · Getting Started · Infrastructure · FAQ
To get started with local development, ensure you have Go ≥1.23 and Node ≥20 installed. The project is split into distinct backend and frontend application layers, with infrastructure managed via Terraform.
New install? Start here: Getting started
Cloud & Databases (Azure):
- Azure Container Apps: Serverless container hosting for the API.
- Azure Database for PostgreSQL Flexible Server: Primary relational database.
- Azure Blob Storage: Cloud storage for product images and assets.
Core Services:
- Google OAuth (Authentication)
- Groq API (AI features)
Note: For the best experience and to deploy your own instance, ensure you have an active Azure subscription with the required resource providers registered.
Runtime: Go ≥1.23.
git clone https://github.com/alphastar-avi/marketplace.git
cd marketplace/backend
# Set up your environment variables
cp .env.example .env
# Run the Go server (automatically runs standard DB migrations)
go run main.goThe backend API will start on http://localhost:8080.
Runtime: Node ≥20.
cd marketplace/frontend
npm install
# or: pnpm install / bun install
npm run devThe frontend application will start on http://localhost:5173.
main: The active development branch. All new features, bug fixes, and continuous integration target this branch.prod: The production branch. This branch is directly linked to Terraform and Azure deployments.- Switch channels:
git checkout main|prod. Details: Development branches
Campus Marketplace connects real students. Treat inbound requests seriously.
- Authentication: JWT-based authentication ensures only verified students can interact.
- Authorization: Students can only view and interact with products and users within their specific
.educollege ecosystem. - Smart Filtering: Distinct separation between "My Listings" and the global marketplace to prevent self-purchasing confusion or malicious manipulation.
- University-Gated Access — secure JWT authentication enforcing college-specific interactions.
- Real-time Chat — integrated WebSocket/polling messaging system for buyers and sellers.
- Carpooling — a dedicated module for students to offer or request rides to and from campus.
- Purchase Requests — formalized, trackable workflow for buyers to request items.
- ComputeShare (Federated Learning) — a distributed PyTorch module allowing users to share idle Mac GPU resources (MPS) to exponentially accelerate machine learning tasks.
- Live 3D Canvas — interactive 3D elements powered by React Three Fiber.
- Database schemas (GORM) for Users, Colleges, Products, Chats, Messages, PurchaseRequests, and Favorites.
- RESTful API endpoints with strict ownership and payload validation.
- Authentication middleware handling token verification and college context injection.
- Marketplace feed with smart filtering.
- User profiles with dedicated "My Listings" management.
- Chat interfaces for direct negotiation.
- Carpool board for ride coordination.
- Terraform configurations (
/terraform) for declarative IaC. - Azure Container Apps environment provisioning.
- Azure PostgreSQL server and firewall rules initialization.
- Blob Storage containers for asset management.
- Parameter Server utilizing the Linear Scaling Rule.
- Distributed Workers capable of local gzip tensor compression.
- Stale Gradients Rejection logic to protect global weights.
Frontend (React/Vite)
│
▼
┌───────────────────────────────┐
│ Go Gin Backend │
│ (Azure App) │
│ https://api.domain.com │
└──────────────┬────────────────┘
│
├─ Azure PostgreSQL (Data)
├─ Azure Blob Storage (Assets)
└─ ComputeShare Nodes (MPS GPUs)
- Infrastructure as Code: Terraform scripts automatically manage the Azure environment.
- Containerization: Multi-stage
DockerfileandDockerfile.scratchbuilds minimize the backend image payload. - CD/CI: Pushes to the
prodbranch automatically trigger Azure deployments.
Use these when you’re past the onboarding flow and want the deeper reference.
- Start with the
/backend/modelsto understand the database ERD. - Read the
/terraform/main.tffor the infrastructure overview. - Use the
/frontend/src/api/services.tsto see all available frontend-to-backend hooks. - For AI training, read the
/computeShare/README.mdoperational runbook.
Campus Marketplace was built to connect students effortlessly. 🎓 by the community.