Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

216 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

University Schedule Management System

A full-stack MERN platform for managing university schedules, advising workflows, course offerings, and academic finances.

License Version PRs Node


Table of Contents


Overview

The University Schedule Management System is a full-stack web application that centralizes how universities handle course registration, academic advising, schedule building, and student finances.

It replaces the fragmented mix of spreadsheets, email threads, and manual advisor effort with a single platform that enforces academic rules automatically — prerequisites, credit-hour limits, probation allowances, seat capacity, timetable clashes, and deadlines.

Who it's for

Role What they get
Student Weekly schedule, course swaps, slot-change requests, wallet, payments
Advisor Assigned-student roster ("My Students"), draft schedule builder, validation engine, graduation planning
Coordinator Review queues, approval workflows, financial oversight
Administrator Course catalogue, offerings, terms, user management

UI/UX Principles

The UI/UX workshop slides expand on these principles:

  • Design around the user's journey. Identify who is using a screen, their goal, what they need to know, and the next step—not just the list of requirements.
  • Make hierarchy and consistency deliberate. Use one clear primary action per area, cards for independent items rather than decoration, and shared design tokens for color, type, spacing, and shape.
  • Reveal complexity progressively. Prioritize frequent controls, keep less-used options easy to find, and make important actions discoverable without relying on hover.
  • Fit the layout to the task and device. Group form fields with useful examples; give complex work room; adapt schedules and dense data for their purpose instead of simply shrinking desktop layouts.
  • Design beyond the happy path. Provide clear loading, success, conflict, and error feedback, and tell users what happened and what they can do next.
  • Use AI as a collaborator. Give it the user, goal, requirements, and constraints; compare alternatives and trade-offs; justify the choice; reuse the design system; and verify real scenarios. The designer owns the decision.

Motivation

Universities manage thousands of students across multiple faculties, majors, and semesters. Registration, advising, and scheduling are typically spread across disconnected tools — causing mistakes, delays, and endless back-and-forth between students and advisors.

This project solves that by providing:

  • A single source of truth for courses, offerings, and schedules
  • Automated enforcement of academic rules and deadlines
  • Role-aware workflows for students, advisors, coordinators, and admins
  • Full auditability of every scheduling action
  • Integrated finance for extra hours, payments, and refunds

The result is faster advising, fewer errors, and complete visibility for everyone involved.


Screenshots

Login Weekly Schedule
Login Schedule
Course Catalogue Advising Draft
Catalogue Advising
Coordinator Dashboard
Dashboard

A short screen recording of the full flow is available at ./docs/demo.mp4.


Tech Stack

Frontend

  • React — component-based UI
  • Vite — fast dev server & bundler
  • TypeScript — type safety across the client
  • Tailwind CSS — utility-first styling
  • Bootstrap — grid & responsive helpers
  • styled-components — scoped component styling
  • HTML5 + CSS3 — semantic markup, custom theming

Backend

  • Node.js — runtime
  • Express.js — REST API
  • JWT + bcrypt — authentication & password hashing
  • Zod / express-validator — request validation

Database

  • MongoDB — document store
  • Mongoose — ODM, schemas, transactions

Tooling

  • Git + GitHub — version control, PRs, protected main
  • Postman — API testing collection
  • Jest + Supertest — unit & integration tests
  • VS Code — editor

Features

Authentication & Users

  • GUC email + password login (no sign-up)
  • Role-based access control (Student, Advisor, Coordinator, Administrator)
  • One-time password reset via email
  • Role-scoped profile views
  • In-app notifications with mark-as-read

Academic Administration

  • Course catalogue CRUD (code, name, credits, type, faculty/major, prerequisites)
  • CSV bulk import with row-level validation and atomic rollback
  • Academic term creation with registration/advising deadlines
  • Course offerings with lecture/tutorial/lab slot groups
  • Offering duplication across terms
  • Publish/unpublish offerings
  • Standard schedule template creation per major/semester/group

Scheduling

  • Weekly calendar view (course code, name, slots, rooms, instructors)
  • Registered courses with credit hours
  • Slot details per course
  • PDF download/print of processed schedule
  • Eligible whole-schedule swap groups
  • Swap request submission, completion, withdrawal, expiry
  • Slot-change requests with advisor/coordinator approval

Advising Workflow

  • Advisor assignment and reassignment
  • Draft schedule creation with preferences
  • Mandatory course selection & removal requests
  • Validation engine (prerequisites, clashes, capacity, credit limits)
  • Ready for Review → Process → Reopen lifecycle
  • Graduation plans across the next Winter, Spring and Summer terms, with prerequisite ordering, private Advisor drafts, and Coordinator review, acceptance or rejection with a response note
  • Graduation-plan credit-hour limits follow the student's semester allowance from req 59 (34 for semesters 3-4, 30 for 5-6, 28 for 7, 24 from 8 on, minus 25% rounded up on probation), one limit per plan term
  • Exit-exam requests for a student's single remaining failed course, including Coordinator approval or rejection and a response visible to the Advisor and the student
  • Accepted graduation plans visible to the Advising Student
  • Exit exam request flow

Financial

  • Wallet balance and transaction history
  • Extra-hours request → approval → settlement
  • Pay now (wallet or sandbox gateway) or defer to installment
  • Refund and cancellation flow
  • Financial records list, search, filter, export

Reporting & Audit

  • Coordinator pending-work dashboard
  • Schedule activity history (auto-recorded)
  • Search, filter, export audit logs
  • Notifications for every workflow event

Student Directory (Coordinator / Administrator / Advisor)

  • Every GUC student with their workflow status, blocking step and last update
  • Search by student ID, full name or GUC email
  • Filter by type, advisor, major, semester, standing, status, blocking step, account
  • Open one student's full details from the results
  • Administrator can activate or deactivate an account
  • An Advisor gets the same list, drawer and filters, but scoped server-side to the students assigned to them — the scope is applied after the query is built, so ?assignedAdvisor= cannot widen it, and the detail route rejects any student who is not assigned to the signed-in advisor. Advisor assignment, directory statistics and the advisor dropdown stay Coordinator/Administrator only.

Integrations

  • Google Calendar sync via OAuth (configured is read from the env; each student connects their own Google account once, then syncs a processed schedule)
  • Email notifications over Gmail SMTP (reset codes, password changes, advisor add/remove)
  • Extra-hours payments through Stripe hosted checkout, wallet balance or deferral to the next installment, with refunds and a webhook for gateway results

Project Structure

university-schedule-management/
├── src/                        # React + Vite frontend (TypeScript)
│   ├── components/
│   │   ├── ui/                 # Card, Badge, Select, Button, Input, Alert, ...
│   │   ├── AppLayout.tsx       # Sidebar + content shell
│   │   ├── RouteGuards.tsx     # Auth and role guards
│   │   └── Sidebar.tsx
│   ├── hooks/                  # useSession (shared, cached)
│   ├── lib/                    # api.ts (fetch wrapper), types, services
│   ├── pages/                  # Route-level pages
│   ├── index.css               # Inter @font-face, .app-gradient
│   └── main.tsx                # Routes
├── server/                     # Express + Node backend
│   ├── config/                 # env bootstrap, seed data
│   ├── controllers/            # Route handlers
│   ├── middleware/             # Auth + role guards
│   ├── models/                 # Mongoose schemas
│   ├── routes/                 # Express routers
│   ├── services/               # Query building, workflow status
│   └── server.js
├── seed/                       # MongoDB seed scripts
├── scripts/                    # setup-env.mjs
├── postman/                    # Postman collection + env
├── docs/                       # Diagrams, screenshots, docs
├── tests/                      # Jest + Supertest
├── .env.example
├── package.json
└── README.md

Installation

# 1. Install dependencies for the frontend and the backend
npm install
npm install --prefix server

# 2. Create any missing env files (.env and server/.env).
#    This also generates a JWT secret and a local MongoDB connection string.
npm run setup

npm run setup never overwrites existing files. To point at MongoDB Atlas instead of a local database, edit MONGODB_URI in server/.env.

Running the app

The client and server are two separate processes:

# Run 1 - API server (http://localhost:5000 by default)
npm run dev:server

# Run 2 - Vite dev server (http://localhost:5173)
npm run dev:client

Or start both at once with prefixed logs:

npm run dev

By default the Vite dev server proxies /api/* to VITE_API_PROXY_TARGET, so the app calls relative URLs in development and there is no CORS setup to maintain. Keep that value in sync with PORT in server/.env.

If the two processes are on different machines — the client under WSL and the API on Windows, for example — the proxy cannot be used, because WSL has no route to the Windows host. Set an absolute VITE_API_URL instead and the browser talks to the API directly; the server already sends permissive CORS headers:

# .env
VITE_API_URL=http://localhost:8000

Database seeding

The server seeds only when the database is empty. A first run against a fresh database populates it; every run after that is left exactly as it is, so restarting the server — or saving a file, which makes nodemon restart it — never destroys data.

To wipe and rebuild the demo data on purpose:

node seed/seed.cjs

The same rebuild is reachable by an Administrator at GET /api/auth/seed.

To confirm both halves of that against a throwaway database — a fresh one gets seeded, a populated one is left alone, and the wipe route stays shut for everyone else — run:

node scripts/verify-seed-guard.cjs

Seeded logins:

Role Email Password Why this account exists
Advisor mona.adel@guc.edu.eg password123 Holds advising students
Advisor karim.fahmy@guc.edu.eg password123 Holds advising students
Advisor advisor@guc.edu.eg password123 Holds advising students
Advisor hind.rashwan@guc.edu.eg password123 No assigned students, so Remove advisor can succeed
Advisor meriam.khalifa@guc.edu.eg password123 Additional seeded Advisor account
Coordinator coordinator@guc.edu.eg password123 Primary coordinator
Coordinator rania.hosny@guc.edu.eg password123 Spare account, so Add advisor has something to promote without destroying a demo login
Administrator admin@guc.edu.eg password123 Full access, and the createdBy on every term and course

Every student in the directory also gets a login account — passwords follow FirstnameLastname2006:

Student type Email Password
Normal samy.elgedaily@student.guc.edu.eg SamyElgedaily2006
Normal mariam.fouad@student.guc.edu.eg MariamFouad2006
Normal zeyad.tarek@student.guc.edu.eg ZeyadTarek2006
Normal farida.wagdy@student.guc.edu.eg FaridaWagdy2006
Normal youssef.kamal@student.guc.edu.eg YoussefKamal2006
Advising laila.hassan@student.guc.edu.eg LailaHassan2006
Advising omar.nabil@student.guc.edu.eg OmarNabil2006
Advising salma.ibrahim@student.guc.edu.eg SalmaIbrahim2006
Advising rana.adel@student.guc.edu.eg RanaAdel2006
Advising ahmed.sherif@student.guc.edu.eg AhmedSherif2006
Advising hana.mahmoud@student.guc.edu.eg HanaMahmoud2006
Advising mariam.said@student.guc.edu.eg MariamSaid2006
Advising tamer.lotfy@student.guc.edu.eg TamerLotfy2006
Advising karim.emad@student.guc.edu.eg KarimEmad2006
Advising nour.elsayed@student.guc.edu.eg NourElsayed2006
Advising dina.mostafa@student.guc.edu.eg DinaMostafa2006
Advising hassan.rifaat@student.guc.edu.eg HassanRifaat2006
Advising yasmin.adly@student.guc.edu.eg YasminAdly2006

youssef.kamal@student.guc.edu.eg is seeded deactivated in both the directory and the login record, so his login is rejected with "account is currently inactive" — useful for exercising that path.

What the seed guarantees

The dataset is built so that no screen, filter or action is decorative:

  • 18 students cover all 15 workflow statuses (every status the filter offers matches at least one row), all 3 academic standings including Dismissed, both student types, both account states, all 8 semesters, and both majors the catalogue actually serves.
  • Every student has a login account with the same email and the same isActive flag, so the profile join never falls back to "Not set" and a deactivated student really cannot sign in.
  • All 13 Advising Students have a study group named for their current semester (1st Semester through 8th Semester), so advisor grouping is populated for the evaluation.
  • Two advising students have no advisor, so first-time assignment and the Unassigned filter have a target; the rest are spread over three advisors so reassignment and the advisor filter have options. One advisor deliberately has none, because Remove advisor refuses to run while students are assigned.
  • 3 terms (one closed, the current one, one ahead) with 33 course offerings — a mix of Published and Draft — and 87 lecture/tutorial/lab slots on a grid that cannot trip the instructor or room conflict rules. Three current-term tutorial groups are filled to their exact seat count so the seat meter, the Full badge and "no seats left" pickers all have content.
  • 75 courses with prerequisites linked by id (no dangling codes, no cycles), so the prerequisite picker and the Required by panel both have content. DMET 502 appears once in the catalogue with its DMET semester 5 placement and a Computer Science semester 7 override, matching both curriculum entries.
  • 205 schedule rows spanning no schedule, incomplete and complete drafts, review-ready and processed schedules, plus 2 saved advising drafts so the draft editor opens on real courses instead of writing a migration row on first read.
  • 5 graduation plans: 3 Draft, 1 Submitted and 1 Accepted. Drafts are visible only to their creating Advisor; Coordinators see submitted and accepted plans, and the Advising Student sees only their accepted plan.
  • 12 slot-change requests: 9 Pending, 1 Approved (moved into a newly published second lecture group), 1 Rejected (single-group course) and 1 Withdrawn — every review decision and every student-history status has a row.
  • 2 exit-exam requests: 1 Pending and 1 Approved.
  • 10 extra-hours requests: Rejected, Withdrawn, 2 Pending, Paid (wallet), Deferred, Refunded, failed gateway, and 2 Approved but awaiting a payment choice — one student has enough wallet balance, the other has none.
  • 5 swap requests: Open, Completed, Withdrawn and Expired, including two Open requests whose course sets match exactly.
  • 11 schedule-history records across 8 students, 2 actions, 3 staff roles and 5 staff members, with fixed staggered dates — enough for the search, action/date filters and CSV export to be demonstrated.
  • 86 notifications, written from the state above rather than from a fixed script: a student's notifications match their workflow status, an inactive student is not told they can sign in, an advisor's message names their actual students, and the Coordinator/Administrator counts are computed off the records. Every account has at least one unread and one read row, so both mark as read and mark all as read work everywhere.

Prepared demo cases

All of these are in the shared database after node seed/seed.cjs. The exact same rows are produced by a fresh seed; node scripts/verify-seed-state.cjs proves it and node scripts/audit-demo-rules.cjs checks the app's own rules.

Login Screen What is ready to demonstrate
coordinator@guc.edu.eg Slot-change review Approve one of 9 Pending requests; filter for the existing Approved, Rejected and Withdrawn rows
coordinator@guc.edu.eg Extra-hours review / finance Rana Adel's Pending request to decide; 10 requests and 4 payment/deferred records across all states
mona.adel@guc.edu.eg Advising students Laila Hassan — probation, Approved mandatory-course removal, Approved exit exam and an Approved slot change
advisor@guc.edu.eg Advising students Ahmed Sherif — probation with a failed mandatory course, a Pending exit exam and a Draft graduation plan
karim.fahmy@guc.edu.eg Advising students Hana Mahmoud — bachelor-project eligible, Draft graduation plan, Deferred extra-hours charge and an approved request awaiting payment from a well-funded wallet
omar.nabil@student.guc.edu.eg My extra hours Approved request awaiting payment with zero wallet balance, so the insufficient-funds path is reachable
rana.adel@student.guc.edu.eg My extra hours An approved request already refunded to her wallet (the Pending and Rejected requests are in the Coordinator's review queue)
yasmin.adly@student.guc.edu.eg / mariam.said@student.guc.edu.eg Graduation plans Submitted and Accepted plans respectively; three Draft plans are visible to their Advisors
karim.emad@student.guc.edu.eg / yasmin.adly@student.guc.edu.eg / nour.elsayed@student.guc.edu.eg Schedule activity history Processed and Reopened entries across 8 students, 3 staff roles and 11 dates — filter, search and export all return rows
samy.elgedaily@student.guc.edu.eg / mariam.fouad@student.guc.edu.eg Schedule swaps Two Open requests with identical course sets, so accepting one completes a real swap; Zeyad, Farida and Youssef supply Completed, Withdrawn and Expired rows
dina.mostafa@student.guc.edu.eg Weekly schedule No schedule at all (Not Started)
omar.nabil@student.guc.edu.eg Advising schedule draft An incomplete saved draft backed by Draft schedule rows
nour.elsayed@student.guc.edu.eg Advising schedule draft A Reopened draft with two saved courses and a history reason
karim.emad@student.guc.edu.eg / yasmin.adly@student.guc.edu.eg Weekly schedule Processed schedules
laila.hassan@student.guc.edu.eg / salma.ibrahim@student.guc.edu.eg / hassan.rifaat@student.guc.edu.eg Weekly schedule Review-ready schedules, with slot-change requests already attached

The Winter term's swap deadline is set to the advising deadline, so the seeded Open requests stay open while the demo runs. Visiting the extra-hours screen triggers the app's idempotent notification backfill (+6 rows); run node seed/seed.cjs before taking a fresh evaluation snapshot. Calendar sync, outbound email and Stripe are configured through server/.env; a real calendar connection still needs a one-off Google OAuth sign-in from the student account.

Troubleshooting

"…needs a database that supports transactions (a replica set)…" — scheduling workflows (slot-change submissions and decisions, processing, reopening) use MongoDB transactions, which a standalone local mongod cannot run. Atlas is already a replica set. Locally, start MongoDB as a single-node replica set and initiate it once (existing data is kept; MONGODB_URI does not change):

mongod --config /opt/homebrew/etc/mongod.conf --replSet rs0   # or add replication.replSetName: rs0 to mongod.conf
mongosh --eval 'rs.initiate({_id:"rs0",members:[{_id:0,host:"127.0.0.1:27017"}]})'

ECONNREFUSED 127.0.0.1:27017 from WSL — MongoDB is installed on Windows and binds to Windows' loopback, which WSL cannot reach unless mirrored networking is enabled. Either enable it in %UserProfile%\.wslconfig:

[wsl2]
networkingMode=mirrored

then run wsl --shutdown from PowerShell, or start the server with the Windows Node binary (node.exe server.js) so it shares Windows' network stack.

http proxy error: /api/... connect ECONNREFUSED 127.0.0.1:8000 — the dev server is proxying to an API it cannot route to. This is the same WSL-to-Windows networking gap as above. Set VITE_API_URL in .env to the API's absolute URL so the browser calls it directly instead of through the proxy.

Environment Variables

server/.env

Variable Default Description
PORT 5000 Port the API listens on
MONGODB_URI mongodb://127.0.0.1:27017/university_schedule Local DB or Atlas mongodb+srv:// URI
JWT_SECRET generated Secret used to sign session tokens
NODE_ENV development Runtime mode
MAIL_USER engineeringvictims1@gmail.com Gmail address that sends outbound email
MAIL_PASS — 16-char Gmail App Password (not the account password). Blank disables email
STRIPE_SECRET_KEY / STRIPE_WEBHOOK_SECRET — Stripe test keys for hosted extra-hours checkout and the webhook
PAYMENT_APP_ORIGIN http://localhost:5173 Client origin Stripe returns to after checkout
GOOGLE_CALENDAR_CLIENT_ID / GOOGLE_CALENDAR_CLIENT_SECRET / GOOGLE_CALENDAR_REDIRECT_URI — Google OAuth client used by calendar sync
CALENDAR_TOKEN_KEY — Key used to encrypt stored calendar refresh tokens

.env (client)

Variable Default Description
VITE_API_PROXY_TARGET http://localhost:5000 Dev-only proxy target for /api
VITE_API_URL empty Absolute backend URL for production builds
CLIENT_PORT 5173 Port for the Vite dev server

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages