Campus Event Hub is a definitive full-stack MERN application aimed at solving a universal university problem: decentralized event discovery. By providing an interconnected web platform, students can efficiently discover, query, and RSVP to campus events such as hackathons, workshops, and cultural fests. Organizers are equipped with a powerful role-based dashboard for creation, management, and real-time attendance tracking via QR Code ticketing functionalities. Built specifically for high-impact hackathon presentation, it features optimized MongoDB text-search parsing and atomic database validations to ensure seat integrity.
Live Demo: Deploy-URL-Here
- Role-Based Authentication: Secure JWT implementation distinguishing between "Student" and "Organizer" permissions.
- Event Discovery Engine: Fully paginated feed with live, debounced MongoDB text-index keyword search natively implemented.
- Robust RSVP System: One-click registration heavily enforced with backend concurrency checks protecting
availableSeats. - Dynamic QR Code Generation: Instant cryptographic verifiable QR codes rendered live upon RSVP confirmation for event-day scanning.
- Organizer Dashboard: Full CRUD (Create, Read, Update, Delete) capability dedicated solely to verified organizers.
- Modern User Interface: Highly responsive, glassmorphic layout structured with Tailwind CSS avoiding generic UI traps.
| Layer | Technology Used | Description |
|---|---|---|
| Frontend | React 18, Vite | UI Rendering and virtual DOM manipulation |
| Styling | Tailwind CSS | Utility-first CSS framework for rapid UI styling |
| Routing | React Router v6 | Client-side navigation mapping |
| Backend | Node.js, Express.js | API server layer handling stateless HTTP requests |
| Database | MongoDB Atlas | Cloud-hosted NoSQL Document Database |
| ODM / Tooling | Mongoose, Axios | Data modeling and Promise-based HTTP fetching |
| Auth | JWT, bcryptjs | Securing routes and hashing passwords |
eventhub/
├── backend/
│ ├── config/db.js # MongoDB Connect
│ ├── controllers/ # Business logic (event, auth, rsvp)
│ ├── models/ # Mongoose Schemas (User, Event, RSVP)
│ ├── routes/ # API endpoint definitions
│ └── server.js # Main express application
└── frontend/
├── src/
│ ├── components/ # Reusable UI (Navbar, Cards, Modals)
│ ├── context/ # AuthContext for Global State
│ ├── pages/ # View components (Home, Dashboard)
│ └── utils/ # Axios API config
├── tailwind.config.js # Design specific tokens
└── package.json
Ensure that you have the following software installed locally:
- Node.js (v16.14.0 or higher)
- npm (v8 or higher)
- A MongoDB Cluster (Local or Atlas)
- Git (for cloning and version control)
| Variable | Description | Example Value |
|---|---|---|
PORT |
API Server running port | 5000 |
MONGO_URI |
MongoDB Connection String | mongodb+srv://user:pass@cluster.mongodb.net/eventhub |
JWT_SECRET |
Secret key for signing tokens | supersecret_jwt_key_99 |
CLIENT_URL |
Frontend URL for CORS | http://localhost:5173 |
| Variable | Description | Example Value |
|---|---|---|
VITE_API_URL |
Backend API gateway | http://localhost:5000/api |
git clone https://github.com/yourusername/CampusEventHub.git
cd CampusEventHubcd backend
npm install
# Create .env file based on the environment variables table
npm run devcd ../frontend
npm install
# Create .env.local file based on the frontend environment table
npm run devThe frontend will start typically on http://localhost:5173 while the backend runs parallel on http://localhost:5000.
| Group | Method | Path | Description | Access |
|---|---|---|---|---|
| Auth | POST |
/api/auth/register |
Create account | Public |
| Auth | POST |
/api/auth/login |
Authenticate and retrieve token | Public |
| Events | GET |
/api/events |
List all events (paginated) | Public |
| Events | POST |
/api/events |
Create new event | Organizer |
| Events | GET |
/api/events/search |
Search events | Public |
| RSVP | POST |
/api/rsvp |
Register for an event | Student |
| RSVP | GET |
/api/rsvp/my-events |
Get all RSVPs for logged-in user | Student |
(To be populated post-deployment)

- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes using Conventional Commits (
git commit -m 'feat: Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request toward the
developbranch. Ensure code passes local linting.
This project is licensed under the MIT License. See the LICENSE file for details.