Skip to content

Advanced-Computer-Lab-2025/Univents

Repository files navigation

Contributors Forks Stargazers Issues project_license


Logo

Univents

A comprehensive University Event Management System facilitating seamless interaction between students, professors, and event organizers.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Motivation
  3. Build Status
  4. Code Style
  5. Built With
  6. Features
  7. Screenshots
  8. Code Examples
  9. Getting Started
  10. Usage
  11. API References
  12. Tests
  13. Project Structure
  14. How to Contribute
  15. Credits
  16. License
  17. Contact

About The Project

Univents is a robust web application designed to streamline the management of university events. It serves as a central hub for workshops, conferences, trips, bazaars, and booths, allowing users to discover, register, and participate in various campus activities. The platform caters to multiple user roles including Students, Professors, Events Office staff, and Admins, each with tailored functionalities.

(back to top)

Motivation

The motivation behind Univents stems from the need to centralize and simplify university event management at GUC. Previously, event information was scattered across different platforms and communication channels, making it difficult for students to discover opportunities and for organizers to manage attendance and logistics efficiently.

Key problems we aimed to solve:

  • Fragmented Information: Students often missed events due to information being spread across multiple platforms (emails, social media, bulletin boards)
  • Manual Processes: Event registration and ticketing were handled manually, leading to inefficiencies and errors
  • Limited Tracking: Organizers had no centralized way to track attendance, payments, and collect feedback
  • Access Control: No systematic way to manage different user roles and their respective permissions
  • Payment Challenges: Lack of integrated payment solutions for paid events and vendor applications
  • Communication Gaps: Difficulty in sending timely notifications and updates to event participants

Univents addresses these challenges by providing a unified platform that brings together all stakeholders in the university event ecosystem, streamlining the entire process from event creation to post-event feedback collection.

(back to top)

Build Status

Current Version: Sprint 2 (v2.0)

Known Issues and Limitations:

  1. Payment Processing

    • Stripe webhook testing requires local Stripe CLI setup
    • Payment status updates occasionally have a 2-3 second delay in reflecting on the UI
    • Wallet refund processing can take up to 24 hours in production environment
  2. Real-time Notifications

    • Socket.io connection may drop on network switches; requires page refresh to reconnect
    • Notification badges sometimes don't clear until page reload
  3. File Uploads

    • PDF certificate generation can be slow for workshops with 100+ attendees
    • Image uploads limited to 5MB per file due to MongoDB document size constraints
  4. Browser Compatibility

    • QR code scanner works best on Chrome and Safari; limited support on Firefox mobile
    • Some CSS animations may not render properly on older versions of Safari
  5. Performance

    • Event search with multiple filters can be slow when database has 500+ events
    • Dashboard statistics calculation takes 3-5 seconds for accounts with extensive history
  6. Mobile Responsiveness

    • Vendor dashboard table layout needs improvement for small screens (<375px width)
    • Event creation form has scrolling issues on some Android devices
  7. Email Notifications

    • Email delivery can be delayed during peak hours (10-30 minute delays observed)
    • Some email providers (Outlook) occasionally flag event reminders as spam

Planned Improvements:

  • Implement Redis caching for faster event queries
  • Add progressive image loading for better performance
  • Optimize database indexes for search operations
  • Implement offline support with service workers

(back to top)

Code Style

Our project follows consistent coding standards across both frontend and backend to ensure maintainability and readability.

Naming Conventions:

  • Variables & Functions: camelCase (e.g., getUserEvents, isRegistered)
  • React Components: PascalCase (e.g., EventCard, UserDashboard)
  • Constants: UPPER_SNAKE_CASE (e.g., MAX_FILE_SIZE, API_ENDPOINTS)
  • Database Models: PascalCase (e.g., Event, User, Registration)
  • Files: kebab-case for utilities, PascalCase for components (e.g., auth-utils.ts, EventCard.tsx)

TypeScript Guidelines:

  • Strict type checking enabled
  • Explicit return types for all functions
  • Interface definitions for all data structures
  • No use of any type; use unknown with type guards instead
  • Prefer type inference where appropriate

Code Organization:

  • Frontend: Feature-based folder structure in /src/_components
  • Backend: MVC pattern with clear separation of concerns
  • Imports: Grouped and ordered (React, third-party, local)
  • Max line length: 100 characters
  • Indentation: 2 spaces

