CampusConnect1 – A MERN-based web platform designed to connect university students, events offices, staff including professors and TAs, admins, and vendors for better event management.
The main motivation behind CampusConnect is to digitize and simplify event management within the university campus.
Currently, many universities manage events, bazaars, and activities through manual or decentralized communication methods, which cause delays, miscommunication, and inefficiency.
CampusConnect was built to bridge this gap by providing an integrated system with so many facilities such as:
- Event organizers can easily create, edit, and manage events.
- Students can explore and register for events seamlessly.
- Professors can promote their activities efficiently.
The project is currently stable and fully functional, with minor issues being tracked:
- User authentication works correctly.
- Bazaars and event creation forms function as expected.
- Occasional slow API responses on first load.
- Stripe payment setup under testing phase.
- Some UI components still being optimized for mobile responsiveness.
- Email notifications require valid SMTP credentials (set in backend/.env). If not configured, notification attempts will log errors but main actions still succeed.
- Language: JavaScript (ES6+)
- Framework: MERN stack (MongoDB, Express.js, React.js, Node.js)
- Naming Conventions: camelCase for variables and functions, PascalCase for components, and UPPERCASE for constants.
- Linting: ESLint & Prettier used for formatting consistency.
- Backend follows an Express + ES module style (import/export). Controllers live in
backend/src/controllers, routes inbackend/src/routes, models inbackend/src/models.
- Frontend: React.js, Axios, React Router, Lucide Icons
- Backend: Node.js, Express.js, MongoDB (Mongoose)
- Authentication: JWT (JSON Web Tokens)
- Email Service: Gmail SMTP via Nodemailer
- Payment Integration: Stripe API
- Version Control: Git & GitHub
- Event & Bazaar creation by the Events Office
- User authentication (Login / Signup)
- Student dashboard for browsing events and bazaars
- Stripe-based payment integration for stall registration
- CRUD operations for events and bazaars
- Email notifications and confirmations
- Responsive and user-friendly interface
- Protect middleware usage (route example)
import { protect, authorize } from './middleware/authMiddleWare.js';
router.post('/api/gym', protect, authorize('EventsOffice'), createGymSession);- Upload tax card & logo (frontend snippet using fetch)
const form = new FormData();
form.append('taxCard', taxCardFile);
form.append('logo', logoFile);
await fetch(`/api/vendors/${vendorId}/upload-docs`, {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body: form,
});- Register for a gym session (axios)
await axios.post(`/api/gym/${sessionId}/register`, {}, {
headers: { Authorization: `Bearer ${token}` }
});- Vote on a poll (fetch)
await fetch(`/api/polls/${pollId}/vote`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
body: JSON.stringify({ vendorId: chosenVendorId })
});- Download vendor asset (PowerShell example)
#$token is the user's JWT
Invoke-WebRequest -Uri "http://localhost:5000/api/vendors/<vendorId>/assets/taxCard/download" -Headers @{ Authorization = "Bearer $token" } -OutFile 'C:\tmp\taxCard.pdf'- Install dependencies (backend & frontend)
cd backend
npm install
cd ../frontend
npm install- Environment variables (create
backend/.env)
Required examples:
MONGO_URI=mongodb://localhost:27017/campusconnect
PORT=5000
JWT_SECRET=your_jwt_secret
EMAIL_SERVICE=gmail
EMAIL_USER=your_email
EMAIL_PASS=your_app_password
STRIPE_SECRET_KEY=your_stripe_key
- Start development servers
# from repo root
cd backend; npm run dev # runs nodemon/express
cd ../frontend; npm start # runs react dev serverHere are core backend endpoints (all under /api):
- Authentication
- POST /api/auth/register Registers a new user (student, admin, or events office). Body Example:
{ "name": "John Doe", "email": "john@guc.edu.eg", "password": "123456", "role": "Student" }
- POST /api/auth/login Authenticates an existing user and returns a JWT token. Response Example:
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6..." }
-
Bazaar Management
-
POST /api/bazaars/create Creates a new bazaar by the Events Office. Protected: Requires Events Office role.
-
GET /api/bazaars/active Fetches all active bazaars displayed on the student dashboard.
-
DELETE /api/bazaars/:id Deletes a bazaar (admin or events office only).
-
Gym Sessions
-
POST /api/gym/:id/register Registers an authenticated user for a gym session. Protected: Requires valid JWT.
-
PATCH /api/gym/:id Updates gym session details such as date, time, or capacity.
-
Email Notifications
-
POST /api/email/send Sends a confirmation or update email using the Nodemailer service. Body Example:
{ "to": "student@guc.edu.eg", "subject": "Event Registration Confirmed", "text": "Your registration for the Spring Bazaar has been confirmed!" }
Testing done using Postman.
- No Jest tests included yet; add unit tests under
backend/test/if needed.
Contributions are welcome! You can:
- Report bugs
- Suggest new features
- Submit pull requests
Please make sure your code follows our naming conventions and passes linting before submitting.
- Node.js, Express.js, React.js, MongoDB Documentation
- Tutorials from YouTube
- Lucide React Icons
- Stripe official documentation
Copyright 2025 CampusConnect1 Team
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.









