Skip to content

Latest commit

ย 

History

158 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GUSee - Georgetown University Event Management Platform

GUSee Logo

A comprehensive event management and registration platform for universities

React Node.js MongoDB Stripe


๐Ÿ“‹ Table of Contents


๐ŸŽฏ Overview

GUSee is a full-stack event management platform designed specifically for university environments. It provides a centralized system for managing various types of events, registrations, payments, vendor applications, and facility bookings. The platform serves multiple user roles including students, staff, professors, teaching assistants, vendors, event office staff, and administrators.

What the Website Does

GUSee enables universities to:

  • Manage Events: Create, organize, and manage various event types (workshops, trips, conferences, bazaars, gym sessions)
  • Handle Registrations: Streamline event registration with automated approval workflows
  • Process Payments: Integrated payment system with wallet functionality and Stripe integration
  • Vendor Management: Allow vendors to apply for bazaars and booths, manage applications
  • Facility Booking: Book gym sessions and sports courts
  • Reporting & Analytics: Generate reports on attendees, sales, and event statistics
  • Notifications: Real-time notifications and email reminders for events
  • User Management: Role-based access control with approval workflows

๐Ÿ’ก Motivation

Universities run hundreds of events every semester, but most still rely on manual workflows such as Google Forms, Excel sheets, emails, and physical payment receipts. This causes:

  • Miscommunication between students, professors, staff, and the event office
  • Slow and unorganized registration processes
  • Difficult tracking of approvals
  • Complicated vendor management for bazaars
  • No central platform for payment, registration, and event updates
  • No automated reminders or notifications
  • No reporting tools for the university

GUSee was built to solve these problems by providing a modern, unified platform for all event-related processes across the university. The goal is to offer:

  • Faster registration
  • Accurate, automated approval flows
  • Secure payments
  • A central dashboard for every user role
  • Better communication
  • Reliable reporting and analytics

GUSee improves the entire event experience by modernizing how a university handles events, vendors, payments, and student engagement.


๐Ÿšง Build Status

GUSee is currently in active development. Below are known issues, limitations, and incomplete features:

โš ๏ธ Known Issues

  • Some dashboards still need UI polishing
  • Some pages are not fully responsive on small mobile screens
  • No caching layer yet for improving backend performance
  • The rating system is implemented but not yet connected to the analytics page
  • Some email templates need design improvements
  • QR attendance scanning workflow is partially implemented
  • Vendor booth map UI still under construction
  • Logging system (Winston/Morgan) partially configured
  • Some error messages still need standardization
  • Some routes lack robust validation

๐Ÿšง Incomplete Features (planned for next sprint)

  • Admin analytics dashboard
  • Social sharing for events
  • Event recommendations engine
  • Multi-language support
  • Push notifications
  • Real-time updates using WebSockets
  • FAQ and help center pages

๐ŸŸข Current Build Status

  • Backend: Stable (All main functionality working)
  • Frontend: Stable with minor UI improvements needed
  • Payments: Fully functional (Wallet + Stripe)
  • Email system: Functional (SendGrid/Resend/Nodemailer)

โœจ Features

๐ŸŽช Event Management

  • Multiple Event Types: Support for Workshops, Trips, Conferences, Bazaars, and Gym Sessions
  • Event Creation: Event Office can create and manage events with detailed information
  • Workshop Approval Workflow: Professors create workshops that require Event Office approval
  • Event Status Tracking: Track events through lifecycle (upcoming, ongoing, completed, cancelled)
  • Event Archiving: Archive completed events for historical reference
  • Registration Deadlines: Set and enforce registration deadlines
  • Capacity Management: Set and track event capacity limits
  • Event Filtering & Search: Advanced filtering by type, status, date, location, and more

๐Ÿ“ Registration System

  • Multi-Event Registration: Register for workshops, trips, and gym sessions
  • Registration Approval: Professors can approve/reject registration requests for their workshops
  • Automatic Registration: Direct registration for events that don't require approval
  • Registration Status Tracking: Track registration status (registered, cancelled, attended, absent)
  • Duplicate Prevention: System prevents duplicate registrations
  • Registration Export: Export registration data to Excel/CSV
  • QR Code Generation: Generate QR codes for event check-ins