Best Practices:

  • Async/await over promise chains
  • Descriptive variable and function names
  • JSDoc comments for complex functions
  • Error handling with try-catch blocks
  • Modular, reusable components
  • Custom hooks for shared logic
  • Zod schemas for runtime validation

Formatting:

  • Prettier for consistent code formatting
  • ESLint for code quality enforcement
  • Single quotes for strings (except JSON)
  • Semicolons required
  • Trailing commas in multiline objects/arrays

(back to top)

Built With

This project leverages a modern tech stack to ensure performance, scalability, and developer experience.

(back to top)

Features

Event Management

Event Types & Creation

  • Support for multiple event types: Workshops, Conferences, Trips (Cairo/Berlin), Bazaars, Competitions, and Booths
  • Custom event creation with detailed information (title, description, date, time, location, capacity)
  • Event image upload and banner management
  • Price configuration for paid events
  • Capacity management with maximum attendee limits
  • Event status tracking (draft, published, ongoing, completed, cancelled)
  • Recurring event scheduling options
  • Event categories and tags for better organization

Event Discovery & Search

  • Advanced search functionality with multiple filters
  • Filter by event type, date range, location, and price
  • Sort events by date, popularity, or relevance
  • Browse upcoming, past, and ongoing events
  • Location-based event discovery
  • Personalized event recommendations based on user interests
  • Favorite/bookmark events for later viewing
  • Calendar view of all events

User Management & Authentication

Role-Based Access Control

  • Five distinct user roles: Students, Professors/TAs, Events Office Staff, Vendors, and Admins
  • Role-specific dashboards and navigation
  • GUC email validation for student/staff accounts (@student.guc.edu.eg, @guc.edu.eg)
  • Secure JWT-based authentication
  • Password encryption and security
  • Account verification and email confirmation
  • Password reset and recovery functionality
  • Profile management with customizable information

User Permissions by Role

  • Students: Browse and register for events, manage registrations, provide feedback, track attendance history
  • Professors/TAs: Propose and create workshops/conferences, manage academic events, track student participation, generate attendance reports
  • Events Office: Create and manage all event types, approve event proposals, monitor all activities, access comprehensive analytics
  • Vendors: Apply for bazaar participation, manage booth applications, upload required documentation, track application status
  • Admins: Verify user accounts, approve vendor applications, manage all users, access system-wide analytics, moderate content

Registration & Ticketing

Event Registration

  • Seamless one-click registration for events
  • Automatic capacity checking and waitlist management
  • Registration confirmation via email
  • QR code ticket generation for registered events
  • Digital ticket storage and management
  • Check-in system using QR code scanning
  • Registration history and tracking
  • Cancellation and refund requests
  • Transfer tickets to other users (where applicable)

Attendance Management

  • Real-time attendance tracking for event organizers
  • QR code-based check-in system
  • Attendance verification and validation
  • Attendee list management with export functionality
  • Late check-in and early departure tracking
  • Attendance certificates for workshops/conferences
  • Attendance reports and analytics

Payment & Financial Management

Payment Processing

  • Secure payment integration via Stripe
  • Support for credit/debit card payments
  • Real-time payment status updates
  • Payment confirmation emails
  • Transaction history and receipts
  • Multiple currency support

Wallet System

  • Internal wallet for quick transactions
  • Add funds to wallet via Stripe
  • Use wallet balance for event payments
  • Automatic refund processing to wallet
  • Wallet transaction history
  • Balance tracking and notifications

Vendor Payments

  • Booth application fees for bazaars
  • Secure payment collection for vendor registrations
  • Payment verification and tracking
  • Invoice generation for vendor transactions

Communication & Notifications

Real-time Notifications

  • Live notifications using Socket.io
  • Push notifications for important updates
  • Event reminders (24 hours, 1 hour before start)
  • Registration confirmations
  • Payment status updates
  • Event cancellation or time change alerts
  • New event announcements
  • Custom notification preferences

Email System

  • Automated email notifications for all key actions
  • Welcome emails for new users
  • Event registration confirmations
  • Payment receipts and invoices
  • Certificate delivery via email
  • Event reminders and updates
  • Bulk email campaigns for event promotion
  • Customizable email templates

Analytics & Reporting

Event Analytics

  • Registration statistics and trends
  • Attendance rates and patterns
  • Revenue tracking per event
  • Popular event types and categories
  • Peak registration times
  • Geographic distribution of attendees
  • Demographic insights

Dashboard Views

  • Role-specific analytical dashboards
  • Visual charts and graphs for data representation
  • Real-time metrics and KPIs
  • Historical data comparison
  • Export reports to PDF/CSV
  • Custom date range filtering
  • Event performance metrics

Feedback & Rating System

Event Feedback

  • Post-event rating system (1-5 stars)
  • Written reviews and comments
  • Anonymous feedback option
  • Feedback moderation by organizers
  • Average rating calculation and display
  • Sort and filter reviews
  • Helpful review voting system
  • Response from organizers to feedback

Document Management

Certificate Generation

  • Automated PDF certificate generation for workshop/conference attendees
  • Customizable certificate templates
  • Include event details, attendee name, and date
  • Digital signature and verification
  • Automatic email delivery of certificates
  • Certificate download from user dashboard
  • Certificate verification system

Vendor Documentation

  • Upload company registration documents
  • Tax ID and business license submission
  • Product/service catalog uploads
  • Document verification by admins
  • Document status tracking
  • Secure document storage

Vendor Management

Vendor Portal

  • Dedicated vendor registration and profile
  • Apply for participation in bazaars and career fairs
  • Booth selection and preferences
  • Upload required documentation (company registration, tax ID)
  • Application status tracking
  • Communication with events office
  • Booth management during events
  • Vendor rating and reviews

Bazaar & Career Fair Management

  • Vendor application approval workflow
  • Booth allocation and floor plan management
  • Vendor fee collection
  • Vendor communication system
  • Booth setup guidelines and instructions
  • Performance tracking for vendors

Event Proposals & Approvals

Proposal System

  • Professors can propose workshops and conferences
  • Detailed proposal forms with justification
  • Proposal submission to events office
  • Approval workflow with comments
  • Proposal status tracking
  • Revision requests and resubmission
  • Approval/rejection notifications
  • Proposal history and archives

Trip Management

Trip-Specific Features

  • Cairo and Berlin trip creation
  • Detailed itinerary management
  • Transportation details
  • Accommodation information (for Berlin trips)
  • Trip capacity management
  • Group management and team assignments
  • Emergency contact information
  • Trip-specific waivers and requirements

Competition Management

Competition Features

  • Competition event creation and management
  • Team registration (individual or group)
  • Competition rules and guidelines
  • Submission portal for entries
  • Judging criteria and scoring system
  • Leaderboard and winner announcements
  • Prize distribution tracking

Administrative Functions

System Administration

  • User account verification and approval
  • Vendor application review and approval
  • Event content moderation
  • User role management
  • System configuration settings
  • Database backup and maintenance
  • Security monitoring and logs
  • Generate system-wide reports

Mobile Responsiveness

Cross-Device Support

  • Fully responsive design for mobile, tablet, and desktop
  • Touch-optimized interface for mobile devices
  • Progressive Web App (PWA) capabilities
  • Offline event viewing
  • Mobile-friendly QR code scanning
  • Optimized image loading for mobile networks

Security Features

Data Protection

  • Secure password hashing with bcrypt
  • JWT token-based authentication
  • HTTPS encryption for all communications
  • Input validation and sanitization
  • SQL injection and XSS protection
  • Rate limiting to prevent abuse
  • Session management and timeout
  • Audit logs for sensitive actions

Search Engine Optimization

SEO Features

  • SEO-friendly URLs
  • Meta tags for social media sharing
  • Open Graph protocol support
  • Sitemap generation
  • Schema markup for events
  • Page load optimization
  • Image optimization and lazy loading

(back to top)

Screenshots

Landing Page

Landing Page

Upcoming Events

Upcoming Events

Courts

Courts

Events Office Account

Events Office Account

Campus View

Campus View

Vendor Portal

Vendor Portal

Student Portal

Student Portal

Event Banner Example

Event Banner

(back to top)

Code Examples

Here are some key code snippets demonstrating our implementation:

1. Event Registration with Payment Processing

// server/src/controllers/registrationController.ts
export const registerForEvent = async (req: Request, res: Response) => {
  try {
    const { eventId } = req.params;
    const userId = req.user._id;

    // Check if user is already registered
    const existingRegistration = await Registration.findOne({
      event: eventId,
      user: userId,
      status: { $ne: "cancelled" },
    });

    if (existingRegistration) {
      return res.status(400).json({
        message: "Already registered for this event",
      });
    }

    const event = await Event.findById(eventId);
    if (!event) {
      return res.status(404).json({ message: "Event not found" });
    }

    // Check capacity
    if (event.currentAttendees >= event.maxCapacity) {
      return res.status(400).json({ message: "Event is full" });
    }

    // Create registration
    const registration = await Registration.create({
      event: eventId,
      user: userId,
      registrationDate: new Date(),
      status: event.price > 0 ? "pending" : "confirmed",
      paymentStatus: event.price > 0 ? "pending" : "free",
    });

    // Update event attendance
    event.currentAttendees += 1;
    await event.save();

    // Generate QR code if confirmed
    if (registration.status === "confirmed") {
      registration.qrCode = await generateQRCode(registration._id);
      await registration.save();
    }

    res.status(201).json({
      registration,
      message: "Registration successful",
    });
  } catch (error) {
    res.status(500).json({ message: "Server error", error });
  }
};

2. Custom React Hook for Form Validation

// client/src/_hooks/useEventForm.ts
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { eventSchema, type EventFormData } from "@/lib/schemas/eventSchema";

export const useEventForm = (defaultValues?: Partial<EventFormData>) => {
  const form = useForm<EventFormData>({
    resolver: zodResolver(eventSchema),
    defaultValues: {
      title: "",
      description: "",
      eventType: "workshop",
      startDate: new Date(),
      endDate: new Date(),
      location: "",
      maxCapacity: 50,
      price: 0,
      ...defaultValues,
    },
  });

  const validateDates = (startDate: Date, endDate: Date): boolean => {
    const now = new Date();
    if (startDate < now) {
      form.setError("startDate", {
        message: "Start date must be in the future",
      });
      return false;
    }
    if (endDate < startDate) {
      form.setError("endDate", {
        message: "End date must be after start date",
      });
      return false;
    }
    return true;
  };

  return { form, validateDates };
};

3. Stripe Payment Integration

// server/src/controllers/paymentController.ts
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
  apiVersion: "2023-10-16",
});

export const createPaymentIntent = async (req: Request, res: Response) => {
  try {
    const { eventId, registrationId } = req.body;
    const event = await Event.findById(eventId);

    if (!event) {
      return res.status(404).json({ message: "Event not found" });
    }

    const paymentIntent = await stripe.paymentIntents.create({
      amount: Math.round(event.price * 100), // Convert to cents
      currency: "usd",
      metadata: {
        eventId: event._id.toString(),
        registrationId,
        userId: req.user._id.toString(),
      },
      automatic_payment_methods: {
        enabled: true,
      },
    });

    res.json({
      clientSecret: paymentIntent.client_secret,
      paymentIntentId: paymentIntent.id,
    });
  } catch (error) {
    console.error("Payment intent creation failed:", error);
    res.status(500).json({ message: "Payment processing error" });
  }
};

4. Real-time Notification System with Socket.io

// server/src/utils/socketManager.ts
import { Server as SocketServer } from "socket.io";
import { Server as HTTPServer } from "http";

export class SocketManager {
  private io: SocketServer;
  private userSockets: Map<string, string> = new Map();

  constructor(server: HTTPServer) {
    this.io = new SocketServer(server, {
      cors: {
        origin: process.env.CLIENT_URL,
        credentials: true,
      },
    });

    this.initializeListeners();
  }

  private initializeListeners() {
    this.io.on("connection", (socket) => {
      console.log(`User connected: ${socket.id}`);

      socket.on("register", (userId: string) => {
        this.userSockets.set(userId, socket.id);
        socket.join(`user:${userId}`);
      });

      socket.on("disconnect", () => {
        // Remove user from map
        for (const [userId, socketId] of this.userSockets.entries()) {
          if (socketId === socket.id) {
            this.userSockets.delete(userId);
            break;
          }
        }
      });
    });
  }

  public notifyUser(userId: string, event: string, data: any) {
    this.io.to(`user:${userId}`).emit(event, data);
  }

  public notifyEventParticipants(eventId: string, event: string, data: any) {
    this.io.to(`event:${eventId}`).emit(event, data);
  }
}

5. Zod Schema for Type-Safe Form Validation

// client/src/_lib/schemas/eventSchema.ts
import { z } from "zod";

export const eventSchema = z
  .object({
    title: z
      .string()
      .min(3, "Title must be at least 3 characters")
      .max(100, "Title must be less than 100 characters"),

    description: z
      .string()
      .min(10, "Description must be at least 10 characters")
      .max(1000, "Description must be less than 1000 characters"),

    eventType: z.enum(["workshop", "conference", "trip", "bazaar", "booth"]),

    startDate: z.date({
      required_error: "Start date is required",
      invalid_type_error: "Invalid date format",
    }),

    endDate: z.date({
      required_error: "End date is required",
      invalid_type_error: "Invalid date format",
    }),

    location: z.string().min(3, "Location must be at least 3 characters"),

    maxCapacity: z
      .number()
      .int("Capacity must be a whole number")
      .min(1, "Capacity must be at least 1")
      .max(1000, "Capacity cannot exceed 1000"),

    price: z
      .number()
      .min(0, "Price cannot be negative")
      .max(10000, "Price cannot exceed 10000"),
  })
  .refine((data) => data.endDate > data.startDate, {
    message: "End date must be after start date",
    path: ["endDate"],
  });

export type EventFormData = z.infer<typeof eventSchema>;

(back to top)

Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

  • Node.js (v18 or higher recommended)
  • MongoDB (Local instance or Atlas connection string)
  • Stripe CLI (Optional, for testing webhooks locally)

Installation

  1. Clone the repository

    git clone https://github.com/Advanced-Computer-Lab-2025/Univents.git
    cd Univents
  2. Install Server Dependencies

    cd server
    npm install
  3. Install Client Dependencies

    cd ../client
    npm install

Environment Variables

You need to set up .env files in both client and server directories.

Server (server/.env):

PORT=4000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
EMAIL_USER=your_email_address
EMAIL_PASS=your_email_password
CLIENT_URL=http://localhost:3000

Client (client/.env.local):

NEXT_PUBLIC_API_URL=http://localhost:4000/api
NEXT_PUBLIC_SOCKET_URL=http://localhost:4000
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key

(back to top)

Usage

  1. Start the Server

    cd server
    npm run dev

    This will start the Express server and the Stripe webhook listener concurrently.

  2. Start the Client

    cd client
    npm run dev

    This will start the Next.js development server.

  3. Access the Application Open your browser and navigate to http://localhost:3000.

(back to top)

API References

Here are the main API endpoints used in the Univents application:

Authentication Routes

POST   /api/auth/register
POST   /api/auth/login
POST   /api/auth/logout
GET    /api/auth/me
POST   /api/auth/refresh-token

Example: User Registration

POST /api/auth/register
Content-Type: application/json

{
  "name": "John Doe",
  "email": "john.doe@student.guc.edu.eg",
  "password": "SecurePass123!",
  "role": "student"
}

Response: 201 Created
{
  "user": {
    "_id": "507f1f77bcf86cd799439011",
    "name": "John Doe",
    "email": "john.doe@student.guc.edu.eg",
    "role": "student"
  },
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Event Routes

GET    /api/events
POST   /api/events
GET    /api/events/:id
PUT    /api/events/:id
DELETE /api/events/:id
GET    /api/events/search?query=workshop&type=workshop
GET    /api/events/upcoming
GET    /api/events/my-events

Example: Get All Events

GET /api/events?page=1&limit=10&type=workshop

Response: 200 OK
{
  "events": [
    {
      "_id": "507f1f77bcf86cd799439012",
      "title": "React Advanced Patterns",
      "description": "Learn advanced React patterns",
      "eventType": "workshop",
      "startDate": "2025-12-15T10:00:00Z",
      "endDate": "2025-12-15T14:00:00Z",
      "location": "C7.305",
      "maxCapacity": 50,
      "currentAttendees": 23,
      "price": 100,
      "organizer": {...}
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 45,
    "pages": 5
  }
}

Registration Routes

POST   /api/registrations/:eventId
GET    /api/registrations/my-registrations
DELETE /api/registrations/:registrationId
GET    /api/registrations/event/:eventId/attendees
POST   /api/registrations/:registrationId/check-in

Example: Register for Event

POST /api/registrations/507f1f77bcf86cd799439012
Authorization: Bearer <token>

Response: 201 Created
{
  "registration": {
    "_id": "507f1f77bcf86cd799439013",
    "event": "507f1f77bcf86cd799439012",
    "user": "507f1f77bcf86cd799439011",
    "status": "pending",
    "paymentStatus": "pending",
    "registrationDate": "2025-12-02T10:30:00Z"
  },
  "message": "Registration successful"
}

Payment Routes

POST   /api/payments/create-intent
POST   /api/payments/confirm
POST   /api/payments/webhook
GET    /api/payments/history
GET    /api/wallet/balance
POST   /api/wallet/add-funds

Example: Create Payment Intent

POST /api/payments/create-intent
Authorization: Bearer <token>
Content-Type: application/json

{
  "eventId": "507f1f77bcf86cd799439012",
  "registrationId": "507f1f77bcf86cd799439013"
}

Response: 200 OK
{
  "clientSecret": "pi_xxxxxxxxxxxxx_secret_xxxxxxxxxxxxx",
  "paymentIntentId": "pi_xxxxxxxxxxxxx"
}

Notification Routes

GET    /api/notifications
PUT    /api/notifications/:id/read
PUT    /api/notifications/mark-all-read
DELETE /api/notifications/:id
GET    /api/notifications/unread-count

Example: Get Notifications

GET /api/notifications?page=1&limit=20
Authorization: Bearer <token>

Response: 200 OK
{
  "notifications": [
    {
      "_id": "507f1f77bcf86cd799439014",
      "user": "507f1f77bcf86cd799439011",
      "type": "event_reminder",
      "title": "Event Starting Soon",
      "message": "React Advanced Patterns starts in 1 hour",
      "read": false,
      "createdAt": "2025-12-15T09:00:00Z"
    }
  ],
  "unreadCount": 5
}

(back to top)

Tests

We use Postman for API testing. Here are examples of our test cases:

Test 1: User Registration Validation

// Test: Successful registration with valid GUC email
POST {{baseUrl}}/api/auth/register
{
  "name": "Test User",
  "email": "test.user@student.guc.edu.eg",
  "password": "TestPass123!",
  "role": "student"
}

// Expected: 201 Created
// Validates: Email format, password strength, role assignment

User Registration Test

Test 2: Event Creation Authorization

// Test: Only authorized roles can create events
POST {{baseUrl}}/api/events
Headers:
  Authorization: Bearer {{professorToken}}

{
  "title": "AI Workshop",
  "description": "Introduction to Machine Learning",
  "eventType": "workshop",
  "startDate": "2025-12-20T10:00:00Z",
  "endDate": "2025-12-20T14:00:00Z",
  "location": "C7.305",
  "maxCapacity": 30,
  "price": 0
}

// Expected: 201 Created for professor/events_office roles
// Expected: 403 Forbidden for student role
// Validates: Role-based access control

Event Creation Auth Test

Test 3: Event Registration with Capacity Check

// Test: Cannot register for full event
POST {{baseUrl}}/api/registrations/{{fullEventId}}
Headers:
  Authorization: Bearer {{studentToken}}

// Expected: 400 Bad Request
// Error: "Event is full"
// Validates: Capacity limits, duplicate registration check

Event Capacity Test

Test 4: Payment Processing Flow

// Test: Complete payment flow
// Step 1: Create payment intent
POST {{baseUrl}}/api/payments/create-intent
{
  "eventId": "{{eventId}}",
  "registrationId": "{{registrationId}}"
}

// Expected: 200 OK with clientSecret

// Step 2: Confirm payment (simulated)
POST {{baseUrl}}/api/payments/confirm
{
  "paymentIntentId": "{{paymentIntentId}}",
  "registrationId": "{{registrationId}}"
}

// Expected: 200 OK
// Validates: Payment creation, status updates, database consistency

Payment Flow Test

Test 5: Search and Filter Events

// Test: Search with multiple filters
GET {{baseUrl}}/api/events/search?query=workshop&type=workshop&minDate=2025-12-01&maxDate=2025-12-31&location=C7

// Expected: 200 OK with filtered results
// Validates:
// - Text search in title/description
// - Event type filtering
// - Date range filtering
// - Location filtering
// - Pagination

Search Filter Test

Test 6: QR Code Generation and Verification

// Test: Generate QR code after confirmed registration
POST {{baseUrl}}/api/registrations/{{registrationId}}/generate-qr

// Expected: 200 OK with QR code data

// Test: Verify QR code at event check-in
POST {{baseUrl}}/api/registrations/verify-qr
{
  "qrCode": "{{encodedQRData}}"
}

// Expected: 200 OK with attendee details
// Validates: QR generation, encryption, verification logic

QR Code Test

Test 7: Real-time Notification Delivery

// Test: Socket.io notification delivery
// Setup: Connect to socket with user token
// Action: Trigger event update
PUT {{baseUrl}}/api/events/{{eventId}}
{
  "startDate": "2025-12-20T11:00:00Z"  // Changed time
}

// Expected:
// - 200 OK from API
// - Socket event 'event_updated' received by registered users
// - Notification created in database
// Validates: Real-time communication, notification persistence

Socket Notification Test

Running the Tests:

  1. Import the Postman collection from docs/postman/Univents.postman_collection.json
  2. Import the environment from docs/postman/Univents.postman_environment.json
  3. Run the collection using the Collection Runner
  4. All tests should pass with proper environment configuration

(back to top)

Project Structure

Univents/
├── client/                 # Next.js Frontend
│   ├── src/
│   │   ├── _actions/       # Server Actions for data mutation
│   │   ├── _components/    # Reusable UI components
│   │   ├── _context/       # React Context providers
│   │   ├── _hooks/         # Custom React hooks
│   │   ├── _lib/           # Utilities, definitions, and schemas
│   │   └── app/            # App Router pages and layouts
│   └── ...
│
├── server/                 # Express Backend
│   ├── src/
│   │   ├── config/         # Configuration files
│   │   ├── controllers/    # Route logic handlers
│   │   ├── models/         # Mongoose database models
│   │   ├── routes/         # API route definitions
│   │   ├── middleware/     # Custom middleware (auth, error handling)
│   │   └── utils/          # Helper functions
│   └── ...
└── ...

(back to top)

How to Contribute

We welcome contributions to improve Univents! Here's how you can help:

Areas Where Contributions Are Needed:

  1. Performance Optimization

    • Implement caching strategies (Redis) for frequently accessed data
    • Optimize database queries with better indexing
    • Reduce bundle size on the frontend
  2. Feature Enhancements

    • Add recurring events functionality
    • Implement event waitlist system
    • Create mobile app using React Native
    • Add calendar integration (Google Calendar, Outlook)
  3. UI/UX Improvements

    • Enhance mobile responsiveness for smaller screens
    • Add dark mode theme
    • Improve accessibility (WCAG compliance)
    • Create better loading states and skeleton screens
  4. Testing

    • Write unit tests for backend controllers
    • Add integration tests for API routes
    • Implement E2E tests using Playwright or Cypress
    • Increase test coverage above 80%
  5. Documentation

    • Add JSDoc comments to complex functions
    • Create user guides and tutorials
    • Document API endpoints in Swagger/OpenAPI format
    • Add architecture diagrams

How to Contribute:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Make your changes and test thoroughly
  4. Write/update tests for your changes
  5. Update documentation if needed
  6. Commit your Changes (git commit -m 'Add some AmazingFeature')
  7. Push to the Branch (git push origin feature/AmazingFeature)
  8. Open a Pull Request with a clear description of your changes

Contribution Guidelines:

  • Follow the existing code style and conventions
  • Write clear commit messages
  • Test your changes before submitting
  • Update relevant documentation
  • Keep pull requests focused on a single feature/fix
  • Be respectful and constructive in discussions

(back to top)

Credits

This project was made possible by the following resources and inspirations:

Learning Resources:

UI/UX Inspiration:

Technical Solutions:

Tools & Libraries:

Special Thanks:

  • Dr. Mervat Abuelkheir and the CSEN 704 teaching team for guidance and support
  • Our Product Manager for code reviews and feedback
  • All contributors who helped improve this project
  • The open-source community for the amazing tools and libraries

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

Third-Party Licenses:

This project uses several open-source libraries, each with their own licenses:

  • React, Next.js: MIT License
  • Node.js, Express: MIT License
  • MongoDB: Server Side Public License (SSPL)
  • Stripe SDK: Apache License 2.0
  • Socket.io: MIT License
  • Tailwind CSS: MIT License
  • TypeScript: Apache License 2.0
  • Zod: MIT License
  • React Hook Form: MIT License

For complete license information for each dependency, please refer to their respective repositories and documentation.

(back to top)

Contact

Project Link: https://github.com/Advanced-Computer-Lab-2025/Univents

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages