CampusConnect is a full-stack MERN (MongoDB, Express, React, Node.js) web application designed to streamline student communication, enhance event management, handle claims, and coordinate complaint resolutions within a campus.
The portal features role-based authorization (Student, Faculty, and Admin) and integrates highly interactive, Awwwards-inspired design aesthetics and 3D WebGL visualizations to deliver a premium user experience.
- 3D Particle Network (Hero Section): Built using vanilla Three.js in a responsive WebGL Canvas, a floating, rotating connection grid that reacts dynamically to mouse coordinate movement.
- 3D Card Hover Tilt: Interactive 3D tilt transformations (using custom
use3DTilthook) bound to cards on the landing page, following mouse moves with smooth perspective physics. - Cursor Glow Backdrop: A soft, custom radial backdrop layer sitewide that follows cursor coordinate changes smoothly.
- SVG Scroll Progress: A top-anchored indicator bar that fills from 0% to 100% as the viewport scrolls.
- Shimmer Skeletons: Replaced standard loading circles with modern shimmering wireframe components across discussion boards, event cards, and lost listings.
- Role-Based Auth (JWT): Dedicated views and control states for Students, Faculty, and Administrators.
- Discussion Forum: Upvoting entries, adding replies/comments, search keyword queries, and marking items as resolved.
- Campus Events Calendar: Live scheduling grids with custom date listings and an event creation modal.
- Lost & Found Tracker: Report missing belongings, claim items with alert popups, and toggle list states.
- Complaints Portal: Allows students to report issues anonymously (generating safe, random Tracking IDs to search and check status in real-time).
- Admin Moderator Dashboard: Counters aggregate DB totals in real-time. Admins can view/update user permissions, delete entries, and respond to complaints directly.
- Frontend: React 18, React Router v6, TailwindCSS, Three.js, React Icons
- Backend: Node.js, Express, Nodemon, Express Async Handler
- Database: MongoDB (Mongoose Schema Modelling)
- Auth: JSON Web Tokens (JWT) + Bcrypt Password Hashing
campus-connect/
βββ backend/ # Express API Server
β βββ config/ # DB connections & variables
β βββ controllers/ # Mongoose database query controllers
β βββ middleware/ # Protect routes, role validations, error handlers
β βββ models/ # MongoDB models (User, Forum, Event, LostFound, Complaint)
β βββ routes/ # API endpoints registration
β βββ server.js # Express startup file
βββ frontend/ # Vite + React Client
β βββ src/
β β βββ components/ # Reusable layouts & routing wrappers
β β βββ context/ # Auth Context State Providers
β β βββ hooks/ # use3DTilt hook
β β βββ pages/ # View pages (Forum, Events, LostFound, Dashboard, etc.)
β β βββ index.css # Global Tailwind classes & shimmer keyframe definitions
β β βββ main.jsx # Entry point
β βββ package.json # React configuration & dependencies (Vite, Three.js)
β βββ vite.config.js
βββ .env # API Port and Database URI configuration
βββ .gitignore # Protects modules and secrets from commits
βββ README.md
Ensure you have the following installed on your machine:
- Node.js (v16.0.0 or higher)
- MongoDB Community Server running locally (port
27017), or a MongoDB Atlas cloud database.
- Clone the repository:
git clone https://github.com/your-username/campusconnect.git cd campusconnect - Install all dependencies concurrently for both backend and frontend:
npm run install-all
Create a file named .env in the root directory and configure the variables:
NODE_ENV=development
PORT=5000
MONGO_URI=mongodb://localhost:27017/campusconnect
JWT_SECRET=your_jwt_secret_phrase(Note: If using MongoDB Atlas, replace MONGO_URI with your cluster URL).
Start both the API backend server and the frontend client concurrently with hot reloading:
npm run dev- Frontend client: http://localhost:5173
- Backend API server: http://localhost:5000
POST /api/users- Register a studentPOST /api/users/login- Authenticate & obtain JWTGET /api/users/profile- Fetch current user detailGET /api/users/stats- Fetch database statistics counts (Admin only)
GET /api/forum- Query posts with search keywords & paginationPOST /api/forum- Submit a new topic discussionPUT /api/forum/:id/upvote- Upvote a forum topicPOST /api/forum/:id/replies- Comment on a topic discussionPUT /api/forum/:id/resolve- Toggle resolve flag
GET /api/events- Get event listingsPOST /api/events- Submit a new event (Faculty / Admin only)DELETE /api/events/:id- Remove an event (Faculty / Admin only)
GET /api/lost-found- Fetch lost/found reportsPOST /api/lost-found- File a new lost/found report itemPUT /api/lost-found/:id/resolve- Toggle item as resolved/recovered
POST /api/complaints- File a complaint (supports anonymous submission)GET /api/complaints/track/:trackingId- Query a ticket status using Tracking IDPUT /api/complaints/:id- Update status or attach comments (Admin only)