๐Ÿ’ณ Payment System

  • Integrated Wallet: Each user has a digital wallet for quick payments
  • Stripe Integration: Secure credit card payments via Stripe
  • Multiple Payment Methods: Pay via wallet balance or credit card
  • Payment Tracking: Track payment status (pending, paid, refunded)
  • Refund Management: Process refunds for cancelled registrations
  • Vendor Payments: Separate payment system for vendor booth/bazaar applications
  • Transaction History: Complete transaction history for all users
  • Sales Reports: Generate detailed sales and revenue reports

๐Ÿช Vendor Management

  • Vendor Registration: Vendors can create accounts and apply for events
  • Bazaar Applications: Vendors apply to participate in bazaars
  • Booth Applications: Vendors apply for specific booths at bazaars
  • Application Management: Event Office reviews and approves/rejects applications
  • Vendor Dashboard: Dedicated dashboard for vendors to manage applications
  • Vendor Payments: Vendors pay fees for booth/bazaar participation
  • Vendor Wallet: Separate wallet system for vendors

๐Ÿ‹๏ธ Facility Booking

  • Gym Sessions: Create and book gym sessions with time slots
  • Court Booking: Book sports courts (basketball, tennis, etc.)
  • Schedule Management: View gym schedules and availability
  • Booking Management: Track and manage facility bookings

๐Ÿ“Š Reporting & Analytics

  • Attendees Report: Detailed reports on event attendees
  • Sales Report: Revenue and payment analytics
  • Registration Statistics: Track registration trends
  • Export Functionality: Export reports to Excel/CSV format
  • Event Analytics: View event performance metrics

๐Ÿ”” Notifications & Communication

  • Email Notifications: Automated email notifications for events, approvals, and updates
  • Event Reminders: Automated reminders for upcoming events (runs every 15 minutes)
  • In-App Notifications: Real-time notifications within the platform
  • Email Verification: Email verification system for new users

โญ Rating & Reviews

  • Event Ratings: Users can rate events after attending
  • Star Rating System: 5-star rating system with comments
  • Rating Display: Average ratings displayed on event cards
  • Rating Management: Admins can manage and moderate ratings

๐ŸŽ Loyalty Program

  • Loyalty Partners: Manage loyalty program partners
  • Loyalty Points: Track and manage loyalty points (if implemented)
  • Partner Management: Add and manage loyalty program partners

๐Ÿ“ฑ User Experience

  • Role-Based Dashboards: Customized dashboards for each user role
  • Responsive Design: Mobile-friendly interface
  • Favorites System: Save favorite events for quick access
  • Advanced Search: Search events by name, type, location, date
  • Filtering Options: Multiple filtering options for events
  • Modern UI: Clean, modern interface with intuitive navigation

๐Ÿ›  Technology Stack

Frontend

  • React 19.2.0: Modern UI library
  • React Router DOM 7.9.3: Client-side routing
  • Vite 7.1.7: Fast build tool and dev server
  • Axios 1.12.2: HTTP client for API calls
  • React Big Calendar 1.19.4: Calendar component for scheduling
  • Stripe React 5.4.0: Stripe payment integration
  • Moment.js 2.30.1: Date manipulation library
  • React Icons 5.5.0: Icon library

Backend

  • Node.js: JavaScript runtime
  • Express 5.1.0: Web application framework
  • MongoDB 8.18.3: NoSQL database
  • Mongoose 8.18.3: MongoDB object modeling
  • JWT (jsonwebtoken 9.0.2): Authentication tokens
  • Bcryptjs 3.0.2: Password hashing
  • Stripe 19.3.1: Payment processing
  • QRCode 1.5.3: QR code generation
  • Node-Cron 4.2.1: Scheduled tasks
  • Nodemailer 7.0.9: Email sending
  • SendGrid 8.1.6: Email service
  • Resend 6.1.2: Email API
  • XLSX 0.18.5: Excel file generation
  • Cookie Parser 1.4.7: Cookie parsing
  • CORS 2.8.5: Cross-origin resource sharing

Development Tools

  • Nodemon: Auto-restart server during development
  • Concurrently: Run multiple npm scripts simultaneously
  • ESLint: Code linting
  • Dotenv: Environment variable management

๐Ÿ— Architecture

System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        Frontend (React)                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Students โ”‚  โ”‚  Staff   โ”‚  โ”‚Professorsโ”‚  โ”‚  Vendors โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                  โ”‚
โ”‚  โ”‚   TAs    โ”‚  โ”‚   Admin  โ”‚  โ”‚Event Off.โ”‚                  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ”‚ HTTP/REST API
                            โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Backend (Express.js)                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚   Routes     โ”‚  โ”‚ Controllers  โ”‚  โ”‚  Middleware  โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚   Models     โ”‚  โ”‚   Services   โ”‚  โ”‚    Jobs      โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ”‚ Mongoose ODM
                            โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Database (MongoDB)                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Users   โ”‚  โ”‚  Events  โ”‚  โ”‚ Payments โ”‚  โ”‚ Vendors  โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚Registr.  โ”‚  โ”‚Workshops โ”‚  โ”‚  Bazaars โ”‚  โ”‚  Courts  โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Request Flow

  1. User Action: User interacts with React frontend
  2. API Call: Frontend makes HTTP request to Express backend
  3. Authentication: Middleware verifies user session/token
  4. Authorization: Middleware checks user role and permissions
  5. Controller: Controller processes the request
  6. Database: Mongoose queries MongoDB
  7. Response: JSON response sent back to frontend
  8. UI Update: React updates the UI based on response

๐Ÿ‘ฅ User Roles & Permissions

1. Student ๐Ÿ‘จโ€๐ŸŽ“

  • View all events
  • Register for workshops, trips, and gym sessions
  • Book sports courts
  • Make payments for registrations
  • View personal registrations and bookings
  • Rate events after attending
  • Add events to favorites
  • View wallet balance and transaction history
  • Top up wallet

2. Staff ๐Ÿ‘”

  • All student permissions
  • Additional access to staff-specific events
  • View staff-specific content

3. Teaching Assistant (TA) ๐Ÿ“š

  • All student permissions
  • Additional access to TA-specific events
  • View TA-specific content

4. Professor ๐Ÿ‘จโ€๐Ÿซ

  • All student permissions
  • Create workshops (requires Event Office approval)
  • Approve/reject registration requests for their workshops
  • View workshop participants
  • Manage their created workshops
  • View workshop statistics

5. Event Office ๐ŸŽช

  • Create and manage all event types (bazaars, trips, conferences, gym sessions)
  • Approve/reject workshop proposals from professors
  • Review and manage vendor applications
  • Export registration data
  • Generate reports (attendees, sales)
  • Manage event archives
  • View all events and registrations
  • Manage gym schedules

6. Vendor ๐Ÿช

  • Create vendor account
  • Apply for bazaar participation
  • Apply for booth spaces
  • View application status
  • Make payments for applications
  • View participation history
  • Manage vendor profile
  • View vendor wallet

7. Admin ๐Ÿ‘‘

  • All Event Office permissions
  • Manage all users (approve, block, activate)
  • Create admin accounts
  • Full system access
  • Manage comments and ratings
  • System-wide configuration

๐ŸŽญ Event Types

1. Workshop ๐ŸŽ“

  • Created by Professors (requires Event Office approval)
  • Requires approval workflow
  • Can have registration approval by professor
  • Includes: name, location, dates, description, full agenda, faculty responsible, participating professors, price, required budget, funding source, capacity, registration deadline
  • Status: pending โ†’ edit_requested โ†’ approved/rejected โ†’ upcoming โ†’ ongoing โ†’ completed

2. Trip โœˆ๏ธ

  • Created by Event Office
  • Direct registration (no approval needed)
  • Includes: name, destination, dates, description, price, capacity, registration deadline
  • Users can register directly

