A comprehensive MERN stack application for managing university events, sports facilities, conferences, workshops, and vendor participation. The system provides a complete platform for students, staff, TAs, professors, vendors, and administrators to interact with campus activities.
- Event Management: Create, browse, register, and manage diverse campus events
- Payment Processing: Integrated Stripe payment system with automated receipts
- QR Code System: Automated QR code generation for event access
- Gym & Sports: Court reservations and gym session management
- Conference & Workshops: Academic event planning and registration
- Vendor Management: Bazaar applications, booth rentals, and vendor verification
- Wallet System: Digital wallet for transactions and refunds
- Loyalty Program: Rewards system for active participants
- Rating & Reviews: Event feedback and rating system
- Notifications: Real-time alerts and email notifications
- Admin Dashboard: Comprehensive management and analytics tools
- Multi-role Registration: Students, Staff, TAs, Professors, Admins, Events Office
- Vendor Registration: Business verification workflow with admin approval
- JWT Authentication: Secure token-based authentication
- Email Verification: Account activation via email
- Password Management: Forgot password, reset password functionality
- Account Status: Active, banned, pending verification states
- Profile Management: Role-specific profile fields and preferences
- Event Types:
- General Campus Events
- Bazaars & Markets
- Sports Events
- Conferences
- Workshops
- Trips & Excursions
- Event Features:
- Event creation with rich details
- Category and tag-based organization
- Capacity management
- Date and location tracking
- Image uploads (ImageKit integration)
- Registration system with waitlist
- Event ratings and reviews
- Favorites/bookmarking
- Event search and filtering
- Stripe Integration:
- Secure payment processing
- Test mode and live mode support
- Multiple payment methods
- Automated Receipts:
- Professional email receipts
- Unique receipt numbers
- Transaction tracking
- Digital Wallet:
- User balance management
- Transaction history
- Refund processing
- Payment for events and services
- Loyalty Program:
- Points accumulation
- Rewards system
- Special offers for active users
- Automatic Generation: Unique QR codes for event attendees
- Email Distribution: Personalized QR code emails with event details
- Security Features: SHA-256 hashed verification tokens
- Event Access: QR codes for entry verification
- Professional Templates: Beautiful HTML email designs
- Court Reservations:
- Basketball, Tennis, Volleyball courts
- Time slot booking system
- Conflict detection
- Automated reminders
- Gym Sessions:
- Session scheduling
- Capacity management
- Registration tracking
- Attendance monitoring
- Conference Management:
- Conference proposals
- Speaker management
- Attendee registration
- Session scheduling
- Workshops:
- Workshop creation
- Skill-based categorization
- Certificate tracking
- Materials distribution
- Vendor Applications:
- Bazaar participation requests
- Booth rental applications
- Visitor email registration
- Application status tracking
- Admin Approval Workflow:
- Application review
- Approval/rejection system
- Comment and feedback
- Booth Polling: Community voting on booth selections
- Payment Integration: Automated payment processing for approved applications
- Email Service:
- Nodemailer integration
- Professional email templates
- Registration confirmations
- Payment receipts
- QR code delivery
- Event reminders
- Password reset emails
- Notifications:
- In-app notifications
- Email alerts
- Event updates
- Payment confirmations
-
Admin Dashboard (
/admin-dashboard):- Application Management: Central hub for managing vendor applications
- Real-time Statistics: Total, pending, approved, and rejected applications
- Dual Application Types: Bazaar and booth applications
- Filtering System: Filter by status (pending/approved/rejected) and type (bazaar/booth)
- Application Actions:
- Approve applications with admin comments
- Reject applications with feedback
- View detailed application information
- Application Details Display:
- Business/vendor information
- Event details and dates
- Financial information (booth fees, expected revenue)
- Visitor email lists for booth applications
- Application timestamps and status history
- Responsive Design: Modern gradient UI with statistics cards
-
User Management (
/admin-users):- View all users with role-based filtering
- Account activation/deactivation
- Ban/unban functionality with modal confirmation
- User search and filtering
- Role management (Student, Staff, TA, Professor, Admin, Events Office)
- Account status monitoring
- Vendor verification status
-
Reports & Analytics (
/reports):- Event attendance reports
- Revenue reports with financial summaries
- User activity analytics
- Registration statistics
- Excel export functionality
- Booth poll results and analytics
-
Admin Comments System (
/admin-comments):- Review and manage comments on applications
- Track admin feedback history
- Application decision documentation
- Password Security:
- Bcrypt hashing
- Minimum complexity requirements
- Secure reset workflow
- JWT Tokens:
- Secure authentication
- Token expiration
- Automatic cleanup
- Input Validation:
- Server-side validation with express-validator
- Client-side validation with yup
- XSS protection
- Rate Limiting: API request throttling
- CORS Protection: Cross-origin security
- Helmet Security: HTTP security headers
university-event-management/
βββ backend/ # Node.js/Express API server
β βββ models/ # MongoDB models
β β βββ User.js
β β βββ Vendor.js
β β βββ Event.js
β β βββ Registration.js
β β βββ EventPayment.js
β β βββ EventRating.js
β β βββ Wallet.js
β β βββ Court.js
β β βββ CourtReservation.js
β β βββ GymSession.js
β β βββ GymRegistration.js
β β βββ Conference.js
β β βββ Workshop.js
β β βββ BazaarApplication.js
β β βββ BoothApplication.js
β β βββ BoothPoll.js
β β βββ LoyaltyProgram.js
β β βββ Notification.js
β βββ routes/ # API routes
β β βββ auth.js
β β βββ events.js
β β βββ createEvents.js
β β βββ registrations.js
β β βββ payments.js
β β βββ eventPayments.js
β β βββ wallet.js
β β βββ courts.js
β β βββ gym.js
β β βββ conference.js
β β βββ workshop.js
β β βββ bazaar.js
β β βββ applications.js
β β βββ boothPolls.js
β β βββ admin.js
β β βββ ratings.js
β β βββ favorites.js
β β βββ files.js
β β βββ report.js
β β βββ VendorRouter.js
β β βββ LoyaltyRoutes.js
β β βββ notifications.js
β βββ controllers/ # Request handlers
β β βββ authController.js
β β βββ eventController.js
β β βββ CreateEvent.js
β β βββ registrationController.js
β β βββ paymentController.js
β β βββ eventPaymentController.js
β β βββ walletController.js
β β βββ courtController.js
β β βββ gymController.js
β β βββ conferenceController.js
β β βββ workshopController.js
β β βββ bazaarController.js
β β βββ applicationController.js
β β βββ boothPollController.js
β β βββ adminController.js
β β βββ eventReviewController.js
β β βββ favoritesController.js
β β βββ fileController.js
β β βββ reportController.js
β β βββ notificationController.js
β β βββ VendorController.js
β β βββ LoyaltyProgramController.js
β βββ middleware/ # Auth & error handling
β β βββ auth.js
β β βββ errorHandler.js
β βββ services/ # Business logic & integrations
β β βββ emailService.js
β β βββ qrCodeService.js
β β βββ eventReminderService.js
β β βββ workshopCertificateScheduler.js
β βββ utils/ # Helper functions
β β βββ imageKitUploader.js
β βββ scripts/ # Database maintenance scripts
β β βββ createAdminAccounts.js
β β βββ checkRegistrations.js
β β βββ cleanupCancelledRegistrations.js
β β βββ cleanupPendingRegistrations.js
β β βββ fixRegistrationIndexes.js
β β βββ seedAdminUsers.js
β βββ server.js # Main server file
βββ frontend/ # React application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ Navbar.js
β β β βββ AdminSidebar.js
β β β βββ EventCard.js
β β β βββ EventPaymentModal.js
β β β βββ EventEditModal.js
β β β βββ CourtCard.js
β β β βββ GymSessionCard.js
β β β βββ RatingModal.js
β β β βββ NotificationCenter.js
β β β βββ WalletDashboard.js
β β β βββ BoothPollManager.js
β β β βββ BanUserModal.js
β β β βββ ...
β β βββ pages/ # Page components
β β β βββ LandingPage.js
β β β βββ Login.js
β β β βββ SignupPage.js
β β β βββ VendorLogin.js
β β β βββ Dashboard.js
β β β βββ EventsPage.js
β β β βββ EventDetailsPage.js
β β β βββ CourtsPage.js
β β β βββ GymSchedulePage.js
β β β βββ Workshops.js
β β β βββ CreateWorkshop.js
β β β βββ MyRegistrations.js
β β β βββ WalletPage.js
β β β βββ LoyaltyProgram.js
β β β βββ FavoritesPage.js
β β β βββ EventsRatings.js
β β β βββ BoothPolls.js
β β β βββ AdminDashboard.js
β β β βββ AdminUserManagement.js
β β β βββ AdminComments.js
β β β βββ ReportsPage.js
β β β βββ VendorDashboard.jsx
β β β βββ PaymentSuccess.js
β β β βββ UploadedFilesPage.js
β β βββ context/ # React context (AuthContext)
β β βββ services/ # API service layer
β β βββ lib/ # UI utilities
β β βββ styles/ # CSS styles
β β βββ theme.js # Design system theme
β βββ public/ # Static assets
β βββ build/ # Production build
β βββ package.json
β βββ tailwind.config.js
β βββ postcss.config.js
βββ README.md
The application uses a comprehensive design system with:
- Color System:
- Primary brand colors (purple gradient)
- Event-type specific colors
- Semantic colors (success, warning, error)
- Role-based colors
- Typography:
- Font families (Inter, SF Pro)
- Responsive font sizes
- Font weights and spacing
- Components:
- Styled buttons with variants
- Cards and containers
- Form inputs and validation
- Navigation and menus
- Modals and dialogs
- Tooltips and popovers
- Data tables
- Charts and visualizations
- UI Library: Radix UI for accessible components
- Styling: Tailwind CSS with custom theme
- Animations: Framer Motion for smooth transitions
- Icons: Lucide React icons
- Theme Integration: Consistent styling across all components
- JWT-based authentication with secure token management
- Role-based access control for different user types
- Password hashing using bcryptjs
- Form validation with yup and react-hook-form
- Protected routes with React Router
- Multi-role support: Student, Staff, TA, Professor, Admin, Events Office
- Vendor registration with business verification workflow
- Profile management with role-specific fields
- Account status tracking and verification
- Responsive design with mobile-first approach
- Theme-based styling using the provided design system
- Interactive components with hover effects and animations
- Toast notifications for user feedback
- Loading states and error handling
- Node.js with Express.js framework
- MongoDB with Mongoose ODM
- JWT for authentication
- bcryptjs for password hashing
- Stripe for payment processing
- Nodemailer for email services
- QRCode for QR code generation
- ImageKit for image hosting
- express-validator for input validation
- node-cron for scheduled tasks
- helmet for security headers
- CORS and rate limiting middleware
- React 18 with functional components and hooks
- React Router for navigation
- Radix UI for accessible component primitives
- Tailwind CSS for styling
- Framer Motion for animations
- React Hook Form for form management
- Yup for validation schemas
- Axios for API communication
- Stripe.js for payment UI
- Recharts for data visualization
- React Hot Toast / Sonner for notifications
- Lucide React for icons
- XLSX for Excel export
- Lottie React for animations
- Node.js (v16 or higher)
- MongoDB (local installation or MongoDB Atlas account)
- npm or yarn package manager
- Stripe account (for payment processing)
- ImageKit account (optional, for image hosting)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Configure environment variables:
Create a
.envfile in the backend directory with the following variables:# Server Configuration PORT=8080 NODE_ENV=development # Database MONGODB_URI=mongodb://localhost:27017/university-events # OR for MongoDB Atlas: # MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/university-events # JWT Configuration JWT_SECRET=your-super-secret-jwt-key-change-this-in-production JWT_EXPIRE=7d # URLs BACKEND_URL=http://localhost:8080 FRONTEND_URL=http://localhost:3000 # Email Configuration (Nodemailer) EMAIL_SERVICE=gmail EMAIL_USER=your-email@gmail.com EMAIL_PASSWORD=your-app-specific-password # Stripe Payment STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key # ImageKit (Optional) IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key IMAGEKIT_URL_ENDPOINT=https://ik.imagekit.io/your_imagekit_id
Important Notes:
- For Gmail, use an App Password
- Get Stripe keys from Stripe Dashboard
- ImageKit keys from ImageKit Dashboard
-
macOS Port 5000 Conflict:
If you encounter
EADDRINUSEerror on port 5000, use port 8080 instead (already set in example above), as macOS uses port 5000 for AirPlay Receiver. -
Start the server:
# Development mode with auto-reload npm run dev # Production mode npm start
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Configure environment variables:
Create a
.envfile in the frontend directory:REACT_APP_API_URL=http://localhost:8080/api REACT_APP_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key
-
Start the development server:
npm start
The application will open at
http://localhost:3000
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
To run on different ports:
- Backend: Update
PORTinbackend/.env - Frontend: Update
REACT_APP_API_URLinfrontend/.envto match your backend port
On macOS Monterey and later, port 5000 is used by AirPlay Receiver. If you encounter this error:
Error: listen EADDRINUSE: address already in use :::5000
Solutions:
- Recommended: Use port 8080 by setting
PORT=8080inbackend/.env - Alternative: Disable AirPlay Receiver in System Preferences > Sharing > AirPlay Receiver
POST /api/auth/register/user- Register university memberPOST /api/auth/register/vendor- Register vendorPOST /api/auth/login- Login user/vendorPOST /api/auth/logout- Logout (protected)GET /api/auth/me- Get current profile (protected)POST /api/auth/forgot-password- Request password resetPOST /api/auth/reset-password- Reset password with tokenPOST /api/auth/verify-email- Verify email address
GET /api/events- Get all events (with filters)GET /api/events/:id- Get event detailsPOST /api/events- Create event (protected)PUT /api/events/:id- Update event (protected)DELETE /api/events/:id- Delete event (protected)POST /api/events/:id/favorite- Toggle favorite (protected)
GET /api/registrations- Get user registrations (protected)POST /api/registrations- Register for event (protected)DELETE /api/registrations/:id- Cancel registration (protected)GET /api/registrations/event/:eventId- Get event registrations (admin)
POST /api/payments/create-checkout-session- Create Stripe checkoutPOST /api/payments/verify- Verify payment completionGET /api/wallet/balance- Get wallet balance (protected)POST /api/wallet/add-funds- Add funds to wallet (protected)GET /api/wallet/transactions- Get transaction history (protected)
GET /api/courts- Get all courtsPOST /api/courts/reserve- Reserve court (protected)GET /api/courts/my-reservations- Get user reservations (protected)GET /api/gym/sessions- Get gym sessionsPOST /api/gym/register- Register for gym session (protected)
GET /api/conferences- Get all conferencesPOST /api/conferences- Create conference (protected)GET /api/workshops- Get all workshopsPOST /api/workshops- Create workshop (protected)
POST /api/bazaar/apply- Submit bazaar application (vendor)GET /api/bazaar/applications- Get vendor applications (vendor)GET /api/bazaar/all-applications- Get all applications (admin)PUT /api/bazaar/:id/approve- Approve application (admin)PUT /api/bazaar/:id/reject- Reject application (admin)
GET /api/admin/users- Get all usersPUT /api/admin/users/:id/ban- Ban userPUT /api/admin/users/:id/unban- Unban userGET /api/admin/analytics- Get system analyticsGET /api/admin/reports- Generate reports
GET /api/notifications- Get user notifications (protected)PUT /api/notifications/:id/read- Mark notification as readDELETE /api/notifications/:id- Delete notification
GET /api/loyalty/points- Get user points (protected)POST /api/loyalty/redeem- Redeem points (protected)GET /api/loyalty/rewards- Get available rewards
-
Student:
- Register for events and activities
- Reserve sports facilities
- Join gym sessions and workshops
- Manage digital wallet
- Rate and review events
- Earn loyalty points
-
Staff:
- Access staff-specific events
- Participate in training sessions
- All student permissions
-
TA:
- Find TA-specific workshops
- Access development opportunities
- All student permissions
-
Professor:
- Propose academic events
- Create and manage workshops
- Organize conferences
- All student permissions
-
Admin:
- Full system management
- User account control (ban/unban)
- Event approval and oversight
- Vendor verification
- System analytics and reports
- Payment monitoring
-
Events Office:
- Event planning and creation
- Event approval workflow
- Coordinate with vendors
- Manage event logistics
- Registration: Submit business information and documentation
- Application Process: Apply for bazaars and booth rentals
- Visitor Management: Register visitor emails for QR code access
- Verification: Await admin approval for account activation
- Payment: Process payments for approved applications
- Participation: Access approved events and manage booth setup
- Password Requirements: Minimum 8 characters with uppercase, lowercase, and numbers
- JWT Token Management:
- Secure token storage in httpOnly cookies
- Automatic token cleanup on logout
- Token expiration handling
- Refresh token support
- Input Validation:
- Client-side validation with yup
- Server-side validation with express-validator
- SQL injection prevention
- XSS protection
- Rate Limiting: API request throttling to prevent abuse
- CORS Protection: Configured cross-origin request security
- Helmet Security: Comprehensive HTTP security headers
- Password Hashing: Bcrypt with salt rounds
- Email Verification: Account activation requirement
- Payment Security: PCI-compliant Stripe integration
- QR Code Verification: SHA-256 hashed tokens for event access
import theme, { getEventTypeColor, getRoleColor } from './theme';
// Using colors
<div style={{ background: theme.colors.primary.gradient }}>
// Using button styles
<button style={{
...theme.components.button.primary,
fontSize: theme.typography.fontSize.base
}}>
// Using helper functions
const color = getEventTypeColor('bazaar'); // Returns #10b981
const roleColor = getRoleColor('student'); // Returns role-specific color-
Clone the repository
git clone <repository-url> cd university-event-management
-
Set up MongoDB
- Install MongoDB locally OR create a MongoDB Atlas account
- Create a database named
university-events
-
Configure Backend
cd backend npm install # Create .env file with required variables (see Setup Instructions) npm run dev
-
Configure Frontend
cd frontend npm install # Create .env file with API URL npm start
-
Create Admin Account
- Register a user through the UI
- Manually update the user's role to 'admin' in MongoDB
-
Test Payment System
- Use Stripe test card:
4242 4242 4242 4242 - Any future expiry date
- Any 3-digit CVC
- Use Stripe test card:
# Terminal 1 - Backend
cd backend
npm run dev
# Terminal 2 - Frontend
cd frontend
npm startAccess the application at http://localhost:3000
Create test accounts for different roles:
// Student Account
{
email: "student@university.edu",
password: "Student123!",
role: "student"
}
// Vendor Account
{
email: "vendor@company.com",
password: "Vendor123!",
role: "vendor",
businessName: "Test Company"
}
// Admin Account (requires manual database update)
{
email: "admin@university.edu",
password: "Admin123!",
role: "admin"
}Success: 4242 4242 4242 4242
Decline: 4000 0000 0000 0002
Insufficient Funds: 4000 0000 0000 9995
Any future expiry date and any 3-digit CVC
-
Port already in use (macOS)
- Solution: Use port 8080 instead of 5000 (see Port Configuration section)
-
MongoDB connection error
- Check MongoDB is running:
mongod --version - Verify connection string in
.env - Ensure database name is correct
- Check MongoDB is running:
-
Email not sending
- For Gmail, use App Password, not regular password
- Check EMAIL_SERVICE, EMAIL_USER, EMAIL_PASSWORD in
.env - For development, emails appear in console with preview URLs
-
Stripe payment fails
- Verify STRIPE_SECRET_KEY in backend
.env - Verify STRIPE_PUBLISHABLE_KEY in frontend
.env - Use test mode keys for development
- Verify STRIPE_SECRET_KEY in backend
-
CORS errors
- Check FRONTEND_URL in backend
.envmatches frontend port - Restart backend server after changing
.env
- Check FRONTEND_URL in backend
-
QR codes not generating
- Check that
qrcodepackage is installed - Verify email service is configured
- Check console logs for QR generation errors
- Check that
- Database Indexing: Key fields indexed for faster queries
- Lazy Loading: Components loaded on demand
- Image Optimization: ImageKit CDN integration
- Caching: API response caching where appropriate
- Code Splitting: React lazy loading for routes
- Debouncing: Search and filter operations debounced
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Follow existing code style
- Add comments for complex logic
- Update documentation as needed
- Test your changes
- Ensure all existing features still work
- Test edge cases
- Commit your changes
git commit -m "Add: brief description of your changes" - Push to your fork
git push origin feature/your-feature-name
- Submit a pull request
- Describe your changes in detail
- Reference any related issues
- Wait for code review
- Use meaningful variable and function names
- Follow existing file structure
- Add JSDoc comments for functions
- Keep components small and focused
- Use async/await for asynchronous operations
This project is licensed under the MIT License. See the LICENSE file for details.
SprintX University Event Management System
Developed as part of the Advanced Computer Lab 2025 project at the German University in Cairo.
- GitHub: Advanced-Computer-Lab-2025/SprintX
- Branch: main
For questions, issues, or support:
- Email: support@sprintx.edu
- GitHub Issues: Report an issue
- Documentation: See guides in the repository
Planned features for future releases:
- Mobile application (React Native)
- Real-time chat support
- Advanced analytics dashboard
- Calendar integration (Google Calendar, iCal)
- Social media sharing
- Multi-language support
- Advanced search with filters
- Event recommendations based on user preferences
- Push notifications
- Attendance tracking with QR code scanning
- Vendor performance analytics
- Automated event reminders
- Video streaming for virtual events
- MongoDB for the robust database solution
- Stripe for secure payment processing
- Radix UI for accessible component primitives
- Tailwind CSS for the utility-first CSS framework
- ImageKit for image hosting and optimization
- All open-source contributors whose libraries made this project possible
- β Complete authentication system
- β Event management with multiple event types
- β Payment integration with Stripe
- β QR code system for event access
- β Digital wallet functionality
- β Sports facilities booking
- β Vendor and bazaar management
- β Admin dashboard with analytics
- β Email notification system
- β Loyalty program
- β Rating and review system
Built with β€οΈ by the SprintX Team
Last Updated: December 2025