A comprehensive JavaFX desktop application for managing dormitory applications, assignments, and resident tracking with MySQL database integration.
- Account registration and login
- Submit dormitory applications
- View application status and admin notes
- Send/receive messages
- Upload required documents
- View assigned building and entry/withdrawal dates
- Review and update application statuses (Approve, Decline, Resubmit)
- Post announcements to all students
- Message students directly
- Search students by ID
- Assign buildings to approved students
- Export student data to CSV
- View students assigned to their building
- Register student entry dates
- Register student withdrawal dates
- Message students in their building
- All admin capabilities
- Add and remove admin and proctor accounts
- Assign buildings to proctors
- Manage system-wide staff
- Java 21 - Core programming language
- JavaFX 21 - Desktop GUI framework
- MySQL - Database (via JDBC)
- HikariCP - Database connection pooling
- Maven - Build and dependency management
This system demonstrates:
- Encapsulation - Private fields with controlled access
- Abstraction - Repository interfaces hiding implementation details
- Inheritance - Student extends User
- Polymorphism - Repository pattern with interchangeable implementations
SOLID Principles:
- SRP - Each class has a single responsibility
- OCP - Extensible through interfaces
- LSP - Student is substitutable for User
- ISP - Focused, specific repository interfaces
- DIP - Service depends on abstractions, not concrete classes
See SOLID_PRINCIPLES.md for detailed documentation.
sudo apt-get install mysql-servermysql -u root -p < src/main/resources/sql/simple_schema.sqlThis creates:
- Database:
dormdb - Tables: users, students, applications, announcements, messages, building_assignments
- Sample data (admin, proctor, owner, student accounts)
By default connects to jdbc:mysql://localhost:3306/dormdb with user root and no password.
To customize, set environment variables:
export DB_URL="jdbc:mysql://localhost:3306/dormdb?serverTimezone=UTC&useSSL=false"
export DB_USER="root"
export DB_PASS="your_password"mvn clean javafx:runOr export JAVA_HOME first:
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
mvn clean javafx:run- Admin: username=
admin, password=admin123 - Proctor: username=
proctor1, password=proctor123 - Owner: username=
owner, password=owner123 - Student: username=
student1, password=student123
src/main/java/dorm/
├── dao/ # Data Access Objects (interfaces + MySQL implementations)
│ ├── *Repository.java # DAO interfaces (ISP, DIP)
│ ├── MySql*.java # MySQL implementations
│ └── DaoFactory.java # Factory for creating DAOs
├── model/ # Domain models
│ ├── User.java # Base user class
│ ├── Student.java # Student (inherits from User)
│ ├── Role.java # User roles enum
│ ├── ApplicationStatus.java
│ └── ...
├── service/ # Business logic layer
│ └── DatabaseDormService.java
├── ui/ # JavaFX UI components
│ ├── LoginViewDb.java
│ ├── StudentDashboardDb.java
│ ├── AdminDashboardDb.java
│ ├── ProctorDashboardDb.java
│ └── OwnerDashboardDb.java
├── util/ # Utilities
│ ├── Db.java # Database connection (HikariCP)
│ └── Validation.java
└── App.java # Main application entry point
- Database I/O - All data persisted to MySQL via JDBC
- CSV Export - Export student lists to CSV files
- File Upload - FileChooser for selecting documents and payment slips
# Clean and compile
mvn clean compile
# Run application
mvn javafx:run
# Package (optional)
mvn packageEducational project for AAU coursework.