3. Conference ๐ŸŽค

  • Created by Event Office
  • Includes: name, location, dates, description, registration deadline
  • Can have multiple sessions/tracks

4. Bazaar ๐Ÿช

  • Created by Event Office
  • Multi-day event
  • Vendors can apply to participate
  • Includes: name, location, start/end dates, description, registration deadline
  • Vendor booth management

5. Gym Session ๐Ÿ’ช

  • Created by Event Office
  • Time-slot based booking
  • Includes: name, date, start time, end time, capacity, location
  • Users can book available slots
  • Calendar view for schedule

6. Court Booking ๐Ÿ€

  • Sports facility booking
  • Book courts (basketball, tennis, etc.)
  • Time-slot based
  • View availability and book slots

๐Ÿš€ Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB (local or cloud instance like MongoDB Atlas)
  • npm or yarn
  • Stripe Account (for payment processing)
  • Email Service (SendGrid, Resend, or Nodemailer SMTP)

Step 1: Clone the Repository

git clone <repository-url>
cd GUSee

Step 2: Install Dependencies

Install root dependencies:

npm install

Install backend dependencies:

cd backend
npm install

Install frontend dependencies:

cd ../frontend
npm install

Step 3: Environment Configuration

Create a .env file in the backend directory:

# Server Configuration
PORT=4000
NODE_ENV=development

# Database
MONGO_URI=mongodb://localhost:27017/Task1ACL
# OR for MongoDB Atlas:
# MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/Task1ACL

# JWT Secret
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production

# Session Secret
SESSION_SECRET=your-session-secret-key

# Email Configuration (Choose one)
# Option 1: SendGrid
SENDGRID_API_KEY=your-sendgrid-api-key
SENDGRID_FROM_EMAIL=noreply@yourdomain.com

# Option 2: Resend
RESEND_API_KEY=your-resend-api-key
RESEND_FROM_EMAIL=noreply@yourdomain.com

# Option 3: Nodemailer SMTP
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password

# Stripe Configuration
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key

# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:5173

Create a .env file in the frontend directory (if needed):

VITE_API_URL=http://localhost:4000/api
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key

Step 4: Database Setup

  1. Local MongoDB: Ensure MongoDB is running locally
  2. MongoDB Atlas: Update MONGO_URI in .env with your Atlas connection string
  3. The database will be created automatically on first connection

Step 5: Run the Application

Development Mode (Both Frontend and Backend)

From the root directory:

npm run dev

This will start:

  • Backend server on http://localhost:4000
  • Frontend dev server on http://localhost:5173

Run Separately

Backend only:

cd backend
npm run dev

Frontend only:

cd frontend
npm run dev

Step 6: Access the Application

  • Frontend: Open http://localhost:5173 in your browser
  • Backend API: http://localhost:4000/api

Step 7: Create First Admin Account

You can create an admin account through the registration page or use the test population script:

cd backend
node test_populate.js

๐Ÿ”„ How It Works

Authentication Flow

  1. User Registration:

    • User fills registration form with email, password, name, and role
    • System creates account with pending status
    • Email verification link sent to user
    • User clicks link to verify email
    • Admin/Event Office approves account (for certain roles)
    • Account becomes active
  2. User Login:

    • User enters email and password
    • System validates credentials
    • JWT token and session ID generated
    • Token stored in localStorage (frontend)
    • Session ID stored in database and sent as cookie
    • User redirected to role-specific dashboard
  3. Session Management:

    • Each request includes session ID in headers
    • Backend validates session
    • Session expires after inactivity or logout

Event Creation Flow

Workshop Creation (by Professor)

  1. Professor creates workshop proposal
  2. Workshop saved with pending status
  3. Event Office reviews proposal
  4. Event Office can:
    • Approve: Workshop becomes approved โ†’ upcoming
    • Reject: Workshop marked rejected with reason
    • Request Edit: Workshop marked edit_requested with feedback
  5. If approved, workshop appears in event listings
  6. Users can register (may require professor approval)

Other Events (by Event Office)

  1. Event Office creates event (bazaar, trip, conference, gym session)
  2. Event saved with upcoming status
  3. Event immediately appears in listings
  4. Users can register (if registration is open)

Registration Flow

  1. User Browses Events: User views available events
  2. Selects Event: User clicks on event to view details
  3. Registration:
    • For Workshops: May require professor approval
      • User submits registration request
      • Professor reviews and approves/rejects
      • If approved, registration confirmed
    • For Other Events: Direct registration
      • User fills registration form
      • System checks capacity
      • Registration created immediately
  4. Payment (if required):
    • User chooses payment method (wallet or Stripe)
    • If wallet: Balance checked and deducted
    • If Stripe: Payment intent created and processed
    • Payment recorded in database
  5. Confirmation: User receives confirmation email and notification

Vendor Application Flow

  1. Vendor Registration: Vendor creates account
  2. Browse Bazaars: Vendor views upcoming bazaars
  3. Apply to Bazaar: Vendor submits application
  4. Event Office Review: Event Office reviews application
  5. Booth Selection (if approved): Vendor selects available booth
  6. Payment: Vendor pays booth/bazaar fees
  7. Confirmation: Vendor receives confirmation

Payment Flow

  1. Payment Initiation: User initiates payment for registration/application
  2. Payment Method Selection:
    • Wallet Payment:
      • System checks wallet balance
      • If sufficient: Deduct amount, create payment record
      • If insufficient: Prompt for top-up
    • Stripe Payment:
      • Create Stripe payment intent
      • User enters card details
      • Stripe processes payment
      • Webhook confirms payment
  3. Payment Recording: Payment saved with status completed
  4. Registration Confirmation: Registration status updated to paid
  5. Receipt: User receives payment receipt via email

Notification System

  1. Event Reminders: Cron job runs every 15 minutes
    • Checks for events starting within 24 hours
    • Sends reminder emails to registered users
  2. Registration Notifications:
    • Email sent on registration
    • Email sent on approval/rejection
  3. Payment Notifications:
    • Email sent on successful payment
    • Email sent on refund

๐Ÿ“ก API Documentation

Base URL

http://localhost:4000/api

Authentication Endpoints

Register

POST /api/auth/register
Body: {
  firstName: string,
  lastName: string,
  email: string,
  password: string,
  role: 'student' | 'staff' | 'ta' | 'professor' | 'event_office'
}

Login

POST /api/auth/login
Body: {
  email: string,
  password: string
}

Logout

POST /api/auth/logout
Headers: { session-id: string }

Verify Email

GET /api/verify/email/:token

Event Endpoints

Get All Events

GET /api/events
Query params: type, status, location, startDate, endDate

Create Bazaar

POST /api/events
Headers: { Authorization: Bearer token, session-id: string }
Body: {
  name: string,
  startDate: Date,
  endDate: Date,
  location: string,
  description: string,
  registrationDeadline: Date
}

Create Workshop (Professor)

POST /api/workshops
Headers: { Authorization: Bearer token, session-id: string }
Body: {
  name: string,
  location: 'GUC Cairo' | 'GUC Berlin',
  startDate: Date,
  endDate: Date,
  description: string,
  fullAgenda: string,
  facultyResponsible: string,
  participatingProfessors: string[],
  price: number,
  requiredBudget: number,
  fundingSource: 'external' | 'GUC',
  capacity: number,
  registrationDeadline: Date
}

Registration Endpoints

Register for Event

POST /api/registrations
Headers: { Authorization: Bearer token, session-id: string }
Body: {
  eventType: 'workshop' | 'trip' | 'gymSession',
  eventId: string,
  registrantName: string,
  registrantEmail: string,
  registrantId: string,
  registrantRole: string
}

Get My Registrations

GET /api/registrations/my
Headers: { Authorization: Bearer token, session-id: string }

Payment Endpoints

Create Payment Intent

POST /api/payments/create-intent
Headers: { Authorization: Bearer token, session-id: string }
Body: {
  amount: number,
  currency: 'USD',
  registrationId: string
}

