Repository navigation
Build System Upgrade with Persistent Leaderboard Support
๐ ๏ธ Release: Maven Build, Batch Scripts & Improved Leaderboard Storage
This release introduces full Maven support, Windows batch files for easier launching, and a redesigned leaderboard storage system that now saves to a user directory on the host machine, improving persistence and portability.
โจ What's New
๐งฉ General
- โ
Maven-based build system (
pom.xmlincluded) - ๐ฆ Clean build artifacts inside
target/folder - ๐ป Batch files (
run_app.bat,run_server.bat) for quick execution with proper JavaFX paths - ๐ Leaderboard file (
leaderboard.txt) now saved under user-specific directory, e.g.:C:\Users\<username>\QuizAppData\leaderboard.txton Windows
๐ฎ Quiz App Features
- ๐ง 10-question quiz with randomized selection
- โฑ๏ธ Countdown timer with animated progress bar and color transitions (green โ orange โ red)
- ๐ถ Background music that loops during the quiz
- โธ๏ธ Pause menu (press
ESCor pause button) - ๐๏ธ GIF background (
pause.gif) - ๐จ Themed buttons: Resume, Restart, Quit
- โ Answer feedback with correct/incorrect highlighting
- ๐ Responsive layout for different screen sizes
- ๐ญ Custom fonts and JavaFX styling for immersive UI
๐ฅ๏ธ Server Features
- ๐ Leaderboard server that listens for client connections on port
12345 - ๐ฅ Accepts and processes score submissions from quiz clients
- ๐ Sends top 3 leaderboard entries back to clients
- ๐ฅ Displays connected clients in real-time
- ๐งต Handles multiple clients concurrently using threads
- ๐พ Saves leaderboard to user-specific directory for persistence
- ๐ช JavaFX GUI to start/stop the server, view logs, and track activity
๐ Project Structures
๐ quiz_app/ Project Structure
quiz_app/
โโโ .vscode/ # VSCode config files
โโโ lib/ # JavaFX JAR libraries
โโโ src/
โ โโโ main/
โ โ โโโ java/
โ โ โ โโโ bhargav/
โ โ โ โโโ App.java # Entry point
โ โ โ โโโ client/ # Client networking code
โ โ โ โโโ quiz/ # Quiz logic and GUI
โ โ โโโ resources/
โ โ โโโ audio/ # Background music
โ โ โโโ gifs/ # GIF backgrounds
โ โ โโโ images/ # UI images
โ โ โโโ txt/ # Question banks and fallback leaderboard
โ โ โโโ videos/ # Optional media
โ โโโ test/
โ โโโ java/
โ โโโ bhargav/
โ โโโ TestQuiz.java # JUnit tests
โโโ target/ # Compiled output (via Maven)
โ โโโ quiz_app-1.0-SNAPSHOT.jar
โโโ run_app.bat # Batch script to run the quiz app
โโโ pom.xml # Maven build file
โโโ UML.png # UML class diagram
โโโ README.txt # Project documentation
๐ server_app/ Project Structure
server_app/
โโโ src/
โ โโโ main/
โ โโโ java/
โ โ โโโ bhargav/
โ โ โโโ Server.java # Entry point to launch server GUI
โ โ โโโ server/
โ โ โโโ LeaderboardServer.java # Handles server logic, client threads
โ โ โโโ LeaderboardServerGUI.java# GUI for controlling server
โ โโโ resources/ # (Optional) Resource folder if needed
โโโ target/
โ โโโ server_app-1.0-SNAPSHOT.jar # Compiled server JAR
โโโ run_server.bat # Batch script to launch server with JavaFX
โโโ javafx-sdk-23.0.2/ # JavaFX SDK required for runtime
โโโ README.txt # Project documentation
๐ฆ How to Build
You can build both projects using Maven:
mvn clean packageThe compiled .jar files will appear in the target/ directory of each project.
๐ How to Run
๐น Run Quiz App
run_app.bat๐น Run Leaderboard Server
run_server.batEnsure your environment has the JavaFX SDK properly set up, or the batch files include the correct module paths.
๐ Leaderboard Data Storage
Leaderboard files are now stored in a directory like:
Windows: C:\Users\<username>\QuizAppData\leaderboard.txt
macOS/Linux: /home/<user>/QuizAppData/leaderboard.txt
This avoids overwriting files in resources/ and ensures persistence.
๐ License
This project uses JavaFX and other dependencies under their respective licenses. See the javafx-sdk-23.0.2/legal/ folder for details.
๐ Support
Open an issue on this repository for bugs, suggestions, or questions.