Aug — Sep 2026 · ITE 204 Java EE course project

UniTRS

A university management system for The University of Cambodia

UniTRS runs a university term from start to finish. Students register and enroll in classes, professors take attendance and enter grades, deans plan courses and schedules, and admins approve new accounts. It follows The University of Cambodia's academic model and installs on a phone like an app.

user roles
4
MySQL tables
15
lines of Java
6.4k
JSP views
22

01The problem

Why we built it

Our ITE 204 course asked us to build a real Jakarta EE application, so we picked something we deal with every day as UC students: running a term. Attendance sheets, grade books and schedules usually live in different places. We put every role in one system, and made the official attendance register come straight out of it instead of being typed up by hand.

02Screens

One dashboard per role

Every role gets its own server-rendered JSP dashboard. Pick one to see what it shows and the Java classes behind it.

unitrs · /ums/auth/register
<RegisterForm />
<StudentIdField />
<SchoolSelect />
<OtpVerify />

Students sign up with their UC student ID, school and gender, then confirm their email with a six-digit code.

Data

  • AuthController
  • OtpService
  • POST /auth/register

03How it's built

Follow one request

UniTRS is one Jakarta EE app on Tomcat, with server-rendered JSP pages and a MySQL database. Scroll to follow a request through every layer.

01 / 06 · The user

A professor opens today's class

UniTRS runs in the browser or as an installed app on the phone. On mobile the dashboard switches to a bottom navigation bar and action sheets.

GET /ums/professor/dashboard

Follow one request

Jakarta EE app · Tomcat 11/ums

Zooming in on the app

One WAR file, split by job

ums.war · Jakarta EE14 modules · 1 MySQL

  • Login & OTP
  • Accounts & approval
  • Schools & deans
  • Courses
  • Terms
  • Rooms
  • Class sections
  • Term registration
  • Enrollment
  • Attendance
  • Grades
  • Excel export
  • Holidays & make-up classes
  • Reports
  1. Maven build
  2. ums.war
  3. Docker
  4. Railway

04Features

What each role can do

  • Students: register

    Sign up with a UC student ID (60-24-04-91 format), confirm the email with a code, then wait for an admin to approve the account.

  • Students: enroll

    Request a term, see open classes with seats left, and view the week as a timetable grid or a table.

  • Students: grades

    A live transcript with letter grades, term GPA, cumulative GPA and credits earned, plus a digital student ID card.

  • Professors: attendance

    Mark each session Present, Absent, Late or Excused, cancel a session, or add a make-up class when a session falls on a holiday.

  • Professors: grading

    Enter attendance (10%), assignments (20%), midterm (30%) and final (40%). The server works out the total, letter grade and GPA points.

  • Official Excel register

    Export attendance as the university's own paper format, in Khmer and English, ready to print on A4. One class or all classes at once.

  • Deans: plan the term

    Create courses, group them into terms, add rooms, schedule class sections by shift and assign professors.

  • Admins: approve and manage

    Review new student sign-ups, approve them (which sends an email), manage every account and appoint deans to schools.

  • Works like a phone app

    Installs to the home screen on iPhone and Android, has a bottom navigation bar on mobile and shows an offline page with no connection.

05Tech stack

What it's built with

Backend

  • Java 17
  • Jakarta EE 10
  • Jakarta Servlets & Filters
  • JSP + JSTL
  • Raw JDBC (DAO pattern)
  • Lombok
  • jBCrypt

Frontend

  • JSP views
  • Bootstrap 5.3
  • Vanilla CSS & JS
  • Sonner toasts
  • QR code generator
  • PWA (manifest + service worker)

Data & services

  • MySQL 8
  • Apache POI (Excel)
  • Resend (email)

Delivery

  • Maven
  • Apache Tomcat 11
  • Docker
  • Docker Compose
  • Railway

06Under the hood

How a few parts work

Signing in with a one-time code

  1. 1The server makes a six-digit code with SecureRandom and stores it in MySQL with a 10-minute expiry. Any older unused code for that email is cancelled first.
  2. 2Resend emails the code. The same flow is used for sign-up, two-factor login and password reset.
  3. 3A new code can only be requested once every 60 seconds.
  4. 4After five wrong tries the code stops working, so it can't be guessed.

Keeping each role in its own area

  1. 1One servlet filter runs before every request.
  2. 2Login pages, static files and the PWA files are open to everyone. Anyone else without a session is sent to the login page.
  3. 3/admin, /dean, /professor and /student only open for the matching role, so a student can't reach a professor page by typing the URL.
  4. 4A professor who is also a dean can open both areas.

Enrolling without overbooking a room

  1. 1Enrollment is a single INSERT … SELECT that only adds the student while the class has fewer students than the room's capacity.
  2. 2Because the check and the insert happen in one statement, two students can't both take the last seat.
  3. 3Every query uses PreparedStatement, so input can't change the SQL.

07Shipping

From laptop to Railway

  1. 01Maven builds the app into one WAR file, ums.war.
  2. 02A Docker image packages it with Tomcat, and Docker Compose starts it next to MySQL 8 for local work.
  3. 03A credentials loader reads database settings from environment variables first (including Railway's MySQL variables), then a local file, then the defaults.
  4. 04That let the same build run on our laptops and on Railway without changing code.

08My role

What I built

We were three students. I wrote most of the commits and built these parts from start to finish:

  1. 01

    Login and security

    Login and roles, the authentication filter, BCrypt passwords, email one-time codes for sign-up, two-factor login and password reset, and the admin approval flow.

  2. 02

    The role dashboards

    The student, professor and dean modules: enrollment and term registration, attendance, grading, courses, rooms, scheduling and holidays with make-up classes.

  3. 03

    Official Excel register

    The Apache POI exporter that prints attendance in UC's own bilingual paper format, for one class or every class at once.

  4. 04

    Mobile app and deployment

    The PWA (install prompt, service worker, offline page), the mobile layouts, the Docker setup and the Railway database config.

UniTRS was built for ITE 204 (Java Enterprise Edition) at The University of Cambodia by Hor Tongan, Ly Senghuy and me. Hor Tongan set up the base app, models and first grade calculator, and Ly Senghuy designed the landing page.