Process Wallet Payment

POST /api/payments/wallet
Headers: { Authorization: Bearer token, session-id: string }
Body: {
  registrationId: string,
  amount: number
}

Top Up Wallet

POST /api/payments/wallet/topup
Headers: { Authorization: Bearer token, session-id: string }
Body: {
  amount: number,
  paymentMethod: 'stripe'
}

Vendor Endpoints

Apply to Bazaar

POST /api/applications/bazaar
Headers: { Authorization: Bearer token, session-id: string }
Body: {
  bazaarId: string,
  companyName: string,
  description: string
}

Get My Applications

GET /api/applications/my
Headers: { Authorization: Bearer token, session-id: string }

Export Endpoints

Export Registrations

GET /api/export/registrations
Headers: { Authorization: Bearer token, session-id: string }
Query params: eventType, eventId, format (xlsx/csv)

๐Ÿ—„ Database Schema

User Model

{
  firstName: String,
  lastName: String,
  email: String (unique),
  password: String (hashed),
  role: 'student' | 'staff' | 'ta' | 'professor' | 'admin' | 'event_office',
  status: 'pending' | 'active' | 'blocked',
  isEmailVerified: Boolean,
  approvedBy: ObjectId (ref: User),
  approvedAt: Date,
  sessionId: String,
  favorites: [{
    eventId: String,
    eventType: String,
    addedAt: Date
  }],
  wallet: {
    balance: Number,
    currency: String,
    lastUpdated: Date
  },
  createdAt: Date,
  updatedAt: Date
}

Event Registration Model

{
  eventType: 'workshop' | 'trip' | 'gymSession',
  eventId: ObjectId,
  eventTypeModel: 'Workshop' | 'Trip' | 'GymSession',
  registrantName: String,
  registrantEmail: String,
  registrantId: String,
  registrantRole: 'student' | 'staff' | 'ta' | 'professor',
  registeredBy: ObjectId (ref: User),
  status: 'registered' | 'cancelled' | 'attended' | 'absent',
  paymentStatus: 'pending' | 'paid' | 'refunded' | 'not_required',
  paymentId: ObjectId (ref: Payment),
  registeredAt: Date,
  updatedAt: Date
}

Payment Model

{
  userId: ObjectId,
  userTypeModel: 'User' | 'Vendor',
  registrationId: ObjectId (ref: EventRegistration),
  eventType: 'workshop' | 'trip' | 'bazaar' | 'booth',
  eventId: ObjectId,
  amount: Number,
  currency: String,
  paymentMethod: 'stripe' | 'wallet',
  status: 'pending' | 'completed' | 'failed' | 'refunded',
  stripePaymentIntentId: String,
  transactionId: String (unique),
  paidAt: Date,
  refundedAt: Date,
  createdAt: Date,
  updatedAt: Date
}

Workshop Model

{
  name: String,
  location: 'GUC Cairo' | 'GUC Berlin',
  startDate: Date,
  endDate: Date,
  description: String,
  fullAgenda: String,
  facultyResponsible: String,
  participatingProfessors: [String],
  price: Number,
  requiredBudget: Number,
  fundingSource: 'external' | 'GUC',
  capacity: Number,
  registrationDeadline: Date,
  createdBy: ObjectId (ref: User),
  status: 'pending' | 'edit_requested' | 'approved' | 'rejected' | 'upcoming' | 'ongoing' | 'completed' | 'cancelled',
  approvedBy: ObjectId (ref: User),
  registeredCount: Number,
  createdAt: Date,
  updatedAt: Date
}

Vendor Model

{
  email: String (unique),
  password: String (hashed),
  companyName: String,
  taxCard: String,
  logo: String,
  status: 'pending' | 'active' | 'blocked',
  wallet: {
    balance: Number,
    currency: String,
    lastUpdated: Date
  },
  sessionId: String,
  createdAt: Date,
  updatedAt: Date
}

๐Ÿ’ณ Payment System

Wallet System

Each user (and vendor) has a digital wallet:

  • Balance: Stored in user profile
  • Top-Up: Users can add funds via Stripe
  • Usage: Quick payments for registrations
  • Transaction History: All wallet transactions recorded

Stripe Integration

  1. Payment Intent Creation:

    • Backend creates Stripe payment intent
    • Returns client secret to frontend
  2. Payment Processing:

    • Frontend uses Stripe Elements for card input
    • Payment processed securely via Stripe
  3. Webhook Handling:

    • Stripe sends webhook on payment completion
    • Backend updates payment status

Payment Flow

User Initiates Payment
    โ†“
Check if Wallet Payment or Stripe
    โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Wallet Payment โ”‚  Stripe Payment  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ†“                    โ†“
Check Balance    Create Payment Intent
    โ†“                    โ†“
Deduct Amount    Process Card Payment
    โ†“                    โ†“
Create Payment Record
    โ†“
Update Registration Status
    โ†“
Send Confirmation Email

๐Ÿ”’ Security Features

Authentication & Authorization

  • JWT Tokens: Secure token-based authentication
  • Session Management: Server-side session tracking
  • Password Hashing: Bcrypt with salt rounds
  • Role-Based Access Control (RBAC): Middleware enforces permissions
  • Email Verification: Required for account activation

Data Protection

  • Input Validation: All inputs validated and sanitized
  • SQL Injection Prevention: Mongoose prevents injection attacks
  • XSS Protection: React automatically escapes content
  • CORS Configuration: Restricted to allowed origins
  • Rate Limiting: Can be added for API endpoints

Payment Security

  • Stripe PCI Compliance: Card data never touches server
  • Secure Transactions: All payments encrypted
  • Transaction IDs: Unique IDs for all transactions
  • Refund Tracking: Complete refund audit trail

Code Style & Conventions

To maintain consistency and readability across the project, the following coding guidelines are used:

๐Ÿ“Œ Naming Conventions

Variables & Functions: camelCase

React Components: PascalCase

Files & Folders: kebab-case or lowercase

Mongoose Models: PascalCase

Constants: UPPER_CASE

๐Ÿ“Œ Folder Structure Conventions

controllers/ โ†’ business logic

routes/ โ†’ route definitions only

models/ โ†’ database schemas

middleware/ โ†’ authentication, authorization, validations

utils/ โ†’ reusable helper functions

๐Ÿ“Œ Code Formatting

ESLint configured using standard JS/React rules

2-space indentation

Arrow functions preferred

Avoid long functions (>60 lines)

Use try/catch for async controllers

Keep controllers thin & services thick

๐Ÿ“Œ Commenting Style

Document complex logic with // comments

JSDoc-style comments for important functions

Avoid unnecessary comments (โ€œself-explanatoryโ€ code)

๐Ÿ“ Project Structure

GUSee/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app.js                 # Express app configuration
โ”‚   โ”œโ”€โ”€ index.js               # Server entry point
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ server/
โ”‚   โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ db.js          # MongoDB connection
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/       # Request handlers
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ authController.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ eventController.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ paymentController.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/        # Auth & validation middleware
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ requireAuth.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ requireAdmin.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ”œโ”€โ”€ models/            # Mongoose models
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ User.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ EventRegistration.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Payment.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ”œโ”€โ”€ routes/            # API routes
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ authRoutes.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ eventRoutes.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ”œโ”€โ”€ utils/             # Utility functions
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ emailService.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ feeCalculator.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ notificationHelper.js
โ”‚   โ”‚   โ””โ”€โ”€ jobs/              # Scheduled jobs
โ”‚   โ”‚       โ””โ”€โ”€ eventReminderJob.js
โ”‚   โ””โ”€โ”€ test_populate.js       # Test data script
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ vite.config.js
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ App.jsx            # Main app component
โ”‚       โ”œโ”€โ”€ main.jsx           # Entry point
โ”‚       โ”œโ”€โ”€ assets/            # Images, icons, logos
โ”‚       โ”œโ”€โ”€ components/        # Reusable components
โ”‚       โ”‚   โ”œโ”€โ”€ layout/        # Layout components
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ DashboardLayout.jsx
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ Sidebar.jsx
โ”‚       โ”‚   โ””โ”€โ”€ ui/            # UI components
โ”‚       โ”‚       โ”œโ”€โ”€ Button.jsx
โ”‚       โ”‚       โ”œโ”€โ”€ Card.jsx
โ”‚       โ”‚       โ”œโ”€โ”€ Modal.jsx
โ”‚       โ”‚       โ””โ”€โ”€ ...
โ”‚       โ”œโ”€โ”€ pages/             # Page components
โ”‚       โ”‚   โ”œโ”€โ”€ AuthPage.jsx
โ”‚       โ”‚   โ”œโ”€โ”€ StudentDashboard.jsx
โ”‚       โ”‚   โ”œโ”€โ”€ AdminDashboard.jsx
โ”‚       โ”‚   โ””โ”€โ”€ ...
โ”‚       โ”œโ”€โ”€ services/          # API services
โ”‚       โ”‚   โ””โ”€โ”€ api.js
โ”‚       โ”œโ”€โ”€ utils/             # Utility functions
โ”‚       โ”‚   โ””โ”€โ”€ icons.jsx
โ”‚       โ””โ”€โ”€ styles/            # Global styles
โ”‚
โ”œโ”€โ”€ package.json               # Root package.json
โ””โ”€โ”€ README.md                  # This file

๐Ÿ’ป Development

Running in Development Mode

# Start both frontend and backend
npm run dev

# Or run separately:
npm run dev:backend  # Backend only
npm run dev:frontend # Frontend only

Code Structure Guidelines

  • Controllers: Handle business logic and request/response
  • Models: Define data structure and validation
  • Routes: Define API endpoints
  • Middleware: Handle authentication, authorization, validation
  • Services: External service integrations (email, payments)

Adding New Features

  1. Backend:

    • Create/update model in server/models/
    • Create controller in server/controllers/
    • Create routes in server/routes/
    • Add route to app.js
    • Add middleware if needed
  2. Frontend:

    • Create page component in src/pages/
    • Add route in dashboard component
    • Update API service if needed
    • Add to sidebar menu if needed

Testing

# Backend tests (if implemented)
cd backend
npm test

# Frontend tests (if implemented)
cd frontend
npm test

๐Ÿšข Deployment

Environment Variables

Ensure all environment variables are set in production:

  • NODE_ENV=production
  • MONGO_URI (production MongoDB connection)
  • JWT_SECRET (strong secret key)
  • STRIPE_SECRET_KEY (production Stripe key)
  • Email service credentials

Build for Production

# Build frontend
cd frontend
npm run build

# Start backend
cd ../backend
npm start

Deployment Options

  1. Heroku: Deploy both frontend and backend
  2. Vercel/Netlify: Frontend, separate backend server
  3. AWS/DigitalOcean: Full stack deployment
  4. Docker: Containerize application

Production Checklist

  • Set NODE_ENV=production
  • Use production MongoDB
  • Use production Stripe keys
  • Configure CORS for production domain
  • Set up email service
  • Enable HTTPS
  • Set up monitoring/logging
  • Configure backup strategy

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code Style

  • Follow existing code style
  • Use meaningful variable names
  • Add comments for complex logic
  • Keep functions focused and small
  • Write descriptive commit messages

๐Ÿ‘จโ€๐Ÿ’ป Authors

  • Development Team Omar ElGhazouly Rawan Shahin Nouran Rawan Osama Mohamed adel Omar gamal Injy mohamed Doha maged Nadine

๐Ÿ™ Acknowledgments

  • German University in Cairo (GUC)
  • All contributors and testers

๐Ÿ”ฎ Future Enhancements

  • Mobile app (React Native)
  • Real-time chat for events
  • Advanced analytics dashboard
  • Integration with university calendar
  • Multi-language support
  • Advanced search with filters
  • Event recommendations based on user preferences
  • Social features (event sharing, comments)
  • Integration with external event platforms
  • Advanced reporting and data visualization

Last Updated: 2024

Version: 1.0.0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages