ScarletQueue

A real-time classroom queue management system for instructors and students. Instructors can run lecture sessions and answer student questions in real time and in order. Students can join instructor sessions, book their seats and submit questions from an interactive seating chart. The purpose of this application is to streamline the process of asking & answering questions during lectures (especially lectures of larger sizes) and to encourage classroom participation overall.


Tech Stack

Layer Technology
Frontend React 19, React Router 7
Real-time STOMP over SockJS (WebSocket)
Backend Spring Boot 4, Java 21
Database PostgreSQL (via Spring JDBC)

Features

Instructor

  • Start a named session for a lecture hall
  • View a live seating chart showing which seats are booked and which have pending questions
  • Answer student questions with a typed response or mark them as "Answered Live"
  • End the session, then review all questions asked with a Save as PDF option

Student

  • Join an active session by Net ID
  • Book a seat on the seating chart
  • Submit questions which are added to a numbered queue
  • View all questions and answers in real time (read-only)

Welcome Page

  • View a list of all past sessions (most recent first) with instructor name and date/time
  • Save any past session's questions and answers as a PDF

Project Structure

ScarletQueue/
├── frontend/                        # React app
│   └── src/
│       ├── pages/
│       │   ├── WelcomePage/         # Role selection + past sessions
│       │   ├── InstructorStartSession/
│       │   ├── StudentJoinSession/
│       │   └── SeatingChart/        # Main session page
│       ├── components/
│       │   ├── Modals/
│       │   │   ├── AskQuestion/
│       │   │   ├── AnswerQuestion/
│       │   │   ├── SessionEnded/
│       │   │   ├── SessionQuestionsReview/
│       │   │   └── PastSessionsModal/
│       │   ├── QuestionDrawer/
│       │   └── SeatGrid/
│       └── utils/
│           └── websocket.js         # STOMP client singleton
│
└── backend/scarlet-queue/           # Spring Boot app
    └── src/main/java/com/owk2/scarletqueue/
        ├── controller/              # REST + WebSocket endpoints
        ├── dao/                     # DAO interfaces
        ├── daoimpl/                 # JDBC implementations
        ├── model/                   # Session, Questions, SeatBooking
        ├── constants/               # SQL query strings
        └── config/                  # CORS + WebSocket config

Running Locally

Prerequisites

  • Node.js 18+
  • Java 21
  • PostgreSQL (running locally)

Backend

cd backend/scarlet-queue
./mvnw spring-boot:run

Runs on http://localhost:8080

Frontend

cd frontend
npm install
npm start

Runs on http://localhost:3000


Key API Endpoints

Method Endpoint Description
POST /api/sessions/start Start a new session
GET /api/sessions/active List active sessions
GET /api/sessions/past List past (ended) sessions
PUT /api/sessions/end/{sessionId} End a session
GET /api/questions/session/{sessionId} All questions for a session
GET /api/questions/session/{sessionId}/pending Pending questions only
PUT /api/questions/{questionId}/answer Answer a question
PUT /api/questions/{questionId}/answered-live Mark as answered live

WebSocket Topics

Topic Description
/topic/seats Seat booking updates
/topic/questions New question submitted
/topic/question-answered Question answered (carries questionId + seatId)
/topic/session-ended/{sessionId} Session ended notification for students
/topic/sessions Updated active session list
Share this project:

Updates