May — Jun 2026 · KSHRD 14th Gen final project · Full stack

HRD EventHub

A community & events platform for KSHRD students and alumni

HRD EventHub keeps every generation of KSHRD students and alumni in one place. Members join their generation's workspace, read announcements and articles, register for events, pay with Bakong KHQR, check in with a QR ticket, answer polls and surveys, endorse each other and chat in real time. Organizers run it all from one dashboard. It is a Next.js web app on top of a Spring Boot API, and I worked on both.

REST endpoints
163
lines of Java
18k
TypeScript files
460
team commits
1.4k+

01The problem

Why we built it

Each new KSHRD generation lost touch with the ones before it. Events, announcements and sign-ups were spread across chat groups, payments for events were tracked by hand, and organizers had no reliable way to know who actually showed up. We wanted one platform where students and alumni from every generation can stay connected, and where an event can go from announcement to payment to check-in without leaving it.

02Frontend

Inside the UI

The main screens of the Next.js app and the components each one is built from. Pick a screen to see its layout and where its data comes from.

hrdevent.app
<Navbar />
<HeroSession />
<PlatformEssentials />
<FeatureCard />
<MediaListSection />
<Footer />

Landing page for visitors with an animated hero and a diagram of the platform's six essentials: payments, event management, roles, notifications, surveys and engagement.

Data

  • framer-motion
  • proxy.ts → /group when signed in

03How it's built

Follow one request

EventHub is one Next.js app talking to one Spring Boot API in front of PostgreSQL, with Redis and a few outside services around it. Scroll to follow a request through every layer.

01 / 07 · The user

A member opens their workspace

Everything starts in the browser, on a laptop or a phone. On small screens the sidebar turns into a bottom navigation bar and the feed splits into tabs.

GET hrdevent.app/group/{workspaceId}

Follow one request

Spring Boot API · one app/api/v5

Zooming in on the API

One app, split by feature

hrd-eventhub-api · Spring Boot20 modules · 1 PostgreSQL

  • Auth & OTP
  • Users & roles
  • Profiles
  • Generations
  • Workspaces
  • Invitations
  • Posts & feed
  • Comments
  • Reactions
  • Event tickets
  • Payments
  • Polls
  • Surveys
  • Endorsements
  • Chat
  • Presence
  • Notifications
  • Telegram
  • Files
  • Universities
  1. Maven build
  2. Docker image
  3. Jenkins
  4. Docker Compose on server

04Features

What you can do on EventHub

  • Accounts & sessions

    Register with an emailed OTP, log in with a JWT, stay signed in with rotating refresh tokens and remember me, and reset a forgotten password.

  • Roles

    Admins, organizers, alumni and students each get their own permissions. Admins can change roles and suspend or reactivate members.

  • Generations

    Members are grouped by cohort. At the end of a year, one rollover call closes the current generation and opens the next.

  • Workspaces & invitations

    Workspaces for each community, joined through expiring invite links that preview the workspace before you join.

  • Posts & feed

    Events, announcements and articles with drafts, scheduled publishing, pinning, @mentions and a public share link.

  • Comments & reactions

    Threaded replies and five reactions on posts and comments, from “like” to “thank you”.

  • Event tickets

    Registering for an event issues a QR ticket by email. Organizers scan it at the door and watch attendance update live.

  • Bakong KHQR payments

    Paid events generate a Bakong KHQR code, confirm the payment with Bakong and keep a full transaction history.

  • Real-time chat & presence

    One-to-one chat with file uploads over WebSocket, plus online and offline status for every member.

  • Polls, surveys & endorsements

    Text or date polls with rules for when results show, surveys with tracked responses, and endorsements between alumni.

  • Notifications

    In-app notifications, plus a Telegram bot members link to their account for direct alerts and workspace channel posts.

  • Profiles

    Profile photo, CV upload, university, current status (studying, working or job seeking) and a setting for how much others can see.

  • Organizer dashboard

    Organizers create, edit, publish and close posts, polls and surveys, see each event's attendees and browse every transaction with totals per event.

  • Calendar

    Every event from the member's workspaces on a month, week or day calendar, next to a list of what's coming up.

  • Works on phones

    On small screens the sidebar becomes a bottom navigation bar, with a mobile header and tabbed feed, so members can register and scan tickets from their phones.

05Tech stack

What it's built with

Frontend

  • Next.js 16 (App Router)
  • React 19
  • TypeScript
  • Tailwind CSS v4
  • shadcn/ui + Radix
  • NextAuth
  • Zustand
  • SWR
  • React Hook Form + Zod
  • STOMP over SockJS
  • FullCalendar
  • qr-scanner
  • Framer Motion

Core

  • Java 21
  • Spring Boot 4
  • Spring Web MVC
  • Spring Security
  • JJWT
  • MyBatis
  • ModelMapper
  • Lombok
  • Bean Validation

Data

  • PostgreSQL
  • Flyway (44 migrations)
  • Redis (OTP, presence, cache)
  • RustFS (S3-compatible storage)

Real-time & messaging

  • Spring WebSocket (STOMP)
  • Spring Mail + Thymeleaf
  • Telegram Bot API
  • Spring Scheduling

Payments & delivery

  • Bakong KHQR SDK
  • ZXing QR codes
  • springdoc OpenAPI
  • Docker
  • Docker Compose
  • Jib
  • Jenkins

06Under the hood

How a few parts work

Paying for an event with Bakong KHQR

  1. 1The API checks that the event is still open, needs payment and has not already been paid for by this member.
  2. 2It works out the amount: fixed events use the set price, flexible ones take what the member enters.
  3. 3The Bakong KHQR SDK generates a QR with a unique bill number and an expiry time, saved as a pending payment intent.
  4. 4When the app checks the status, the API asks Bakong by the QR's MD5 hash. Once paid, it records the transaction and adds the amount to the event's total raised.
  5. 5A mock mode lets the team test the whole flow without real money.

Checking in at the door

  1. 1Registering issues a ticket token, emailed to the member as a QR code.
  2. 2The organizer scans it. The ticket row is locked, so the same ticket can't be checked in twice at once.
  3. 3Used, cancelled and suspended-member tickets are rejected, and check-in only opens one hour before the event starts.
  4. 4Arrivals after the start are marked late, and members who never arrive show as absent once the event ends.
  5. 5The new count is pushed live over WebSocket, and a confirmation email goes out only after the check-in is saved.

Keeping sessions safe

  1. 1Login returns a short-lived JWT and a refresh token. Only a hash of the refresh token is stored, with the device and IP.
  2. 2Refresh tokens last 7 days, or 30 with remember me.
  3. 3Every refresh revokes the old token and issues a new one linked to it.
  4. 4If a revoked token is ever used again, the API treats it as stolen and signs the user out on every device.

The payment wizard in the app

  1. 1When a member taps Register, the app picks a flow from their role and the event: students register for free, alumni pay the fixed price, and flexible events ask for an amount first.
  2. 2The wizard asks the API for a Bakong KHQR code and shows it with the amount and bill number.
  3. 3While the QR is on screen, it asks the API every 3 seconds whether Bakong has seen the payment.
  4. 4As soon as it is paid, the app confirms the registration and shows a receipt, without the member doing anything else.

Guarding pages by role

  1. 1NextAuth keeps the access and refresh tokens in an encrypted session cookie.
  2. 2Three minutes before the access token expires, the session refreshes it with the API in the background.
  3. 3A Next.js proxy runs before every page. It sends signed-out or expired members to login, and signed-in members away from the login pages.
  4. 4Students and alumni can't open the dashboard, check-in or transaction pages, and only admins can open user management.

Opening a post from a notification

  1. 1Notifications and @mentions arrive over a STOMP WebSocket and show up in the bell straight away.
  2. 2Clicking one opens the right workspace with the post id in the link.
  3. 3The feed scrolls smoothly to that post and opens its comments if the notification was about a comment.
  4. 4If the post has since been deleted, the notification is removed instead of leading to an empty page.

07Shipping

From commit to production

  1. 01The API is packaged as a multi-stage Docker image: Maven builds the jar, a slim Java 21 runtime runs it.
  2. 02Docker Compose runs it alongside PostgreSQL, Redis and RustFS storage.
  3. 03Flyway applies the database migrations in order every time the app starts.
  4. 04A Jenkins pipeline runs the deploy script on the server.
  5. 05Every endpoint is documented in Swagger, which the frontend team built against.
  6. 06The Next.js app ships as its own multi-stage Docker image in standalone mode, run by Docker Compose with a health check and pointed at the API at api.hrdevent.app.

08My role

What I built

I worked on both sides of the project. On the API I owned payments, polls and check-in rules. On the Next.js app I was the most active committer, building those same features end to end along with sign-in, routing and performance.

  1. 01

    Bakong KHQR payments

    API: the Bakong KHQR SDK, payment intents with expiry, status checks and a mock mode. App: the payment wizard that polls for payment and shows the receipt, plus the transaction detail page.

  2. 02

    Ticket check-in

    API: check-in opening one hour before the start, late arrivals and absences. App: the QR scanner with flash toggle, live event status, late tracking and clear error messages.

  3. 03

    Polls

    API: the full poll feature and an endpoint listing who voted for each option. App: inline result bars, a voters modal and opening or closing polls with an optional closing time.

  4. 04

    Sign-in & access

    API: refresh tokens with remember me. App: background session refresh, role-based route guarding, roles read from the profile, account verification and strong password checks.

  5. 05

    Profiles & notifications

    Edit-profile screens for students and admins with skeleton loaders, and notifications that jump to the right post and open its comments.

  6. 06

    Performance

    API: a comment count instead of the full comment list in the feed. App: lazy-loaded components, optimized images, tree-shaken packages and preconnected origins.

HRD EventHub was built by a team of KSHRD 14th Generation students as our final project, with a separate frontend and backend repository. Work was split by feature across both, and the API was documented in Swagger for the frontend team.