Skip to content

Latest commit

Β 

History

292 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NextUp

Overview

NextUp is a unified campus event management platform designed to streamline how students, academic staff, TAs, professors, and vendors interact with university events. The system centralizes event creation, approval, participation, and vendor workflows across workshops, trips, bazaars, conferences, booths, and court bookings.


🎯 Motivation

Managing campus events typically involves many disconnected stakeholders and manual workflows. NextUp was created to:

  • Reduce administrative friction
  • Automate approvals and event publishing
  • Provide transparency for students and staff
  • Centralize vendor onboarding
  • Improve campus life through a seamless digital experience

πŸš€ Build Status

  • βœ” Core event management features completed
  • βœ” Role-based event approval flows
  • βœ” Vendor registration system
  • βœ” Student event registration module
  • βœ” Event filtering & search
  • βœ” Email verification for Students, Staff, TAs, Professors
  • βœ” Admin role assignment
  • βœ” Full CRUD: create/edit/delete events

🧱 Tech Stack

Frontend

  • Next.js 13+
  • React.js (Functional Components)
  • TailwindCSS

Backend

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • JWT Authentication

Tools & Utilities

  • Postman (API Testing)
  • Multer + Cloudinary (File uploads)
  • RESTful API routing

πŸ“Έ Snippets Of Our Website

Screenshots are stored in the repo under /ReadMeImages. Landing Page

Student Dashboard

Gym Schedule

Wallet View

Admin Workspace


✨ Features

πŸ‘¨β€πŸŽ“ Students / TAs / Staff

  • Browse events
  • Register for events
  • View upcoming/past events
  • Wallet for payments and refunds

πŸ‘¨β€πŸ« Professors

  • Propose workshops & conferences
  • Track approval status
  • Manage their events

🏒 Events Office

  • Create and publish events
  • Approve or reject workshop proposals
  • Manage event categories

πŸ” Admin

  • Manage user roles & permissions
  • Validate identities (students/staff/vendors)
  • Approve external vendors

πŸ› External Vendors

  • Apply for bazaars
  • Upload legal & company details
  • Interact with students

🧩 Code Examples

1. Registered Events API

export const getMyRegisteredEvents = async (req, res) => {
  try {
    const { userId } = req.query;

    const events = await Event.find({ participants: userId })
      .populate("participants", "firstName lastName email")
      .sort({ startDate: 1 });

    if (!events.length) {
      return res.status(404).json({ message: "No registered events found" });
    }

    const now = new Date();
    const upcoming = events.filter((e) => new Date(e.startDate) >= now);
    const past = events.filter((e) => new Date(e.startDate) < now);

    res
      .status(200)
      .json({ message: "Registered events fetched", upcoming, past });
  } catch (error) {
    res
      .status(500)
      .json({ message: "Error fetching events", error: error.message });
  }
};

2. Vendor Loyalty Status

export const getLoyaltyStatus = async (req, res) => {
  try {
    const { vendorId } = req.params;

    const application = await LoyaltyApplication.findOne({ vendor: vendorId });
    if (!application) return res.json({ status: "none" });

    res.json({ status: "applied", application });
  } catch (error) {
    res.status(500).json({ message: "Internal server error" });
  }
};

3. Upcoming Trips API

export const getAllUpcomingTrips = async (req, res) => {
  try {
    const now = new Date();

    const trips = await Trip.find({ endDate: { $gte: now } })
      .sort({ startDate: 1 })
      .lean();

    if (!trips.length)
      return res.status(404).json({ message: "No upcoming trips found" });

    res
      .status(200)
      .json({ message: "Upcoming trips fetched successfully", trips });
  } catch (error) {
    res.status(500).json({ message: "Failed to fetch upcoming trips" });
  }
};

4. Court Slot Booking

export const bookCourtSlot = async (req, res) => {
  const { courtId } = req.params;
  const { startTime, endTime, date } = req.body;

  try {
    const bookingDate = new Date(date);
    const today = new Date();
    today.setHours(0, 0, 0, 0);
    if (bookingDate < today)
      return res.status(400).json({ message: "Cannot book a past date." });

    const court = await Court.findById(courtId);
    const student = await User.findOne({ email: req.user.email });

    const studentName = `${student.firstName} ${student.lastName}`;
    const studentId = student.id;

    let day = court.availability.find(
      (d) =>
        d.date.toISOString().split("T")[0] ===
        bookingDate.toISOString().split("T")[0]
    );
    if (!day) {
      day = { date: bookingDate, timeSlots: [] };
      court.availability.push(day);
    }

    let slot = day.timeSlots.find(
      (s) => s.startTime === startTime && s.endTime === endTime
    );

    if (!slot) {
      day.timeSlots.push({
        startTime,
        endTime,
        isBooked: true,
        bookedBy: { studentName, studentId },
      });
    } else {
      if (slot.isBooked)
        return res
          .status(400)
          .json({ message: "This slot is already booked." });

      slot.isBooked = true;
      slot.bookedBy = { studentName, studentId };
    }

    await court.save();
    res.json({ message: "Court booked successfully!" });
  } catch (err) {
    res.status(500).json({ message: "Error booking court", error: err });
  }
};

πŸ“‘ API Reference

Examples:

GET /trips/upcoming
POST /trips
GET /gymSession/upcoming
PATCH /gymSession/:id
DELETE /gymSession/:id

πŸ§ͺ Tests

Some Postman Tests: Test 1 Test 2 Test 3 Test 4 Test 5


🀝 Contribute

You are welcome to contribute by:

  • Fixing bugs
  • Improving UI/UX
  • Adding validation logic
  • Suggesting new event categories

πŸ“š Credits

  • MongoDB Docs
  • Express.js Docs
  • StackOverflow
  • React Docs
  • YouTube (Traversy Media, Net Ninja)

πŸ“„ License

Apache 2.0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages